FragmentsManager
Component to load, delete and manage fragments efficiently. 📕 Tutorial. 📘 API.
Extends
Implements
Properties
enabled
enabled:
boolean
=true
Overrides
onDisposed
readonly
onDisposed:Event
<unknown
>
Implementation of
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
Parameter | Type | Description |
---|---|---|
object | Vector3 | Object3D <Object3DEventMap > | The object to which the base coordinate system will be applied. |
This should be an instance of THREE.Object3D. | ||
originalCoordinateSystem ? | Matrix4 | The original coordinate system of the object. |
This should be a THREE.Matrix4 representing the object's transformation matrix. |
Returns
Matrix4
dispose()
dispose():
void
Returns
void
Implementation of
getData()
getData(
items
,config
?):Promise
<Record
<string
,ItemData
[]>>
Retrieves data for specified items from multiple models.
Parameters
Parameter | Type | Description |
---|---|---|
items | ModelIdMap | A 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
Parameter | Type | Description |
---|---|---|
guids | Iterable <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
isDisposeable()
isDisposeable():
this is Disposable
Whether is component is Disposable.
Returns
this is Disposable
Inherited from
isHideable()
isHideable():
this is Hideable
Whether is component is Hideable.
Returns
this is Hideable
Inherited from
isResizeable()
isResizeable():
this is Resizeable
Whether is component is Resizeable.
Returns
this is Resizeable
Inherited from
isUpdateable()
isUpdateable():
this is Updateable
Whether is component is Updateable.
Returns
this is Updateable
Inherited from
modelIdMapToGuids()
modelIdMapToGuids(
modelIdMap
):Promise
<string
[]>
Converts a fragment ID map to a collection of GUIDs.
Parameters
Parameter | Type | Description |
---|---|---|
modelIdMap | ModelIdMap | A ModelIdMap to be converted to a collection of GUIDs. |
Returns
Promise
<string
[]>
An array of GUIDs.