Skip to main content

FragmentsManager

Component to load, delete and manage fragments efficiently. 📕 Tutorial. 📘 API.

Extends

Implements

Properties

enabled

enabled: boolean = true

Component.enabled

Overrides

Component . enabled


onDisposed

readonly onDisposed: Event<unknown>

Disposable.onDisposed

Implementation of

Disposable . onDisposed


onFragmentsLoaded

readonly onFragmentsLoaded: Event<any>

Event triggered when fragments are loaded.


uuid

static readonly uuid: "fef46874-46a3-461b-8c44-2922ab77c806"

A unique identifier for the component. This UUID is used to register the component within the Components system.

Accessors

list

get list(): DataMap<string, FragmentsModel>

Map containing all loaded fragment models. The key is the group's unique identifier, and the value is the model itself.

Returns

DataMap<string, FragmentsModel>

Methods

applyBaseCoordinateSystem()

applyBaseCoordinateSystem(object, originalCoordinateSystem?): Matrix4

Applies the base coordinate system to the provided object.

This function takes an object and its original coordinate system as input. It then inverts the original coordinate system and applies the base coordinate system to the object. This ensures that the object's position, rotation, and scale are transformed to match the base coordinate system (which is taken from the first model loaded).

Parameters

ParameterTypeDescription
objectVector3 | Object3D<Object3DEventMap>The object to which the base coordinate system will be applied.
This should be an instance of THREE.Object3D.
originalCoordinateSystem?Matrix4The original coordinate system of the object.
This should be a THREE.Matrix4 representing the object's transformation matrix.

Returns

Matrix4


dispose()

dispose(): void

Disposable.dispose

Returns

void

Implementation of

Disposable . dispose


getData()

getData(items, config?): Promise<Record<string, ItemData[]>>

Retrieves data for specified items from multiple models.

Parameters

ParameterTypeDescription
itemsModelIdMapA map of model IDs to an array of local IDs, specifying which items to retrieve data for.
config?Partial<ItemsDataConfig>Optional configuration for data retrieval.

Returns

Promise<Record<string, ItemData[]>>

A record mapping model IDs to an array of item data.


guidsToModelIdMap()

guidsToModelIdMap(guids): Promise <ModelIdMap>

Converts a collection of IFC GUIDs to a fragmentIdMap.

Parameters

ParameterTypeDescription
guidsIterable<string>An iterable collection of global IDs to be converted to a fragment ID map.

Returns

Promise <ModelIdMap>

A fragment ID map, where the keys are fragment IDs and the values are the corresponding express IDs.


isConfigurable()

isConfigurable(): this is Configurable<any, any>

Whether is component is Configurable.

Returns

this is Configurable<any, any>

Inherited from

Component . isConfigurable


isDisposeable()

isDisposeable(): this is Disposable

Whether is component is Disposable.

Returns

this is Disposable

Inherited from

Component . isDisposeable


isHideable()

isHideable(): this is Hideable

Whether is component is Hideable.

Returns

this is Hideable

Inherited from

Component . isHideable


isResizeable()

isResizeable(): this is Resizeable

Whether is component is Resizeable.

Returns

this is Resizeable

Inherited from

Component . isResizeable


isUpdateable()

isUpdateable(): this is Updateable

Whether is component is Updateable.

Returns

this is Updateable

Inherited from

Component . isUpdateable


modelIdMapToGuids()

modelIdMapToGuids(modelIdMap): Promise<string[]>

Converts a fragment ID map to a collection of GUIDs.

Parameters

ParameterTypeDescription
modelIdMapModelIdMapA ModelIdMap to be converted to a collection of GUIDs.

Returns

Promise<string[]>

An array of GUIDs.