Skip to main content

@thatopen/fragments

Enumerations

EnumerationDescription
CurrentLodEnum representing the current level of detail (LOD) for a mesh.
ItemConfigClassEnum representing the configuration class for an item in a Fragments model.
SnappingClassEnum representing the snapping class for a raycast operation.

Classes

ClassDescription
FragmentsModelThe main class for managing a 3D model loaded from a fragments file. Handles geometry, materials, visibility, highlighting, sections, and more. This class orchestrates multiple specialized managers to handle different aspects of the model like mesh management, item data, raycasting, etc. It maintains the overall state and provides the main interface for interacting with the model. The model data is loaded and processed asynchronously across multiple threads.
FragmentsModelsThe main class for managing multiple 3D models loaded from fragments files. Handles loading, disposing, updating, raycasting, highlighting and coordinating multiple FragmentsModel instances. This class acts as the main entry point for working with fragments models.
IfcImporterAn objet to convert IFC files into fragments.

Interfaces

InterfaceDescription
AttributesInterface representing the attributes of a model item.
ItemAttributeInterface representing the attributes of an item in a Fragments model.
ItemDataInterface representing the data of an item in a Fragments model.
ItemsDataConfigInterface representing the configuration for item data in a Fragments model.
MappedInformationResultInterface representing the result of an information query for a specific item type.
MappedResultInputInterface representing the input for a result query in a Fragments model.
MappedSelectionInputInterface representing the input for a selection query in a Fragments model.
ModelIdMapInterface representing a map of model IDs to their corresponding local IDs.
RaycastDataInterface representing the data for a raycast operation.
RaycastResultInterface representing the result of a raycast operation.
RectangleRaycastDataInterface representing the data for a rectangle raycast operation.
RectangleRaycastResultInterface representing the result of a rectangle raycast operation.
RelsModifyChangeInterface representing a change event when relations are modified in a model item.
SpatialTreeItemInterface representing an item in a spatial tree.
VirtualModelConfigInterface representing the configuration for a virtual model.
VirtualPropertiesConfigInterface representing the configuration for virtual properties in a Fragments model.

Type Aliases

Type aliasDescription
AttributeDataRepresents attribute data for a model item.
AttrsChangeUnion type representing all possible attribute change types.
BIMMaterialUnion type representing all possible material types.
BIMMeshUnion type representing all possible mesh types.
DataBufferUnion type representing all possible data buffer types.
IdentifierType representing a unique identifier for a model item. This can be either a string or a number.
InformationResultTypeType representing the result of an information query for a specific item type.
ItemInformationTypeUnion type representing all possible item information types.
ItemSelectionTypeUnion type representing all possible item selection types.
MaterialDefinitionInterface representing the definition of a material.
MeshDataInterface representing the data of a mesh.
RelsChangeUnion type representing all possible relation change types.
ResultInputTypeUnion type representing all possible result input types.
SelectionInputTypeUnion type representing all possible selection input types.

Variables

VariableDescription
ifcCategoryMapA map that associates each unique integer identifier (IFC Entity ID) with its corresponding category name. This map is used to map IFC entities to their respective categories for easier identification and processing.
limitOf2BytesThe maximum value for a 2-byte unsigned integer.

Functions

FunctionDescription
getObjectRecursively converts a Flatbuffers object into a plain JavaScript object. This function traverses the prototype chain of the Flatbuffers object and extracts all properties and their values, handling both primitive values and nested objects/arrays.