Skip to main content

@thatopen/components

Classes

ClassDescription
AsyncEventSimple event handler by Jason Kleban. Keep in mind that if you want to remove it later, you might want to declare the callback as an object. If you want to maintain the reference to this, you will need to declare the callback as an arrow function.
BCFTopicsBCFTopics manages Building Collaboration Format (BCF) data the engine.
It provides functionality for importing, exporting, and manipulating BCF data.
BaseBase class of the library. Useful for finding out the interfaces something implements.
BaseCameraAbstract class representing a camera in a 3D world. All cameras should use this class as a base.
BaseRendererAbstract class representing a renderer for a 3D world. All renderers should use this class as a base.
BaseSceneAbstract class representing a base scene in the application. All scenes should use this class as a base.
BaseWorldItemOne of the elements that make a world. It can be either a scene, a camera or a renderer.
BoundingBoxerA simple implementation of bounding box that works for fragments. The resulting bbox is not 100% precise, but it's fast, and should suffice for general use cases such as camera zooming or general boundary determination. 📕 Tutorial. 📘 API.
ClassifierThe Classifier component is responsible for classifying and categorizing fragments based on various criteria. It provides methods to add, remove, find, and filter fragments based on their classification. 📕 Tutorial. 📘 API.
ClipperA lightweight component to easily create, delete and handle clipping planes. 📕 Tutorial. 📘 API.
CommentRepresents a comment in a BCF Topic.
ComponentComponents are the building blocks of this library. Components are singleton elements that contain specific functionality. For instance, the Clipper Component can create, delete and handle 3D clipping planes. Components must be unique (they can't be instanced more than once per Components instance), and have a static UUID that identifies them uniquely. The can be accessed globally using the Components instance.
ComponentsThe entry point of the Components library. It can create, delete and access all the components of the library globally, update all the updatable components automatically and dispose all the components, preventing memory leaks.
ConfigManagerA tool to manage all the configuration from the app centrally.
CullerRendererA base renderer to determine visibility on screen.
CullersA component that provides culling functionality for meshes in a 3D scene. 📕 Tutorial. 📘 API.
DataMapA class that extends the built-in Map class and provides additional events for item set, update, delete, and clear operations.
DataSetA class that extends the built-in Set class and provides additional functionality.
It triggers events when items are added, deleted, or the set is cleared.
DisposerA tool to safely remove meshes, geometries, materials and other items from memory to prevent memory leaks.
EventSimple event handler by Jason Kleban. Keep in mind that if you want to remove it later, you might want to declare the callback as an object. If you want to maintain the reference to this, you will need to declare the callback as an arrow function.
ExploderThe Exploder component is responsible for managing the explosion of 3D model fragments (generally by floor). 📕 Tutorial. 📘 API.
FirstPersonModeA NavigationMode that allows first person navigation, simulating FPS video games.
FragmentsManagerComponent to load, delete and manage fragments efficiently. 📕 Tutorial. 📘 API.
GridsA component that manages grid instances. Each grid is associated with a unique world. 📕 Tutorial. 📘 API.
HiderA component that hides or isolates fragments within a 3D scene. It extends the base Component class and provides methods to control fragment visibility and isolation. 📕 Tutorial. 📘 API.
IDSSpecificationRepresents a single specification from the Information Delivery Specification (IDS) standard.
IDSSpecificationsComponent that manages Information Delivery Specification (IDS) data.
It provides functionality for importing, exporting, and manipulating IDS data.
IfcBasicQueryA query that checks the direct attributes of IFC items.
IfcFinderComponent to make text queries in the IFC.
IfcFinderQueryThe base class for all queries used by the IfcFinder.
IfcFragmentSettingsConfiguration of the IFC-fragment conversion.
IfcGeometryTilerA component that handles the tiling of IFC geometries for efficient streaming. 📕 Tutorial. 📘 API.
IfcIsolatorComponent to isolate certain elements from an IFC and export to another IFC. 📕 Tutorial. 📘 API.
IfcJsonExporterComponent to export all the properties from an IFC to a JS object. 📕 Tutorial. 📘 API.
IfcLoaderThe IfcLoader component is responsible for loading and processing IFC files. It utilizes the Web-IFC library to handle the IFC data and the Three.js library for 3D rendering. The class provides methods for setting up, loading, and cleaning up IFC files. 📕 Tutorial. 📘 API.
IfcPropertiesManagerComponent to manage and edit properties and Psets in IFC files.
IfcPropertiesTilerA component that converts the properties of an IFC file to tiles. It uses the Web-IFC library to read and process the IFC data. 📕 Tutorial. 📘 API.
IfcPropertyQueryA query that checks the properties in the property sets assigned to IFC items.
IfcRelationsIndexerIndexer component for IFC entities, facilitating the indexing and retrieval of IFC entity relationships. It is designed to process models properties by indexing their IFC entities' relations based on predefined inverse attributes, and provides methods to query these relations. 📕 Tutorial. 📘 API.
IfcStreamingSettingsSettings for streaming IFC geometry and assets. Extends IfcFragmentSettings to inherit common settings.
MeasurementUtilsUtility component for performing measurements on 3D meshes by providing methods for measuring distances between edges and faces. 📕 Tutorial. 📘 API.
MeshCullerRendererA renderer to hide/show meshes depending on their visibility from the user's point of view.
MiniMapA class representing a 2D minimap of a 3D world.
MiniMapsA component that manages multiple MiniMap instances, each associated with a unique world ID. 📕 Tutorial. 📘 API.
MouseA helper to easily get the real position of the mouse in the Three.js canvas to work with tools like the raycaster, even if it has been transformed through CSS or doesn't occupy the whole screen.
OrbitModeA NavigationMode that allows 3D navigation and panning like in many 3D and CAD softwares.
OrthoPerspectiveCameraA flexible camera that uses yomotsu's cameracontrols to control the camera in 2D and 3D. It supports multiple navigation modes, such as 2D floor plan navigation, first person and 3D orbit. This class extends the SimpleCamera class and adds additional functionality for managing different camera projections and navigation modes. 📕 Tutorial. 📘 API.
PlanModeA NavigationMode that allows to navigate floorplans in 2D, like many BIM tools.
ProjectionManagerObject to control the CameraProjection of the OrthoPerspectiveCamera.
PropertiesStreamingSettingsSettings for streaming properties. Extends IfcFragmentSettings to inherit common settings.
RaycastersA component that manages a raycaster for each world and automatically disposes it when its corresponding world is disposed. 📕 Tutorial. 📘 API.
ShadowedSceneA scene that supports efficient cast shadows. 📕 Tutorial. 📘 API.
SimpleCameraA basic camera that uses yomotsu's cameracontrols to control the camera in 2D and 3D. Check out it's API to find out what features it offers.
SimpleGridAn infinite grid. Created by fyrestar and translated to typescript by dkaraush.
SimplePlaneEach of the clipping planes created by the clipper.
SimpleRaycasterA simple raycaster that allows to easily get items from the scene using the mouse and touch events.
SimpleRendererA basic renderer capable of rendering Objec3Ds.
SimpleSceneA basic 3D scene to add objects hierarchically, and easily dispose them when you are finished with it.
SimpleWorldA class representing a simple world in a 3D environment. It extends the Base class and implements the World interface.
VertexPickerA class that provides functionality for picking vertices in a 3D scene.
ViewpointRepresents a BCF compliant viewpoint from BuildingSMART.

The Viewpoint class provides methods for managing and interacting with viewpoints. It includes functionality for setting viewpoint properties, updating the camera, applying color to components, and serializing the viewpoint for export. | | Worlds | A class representing a collection of worlds within a game engine. It manages the creation, deletion, and update of worlds. 📕 Tutorial. 📘 API. |

Interfaces

InterfaceDescription
AttributeListenerInterface representing a map of attribute listeners. The keys are model UUIDs, and the values are objects with express IDs as keys, and objects with attribute names as keys, and Event objects as values.
BCFTopicsConfigConfiguration settings for managing BCF topics.
This interface defines the properties and their meanings used to control the behavior of exporting and importing BCF topics.
BCFViewpointRepresents a viewpoint in a BCF file.
CameraControllableWhether a camera uses the Camera Controls library.
ChangeMapInterface representing a map of changed entities in a model. The keys are model UUIDs, and the values are sets of express IDs of changed entities.
ClassificationInterface representing a classification system. The classification is organized by system and class name, and each class contains a map of fragment IDs with extra information.
ConfigurableWhether this component supports to be configured.
CreateableWhether this component supports create and destroy operations. This generally applies for components that work with instances, such as clipping planes or dimensions.
DisposableWhether this component has to be manually destroyed once you are done with it to prevent memory leaks. This also ensures that the DOM events created by that component will be cleaned up.
EntitiesRelatedEventInterface definition of an Entities Related Event from the IfcRelationsIndexer.
This event gets triggered when two or more entities has been related with each other.
HideableWhether the geometric representation of this component can be hidden or shown in the Three.js scene.
IDSCheckResultRepresents the result of a check performed by an IDSFacet test.
IfcCategoryRuleA rule for the IfcFinder to search items based on their category.
IfcOperatorRuleA rule for the IfcFinder to search items based on the value of a numeric property defined in their property sets.
IfcPropertyRuleA rule for the IfcFinder to search items based on the properties defined in their property sets.
MeasureEdgeRepresents an edge measurement result.
MiniMapConfigConfiguration interface for the MiniMap.
NavigationModeAn object that determines the behavior of the camera controls and the user input (e.g. 2D floor plan mode, first person mode, etc).
ProgressBasic type to describe the progress of any kind of process.
ResizeableWhether this component can be resized. The meaning of this can vary depending on the component: resizing a Renderer component could mean changing its resolution, whereas resizing a Mesh would change its scale.
ShadowedSceneConfigConfiguration interface for the ShadowedScene. Defines properties for directional and ambient lights,
as well as shadows.
SimpleGridConfigConfiguration interface for the SimpleGrid.
SimpleSceneConfigConfiguration interface for the SimpleScene.
StreamedAssetA streamed asset, which consists of multiple geometries. Each geometry in the asset is identified by a unique number (geometryID), and contains information about its transformation and color.
StreamedGeometriesA dictionary of geometries streamed from a server. Each geometry is identified by a unique number (id), and contains information about its bounding box, whether it has holes, and an optional file path for the geometry data.
UpdateableWhether this component should be updated each frame.
VertexPickerConfigConfiguration interface for the VertexPicker component.
WorldRepresents a 3D world with meshes, scene, camera, renderer, and other properties.

Type Aliases

Type aliasDescription
BooleanPropTypesTypes for boolean properties in IFC schema.
CameraProjectionThe projection system of the camera.
IfcFinderRuleThe type of rules that can be used in the queries of the IfcFinder.
IfcRelationsType alias for an array of IfcRelation types from WebIfc.
InverseAttributesType alias for an array of inverse attribute names.
NavModeIDThe extensible list of supported navigation modes.
NumericPropTypesTypes for numeric properties in IFC schema.
SerializedQueryThe data type used when the queries of the IfcFinder export or import query data to persist it.
StringPropTypesTypes for string properties in IFC schema.

Variables

VariableDescription
GeometryTypesA Set of unique numbers representing different types of IFC geometries.
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.
IfcElementsA map of IFC element types to their corresponding names. The keys are the IFC entity type numbers, and the values are the names of the IFC entities.