Class: GoIFCComponents

GoIFCComponents

This class provides methods for manipulating IFC models and the 3D scene. It integrates various functionalities like UI interactions, model loading, and scene manipulation.

new GoIFCComponents(ifcContainerSelector)

Interactions/IFC/interact/GoIFCComponents/index.ts, line 51

Creates an instance of GoIFCComponents.

Name Type Description
ifcContainerSelector string

The CSS selector for the container where IFC models will be displayed.

Members

componentsManager

Returns the current instance of the components manager.

ui

Returns the UI controller or manager instance responsible for managing the user interface.

Methods

addToScene(object)

Interactions/IFC/interact/GoIFCComponents/index.ts, line 533

Adds a given object to the scene.

Name Type Description
object Object3D

The object to be added to the scene.

changeLang(lang)

Interactions/IFC/interact/GoIFCComponents/index.ts, line 258

Changes the UI lang if the selected language differs, use onl console.error('${lang}',is not a supported lang.);y if you don't use ifc with a map.

Name Type Description
lang SupportedLangs

The new language to be set (must be a SupportedLangs).

dismount()

Interactions/IFC/interact/GoIFCComponents/index.ts, line 178

Dismounts loader, models, and UI components and removes the IFC wrapper.

emit(eventName, args)

Interactions/IFC/interact/GoIFCComponents/index.ts, line 586

Emits an event, triggering all its registered listeners.

Name Type Description
eventName GoIFCComponentsEvents

The name of the event to emit.

args any repeatable

Arguments to pass to the event listeners.

fitModelToView()

Interactions/IFC/interact/GoIFCComponents/index.ts, line 205

Fits the currently loaded IFC model into the view by adjusting camera controls to its bounding sphere.

get2dRenderer(){Renderer}

Interactions/IFC/interact/GoIFCComponents/index.ts, line 499

Retrieves the 2D renderer associated with the IFC models.

Returns:
Type Description
Renderer The 2D renderer.

getCamera(){Camera}

Interactions/IFC/interact/GoIFCComponents/index.ts, line 462

Retrieves the current camera used in the scene.

Returns:
Type Description
Camera The current camera.

getComponents(){Components}

Interactions/IFC/interact/GoIFCComponents/index.ts, line 486

Retrieves the components used for managing the IFC models and the scene.

Returns:
Type Description
Components The components object.

getConfig(){IFCConfig}

Interactions/IFC/interact/GoIFCComponents/index.ts, line 344

Gets the configuration object for the GoIFCComponents instance.

Returns:
Type Description
IFCConfig The configuration object.

getControls()

Interactions/IFC/interact/GoIFCComponents/index.ts, line 225

Retrieves the CameraControls instance used for orbiting and zooming.

Returns:
The CameraControls instance.

getCss3dRenderer(){CSS3DRenderer}

Interactions/IFC/interact/GoIFCComponents/index.ts, line 515
Returns:
Type Description
CSS3DRenderer The instance of the CSS3D renderer.

getEventHandlers(eventName){Array.<function()>}

Interactions/IFC/interact/GoIFCComponents/index.ts, line 604

Retrieves the event handlers associated with a specific event.

Name Type Description
eventName GoIFCComponentsEvents

The name of the event whose handlers are to be retrieved.

Returns:
Type Description
Array.<function()> An array of registered event handlers for the specified event.

getIFCContainer(){HTMLElement}

Interactions/IFC/interact/GoIFCComponents/index.ts, line 444

Retrieves the container element where IFC models are displayed.

Returns:
Type Description
HTMLElement The container element.

getIFCContainerSelector(){string}

Interactions/IFC/interact/GoIFCComponents/index.ts, line 453

Retrieves the CSS selector for the IFC model container.

Returns:
Type Description
string The CSS selector for the container.

getIdentity()

Interactions/IFC/interact/GoIFCComponents/index.ts, line 351

Returns the identity options (group, view, appId) ensuring defaults are used.

getLODManager(){LODManager}

Interactions/IFC/interact/GoIFCComponents/index.ts, line 335

Gets the LODManager instance.

Returns:
Type Description
LODManager The LODManager instance.

getLanguage(){SupportedLangs}

Interactions/IFC/interact/GoIFCComponents/index.ts, line 282

Gets the current language of the BIM interface.

Returns:
Type Description
SupportedLangs The current language being used in the BIM interface.

getLinkedElementsInfo(){LinkedElementsInfo}

Interactions/IFC/interact/GoIFCComponents/index.ts, line 310

Gets the information about linked elements.

Returns:
Type Description
LinkedElementsInfo The linked elements information.

getLoader(){GoIFCLoader}

Interactions/IFC/interact/GoIFCComponents/index.ts, line 435

Retrieves the loader component used for loading IFC models.

Returns:
Type Description
GoIFCLoader The loader component.

getMeshSimplifier(){MeshSimplifier}

Interactions/IFC/interact/GoIFCComponents/index.ts, line 319

Gets the mesh simplifier instance.

Returns:
Type Description
MeshSimplifier The mesh simplifier instance.

getModels(){GoIFCModels}

Interactions/IFC/interact/GoIFCComponents/index.ts, line 426

Retrieves the model components associated with the IFC models.

Returns:
Type Description
GoIFCModels The model components.

getRenderer(){WebGLRenderer}

Interactions/IFC/interact/GoIFCComponents/index.ts, line 524

Retrieves the renderer used for the IFC models.

Returns:
Type Description
WebGLRenderer The renderer.

getScene(){Scene}

Interactions/IFC/interact/GoIFCComponents/index.ts, line 547

Retrieves the current scene.

Returns:
Type Description
Scene The current scene.

getUI(){GoIFCUI}

Interactions/IFC/interact/GoIFCComponents/index.ts, line 369

Retrieves the UI components associated with the IFC models.

Returns:
Type Description
GoIFCUI The UI components.

hasEvent(eventName){boolean}

Interactions/IFC/interact/GoIFCComponents/index.ts, line 595

Checks if an event has any registered listeners.

Name Type Description
eventName GoIFCComponentsEvents

The name of the event to check.

Returns:
Type Description
boolean True if the event has listeners, false otherwise.

off(eventName, callback)

Interactions/IFC/interact/GoIFCComponents/index.ts, line 577

Removes a callback function for a specific event.

Name Type Description
eventName GoIFCComponentsEvents optional

The name of the event. If omitted, removes all listeners.

callback function optional

The callback function to be removed.

on(eventName, callback)

Interactions/IFC/interact/GoIFCComponents/index.ts, line 557

Registers a callback function for a specific event.

Name Type Description
eventName GoIFCComponentsEvents

The name of the event to listen for.

callback function

The callback function to be executed when the event is triggered.

once(eventName, callback)

Interactions/IFC/interact/GoIFCComponents/index.ts, line 567

Registers a one-time callback function for a specific event.

Name Type Description
eventName GoIFCComponentsEvents

The name of the event to listen for.

callback function

The callback function to be executed once when the event is triggered.

registerComponent(name, component)

Interactions/IFC/interact/GoIFCComponents/index.ts, line 216

Registers a component under a given name for later retrieval.

Name Type Description
name

Unique name of the component.

component

Component instance to register.

removeFromScene(object)

Interactions/IFC/interact/GoIFCComponents/index.ts, line 471

Removes a given object from the scene.

Name Type Description
object Object3D

The object to be removed from the scene.

updateLang()

Interactions/IFC/interact/GoIFCComponents/index.ts, line 273

Forces an update of the UI components, usually after a language change, Use only if you use ifc with a map!

zoomTo(position)

Interactions/IFC/interact/GoIFCComponents/index.ts, line 234

Zooms to a specific world position by fitting a small box around it.

Name Type Description
position

Target position in world coordinates.