@thatopen/components 2.0.25 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/Components/index.d.ts +1 -1
- package/dist/fragments/BoundingBoxer/index.d.ts +23 -0
- package/dist/index.cjs +5 -5
- package/dist/index.mjs +838 -810
- package/dist/measurement/MeasurementUtils/index.d.ts +2 -8
- package/dist/namespace.d.ts +1398 -1381
- package/package.json +56 -56
|
@@ -6,7 +6,7 @@ export declare class Components implements Disposable {
|
|
|
6
6
|
/**
|
|
7
7
|
* The version of the @thatopen/components library.
|
|
8
8
|
*/
|
|
9
|
-
static readonly release = "2.0
|
|
9
|
+
static readonly release = "2.1.0";
|
|
10
10
|
/** {@link Disposable.onDisposed} */
|
|
11
11
|
readonly onDisposed: Event<void>;
|
|
12
12
|
/**
|
|
@@ -181,5 +181,28 @@ export declare class BoundingBoxer extends Component implements Disposable {
|
|
|
181
181
|
* ```
|
|
182
182
|
*/
|
|
183
183
|
addMesh(mesh: THREE.InstancedMesh | THREE.Mesh | FRAGS.CurveMesh, itemIDs?: Iterable<number>): void;
|
|
184
|
+
/**
|
|
185
|
+
* Uses a FragmentIdMap to add its meshes to the bb calculation.
|
|
186
|
+
*
|
|
187
|
+
* This method iterates through the provided `fragmentIdMap`, retrieves the corresponding fragment from the `FragmentsManager`,
|
|
188
|
+
* and then calls the `addMesh` method for each fragment's mesh, passing the expression IDs as the second parameter.
|
|
189
|
+
*
|
|
190
|
+
* @param fragmentIdMap - A mapping of fragment IDs to their corresponding expression IDs.
|
|
191
|
+
*
|
|
192
|
+
* @remarks
|
|
193
|
+
* This method is used to add a mapping of fragment IDs to their corresponding expression IDs.
|
|
194
|
+
* It ensures that the bounding box calculations are accurate and up-to-date by updating the internal minimum and maximum vectors.
|
|
195
|
+
*
|
|
196
|
+
* @example
|
|
197
|
+
* ```typescript
|
|
198
|
+
* const boundingBoxer = components.get(BoundingBoxer);
|
|
199
|
+
* const fragmentIdMap: FRAGS.FragmentIdMap = {
|
|
200
|
+
* '5991fa75-2eef-4825-90b3-85177f51a9c9': [123, 245, 389],
|
|
201
|
+
* '3469077e-39bf-4fc9-b3e6-4a1d78ad52b0': [454, 587, 612],
|
|
202
|
+
* };
|
|
203
|
+
* boundingBoxer.addFragmentIdMap(fragmentIdMap);
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
addFragmentIdMap(fragmentIdMap: FRAGS.FragmentIdMap): void;
|
|
184
207
|
private static getFragmentBounds;
|
|
185
208
|
}
|