A 3D viewer

Hierarchy

  • Viewer3d

Implements

  • ObjectStateListener

Constructors

Properties

bimSurfer: unknown
client: BimWorksClient
container: HTMLElement

Current viewer mode, either LOCAL (Using local coordinates) or GEO (Using geo coordinates)

modelManager: ModelManager
objectStateManager: ObjectStateManager
settings: unknown

Methods

  • Parameters

    • nodeIds: string[]

    Returns unknown

  • Register a listener to be called whenever a point is selected in MeasurementType "POINT"

    Parameters

    • listener: ((vertexInfo: unknown) => void)
        • (vertexInfo: unknown): void
        • Parameters

          • vertexInfo: unknown

          Returns void

    Returns void

  • {@inheritDoc ObjectStateListener.addedToSelectionSet}

    Parameters

    • qids: Iterable<string>

    Returns void | Promise<void>

  • {@inheritDoc ObjectStateListener.addedToVisibleSet}

    Parameters

    • qids: Iterable<string>

    Returns void | Promise<void>

  • {@inheritDoc ObjectStateListener.colorChanged}

    Parameters

    • qids: Iterable<string>
    • color: Color

    Returns void | Promise<void>

  • {@inheritDoc ObjectStateListener.colorReset}

    Parameters

    • qids: Iterable<string>

    Returns void | Promise<void>

  • Destroys the viewer and any (heavy) resources associated with it. As long as there is a reference to the Viewer3d instance it won't be completely destroyed.

    Returns void

  • Initializes the Viewer3d, it is important to wait for this async method to finish

    Returns Promise<void>

  • Parameters

    • id: unknown
    • geoReference: unknown

    Returns unknown

  • Returns

    Whether the given type is currently visible

    Parameters

    • type: string

    Returns boolean

  • Parameters

    • versionUuids: Iterable<string>

    Returns unknown

  • Parameters

    • versionUuids: Iterable<string>

    Returns unknown

  • {@inheritDoc ObjectStateListener.primarySelectionChanged}

    Parameters

    • qid: string

    Returns void | Promise<void>

  • Parameters

    • qids: Iterable<string>

    Returns number[]

  • Parameters

    • versions: Iterable<string>

    Returns unknown

  • {@inheritDoc ObjectStateListener.removedFromSelectionSet}

    Parameters

    • qids: Iterable<string>
    • type: string

    Returns void | Promise<void>

  • {@inheritDoc ObjectStateListener.removedFromVisibleSet}

    Parameters

    • qids: Iterable<string>

    Returns void | Promise<void>

  • Resize the viewer. This should only ever be called when autoresizing is off. It is higly recommended to let the Viewer3d manage it's own size based on it's position within the document

    Parameters

    • width: number
    • height: number

    Returns unknown

  • Will take a screenshot of the contents of the Viewer3d.

    Example

    The returned Blob can for example be downloaded by the user, using the following example

     const width = viewer3d.width;
    const height = viewer3d.height;
    const filename = `screencapture-${width}x${height}.png`;
    Utils.downloadBlob(blob, filename);

    Returns

    A Blob

    Parameters

    Returns Promise<Blob>

  • Parameters

    • qid: string

    Returns void | Promise<void>

  • Parameters

    • buildingStoreyQids: Iterable<string>
    • hideOpenings: boolean

    Returns void | Promise<void>

  • Show/hide a specific type, this overrules any visibility information of objects in the ObjectStateManager

    Parameters

    • type: string
    • show: boolean

    Returns void

  • {@inheritDoc ObjectStateListener.setToSelectionSet}

    Parameters

    • qids: Iterable<string>
    • qidsToUnselect: Iterable<string>
    • type: string

    Returns void | Promise<void>

  • {@inheritDoc ObjectStateListener.setVisibleSet}

    Parameters

    • qids: Iterable<string>
    • hiddenQids: string[]

    Returns void | Promise<void>

  • Parameters

    • sids: Iterable<number>

    Returns string[]

  • 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

    Returns void

  • Toggles the default animation, which is an animation that continously rotates the building along the Z-Axis

    Returns unknown

  • 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.

    Parameters

    • enabled: boolean

      True when enabled

    Returns void

  • Toggle whether faces are rendered.

    Parameters

    • enabled: boolean

      True when enabled

    Returns void

  • Toggle whether to force always rendering faces two-sided (e.a. no back face culling). This overrules whatever BIM.works Repository has decided should happen.

    Parameters

    • enabled: boolean

      True when enabled

    Returns void

  • Toggle whether the viewer is in fullscreen mode

    Parameters

    • Optional enable: boolean

    Returns void

  • Toggle a specific GIS Layer on or off

    Parameters

    • id: string
    • show: boolean

    Returns void

  • Toggle whether ifc lines are rendered. IFC Lines are all lines that have been defined in the original IFC file, such as Axis and FootPrint representations.

    Parameters

    • enabled: boolean

      True when enabled

    Returns void

  • Toggle whether vertices are rendered. Currently this does not have much use, in the future it will be used for snapping.

    Parameters

    • enabled: boolean

      True when enabled

    Returns void

  • Toggle whether wireframes are rendered. Wireframes are usually drawn to emphesize the edges and generally make the model look better

    Parameters

    • enabled: boolean

      True when enabled

    Returns void

  • Parameters

    • qids: Iterable<string>

    Returns void | Promise<void>

  • Parameters

    • qids: Iterable<string>

    Returns unknown

  • Fit the given object into view.

    Parameters

    • qids: Iterable<string>
    • Optional options: ViewFitOptions

    Returns void

  • {@inheritDoc ObjectStateListener.viewFitModels}

    Parameters

    • versionUuids: Iterable<string>
    • Optional options: ViewFitOptions

    Returns void | Promise<void>

Generated using TypeDoc