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. 📕 Tutorial. 📘 API.
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.
BoundingBoxerAn implementation of bounding box utilities that works for fragments. 📕 Tutorial. 📘 API.
ClassifierThe Classifier component is responsible for grouping items from different models based on criteria. 📕 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. 📘 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. 📘 API.
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.
EventManagerSimple class to easily toggle and reset event lists.
FinderQueryRepresents a finder query for retrieving items based on specified parameters. This class encapsulates the query logic, caching mechanism, and result management.
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 manages visibility of 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. 📕 Tutorial. 📘 API.
IfcFragmentSettingsConfiguration of the IFC-fragment conversion.
IfcLoaderThe IfcLoader component is responsible of converting IFC files into Fragments. 📕 Tutorial. 📘 API.
ItemsFinderManages and executes queries to find items within models based on specified criteria. This class provides functionalities to create, store, and execute FinderQuery instances, allowing for efficient retrieval of items that match given query parameters. 📕 Tutorial. 📘 API.
MeasurementUtilsUtility component for performing measurements on 3D meshes by providing methods for measuring distances between edges and faces. 📘 API.
ModelIdMapUtilsUtility class for manipulating and managing ModelIdMap objects. A ModelIdMap is a mapping of model identifiers (strings) to sets of local IDs (numbers). This class provides methods for joining, intersecting, cloning, adding, removing, and comparing ModelIdMap objects, as well as converting between ModelIdMap and plain JavaScript objects.
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.
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.
ViewsThe Views class is responsible for managing and interacting with a collection of 2D sections. It provides methods for creating, opening, closing, and managing views, as well as generating views from specific configurations such as IFC storeys or bounding boxes. 📕 Tutorial. 📘 API.
WorldsA class representing a collection of worlds within a game engine. It manages the creation, deletion, and update of worlds. 📕 Tutorial. 📘 API.

Interfaces

InterfaceDescription
AddClassificationConfigConfiguration options for adding a classification.
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 Building Collaboration Format (BCF) viewpoint. This interface is compliant with the BCF API specifications.
CameraControllableWhether a camera uses the Camera Controls library.
ClassificationGroupDataRepresents the data structure for a classification group.
ClassificationGroupQueryRepresents a query for a classification group.
ClassifyItemRelationsConfigConfiguration interface for classifying item by relation values.
ConfigurableWhether this component supports to be configured.
CreateElevationViewsConfigConfiguration options for creating views from bounding boxes.
CreateViewConfigConfiguration options for creating views from a plane.
CreateViewFromIfcStoreysConfigConfiguration options for creating a view from IFC storeys.
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.
EventableWhether it has events or not.
HideableWhether the geometric representation of this component can be hidden or shown in the Three.js scene.
MeasureEdgeRepresents an edge measurement result.
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.
QueryTestConfigConfiguration for testing queries.
RemoveClassifierItemsConfigConfiguration options for removing items from a classifier.
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.
SerializedFinderQueryRepresents a serialized query for an item finder.
SerializedQueryParametersRepresents the serialized query parameters used for item finding.
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.
UpdateableWhether this component should be updated each frame.
VertexPickerConfigConfiguration interface for the VertexPicker component.
ViewpointBitmapRepresents a bitmap image associated with a viewpoint. This interface is compliant with the BCF API specifications.
ViewpointCameraRepresents the properties of a camera viewpoint in a 3D space. This interface is compliant with the BCF API specifications.
ViewpointClippingPlaneRepresents a clipping plane in a viewpoint, defined by its location and direction. This interface is compliant with the BCF API specifications.
ViewpointColoringRepresents the coloring information for a viewpoint, including the color and associated components. This interface is compliant with the BCF API specifications.
ViewpointComponentRepresents a component within a viewpoint, typically used in Building Information Modeling (BIM) workflows. This interface is compliant with the BCF API specifications.
ViewpointComponentsRepresents the components of a viewpoint in the BCF API. This interface is compliant with the BCF API specifications.
ViewpointLineRepresents a line defined by a start and end point in a viewpoint. This interface is compliant with the BCF API specifications.
ViewpointSnapshotRepresents a snapshot of a viewpoint, including its type and data. This interface is compliant with the BCF API specifications.
ViewpointVectorRepresents a 3D vector with x, y, and z coordinates.
ViewpointVisibilityRepresents the visibility settings for a viewpoint. This interface is compliant with the BCF API specifications.
WithUiWhether it has a UI or not.
WorldRepresents a 3D world with meshes, scene, camera, renderer, and other properties.

Type Aliases

Type aliasDescription
CameraProjectionThe projection system of the camera.
ClassifierIntersectionInputRepresents the input structure for a classifier intersection operation. Defines a record where the keys are classification names and the values are arrays of group names within those classifications.
IDSCheckResultThe result of a check performed by an IDSFacet test.
ModelIdMapMapping of model identifiers to a collection of numbers representing localIds.
NavModeIDThe extensible list of supported navigation modes.
QueryResultAggregationRepresents the type of aggregation used in a query result. inclusive: Equivalent to OR. exclusive: Equivalent to AND.
ViewpointOrthogonalCameraRepresents an orthogonal camera viewpoint, extending the base ViewpointCamera type. This interface is compliant with the BCF API specifications.
ViewpointPerspectiveCameraRepresents a perspective camera viewpoint compliant with the BCF API specifications. Extends the ViewpointCamera type and includes additional properties specific to perspective cameras.