@thatopen/components 2.4.10 → 3.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/README.md +92 -92
- package/dist/index.cjs +18407 -25922
- package/dist/index.d.ts +4537 -6
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.mjs +3 -3
- package/dist/index.mjs +18409 -25924
- package/package.json +58 -61
- package/dist/core/Clipper/index.d.ts +0 -142
- package/dist/core/Clipper/src/clipper-config.d.ts +0 -33
- package/dist/core/Clipper/src/index.d.ts +0 -1
- package/dist/core/Clipper/src/simple-plane.d.ts +0 -99
- package/dist/core/Components/index.d.ts +0 -93
- package/dist/core/ConfigManager/index.d.ts +0 -21
- package/dist/core/ConfigManager/src/configurator.d.ts +0 -13
- package/dist/core/ConfigManager/src/index.d.ts +0 -1
- package/dist/core/Cullers/index.d.ts +0 -56
- package/dist/core/Cullers/src/culler-renderer-config.d.ts +0 -74
- package/dist/core/Cullers/src/culler-renderer.d.ts +0 -76
- package/dist/core/Cullers/src/index.d.ts +0 -3
- package/dist/core/Cullers/src/mesh-culler-renderer.d.ts +0 -59
- package/dist/core/Cullers/src/screen-culler-helper.d.ts +0 -1
- package/dist/core/Disposer/index.d.ts +0 -45
- package/dist/core/Grids/index.d.ts +0 -46
- package/dist/core/Grids/src/index.d.ts +0 -2
- package/dist/core/Grids/src/simple-grid-config.d.ts +0 -80
- package/dist/core/Grids/src/simple-grid.d.ts +0 -48
- package/dist/core/MiniMap/index.d.ts +0 -50
- package/dist/core/MiniMap/src/index.d.ts +0 -2
- package/dist/core/MiniMap/src/mini-map-config.d.ts +0 -112
- package/dist/core/MiniMap/src/mini-map.d.ts +0 -100
- package/dist/core/OrthoPerspectiveCamera/index.d.ts +0 -65
- package/dist/core/OrthoPerspectiveCamera/src/first-person-mode.d.ts +0 -16
- package/dist/core/OrthoPerspectiveCamera/src/index.d.ts +0 -5
- package/dist/core/OrthoPerspectiveCamera/src/orbit-mode.d.ts +0 -16
- package/dist/core/OrthoPerspectiveCamera/src/plan-mode.d.ts +0 -20
- package/dist/core/OrthoPerspectiveCamera/src/projections.d.ts +0 -45
- package/dist/core/OrthoPerspectiveCamera/src/types.d.ts +0 -26
- package/dist/core/Raycasters/index.d.ts +0 -43
- package/dist/core/Raycasters/src/index.d.ts +0 -2
- package/dist/core/Raycasters/src/mouse.d.ts +0 -24
- package/dist/core/Raycasters/src/simple-raycaster.d.ts +0 -54
- package/dist/core/ShadowedScene/index.d.ts +0 -57
- package/dist/core/ShadowedScene/src/distance-renderer.d.ts +0 -67
- package/dist/core/ShadowedScene/src/index.d.ts +0 -1
- package/dist/core/Types/index.d.ts +0 -1
- package/dist/core/Types/src/async-event.d.ts +0 -32
- package/dist/core/Types/src/base-camera.d.ts +0 -28
- package/dist/core/Types/src/base-renderer.d.ts +0 -65
- package/dist/core/Types/src/base-scene.d.ts +0 -25
- package/dist/core/Types/src/base-world-item.d.ts +0 -23
- package/dist/core/Types/src/base.d.ts +0 -19
- package/dist/core/Types/src/component-with-ui.d.ts +0 -18
- package/dist/core/Types/src/component.d.ts +0 -13
- package/dist/core/Types/src/config-types.d.ts +0 -47
- package/dist/core/Types/src/data-map.d.ts +0 -73
- package/dist/core/Types/src/data-set.d.ts +0 -58
- package/dist/core/Types/src/event-manager.d.ts +0 -30
- package/dist/core/Types/src/event.d.ts +0 -32
- package/dist/core/Types/src/index.d.ts +0 -15
- package/dist/core/Types/src/interfaces.d.ts +0 -117
- package/dist/core/Types/src/world.d.ts +0 -34
- package/dist/core/Viewpoints/index.d.ts +0 -38
- package/dist/core/Viewpoints/src/index.d.ts +0 -2
- package/dist/core/Viewpoints/src/types.d.ts +0 -36
- package/dist/core/Viewpoints/src/viewpoint.d.ts +0 -197
- package/dist/core/Viewpoints/src/viewpoints-config.d.ts +0 -23
- package/dist/core/Worlds/index.d.ts +0 -54
- package/dist/core/Worlds/src/index.d.ts +0 -5
- package/dist/core/Worlds/src/simple-camera.d.ts +0 -62
- package/dist/core/Worlds/src/simple-renderer.d.ts +0 -54
- package/dist/core/Worlds/src/simple-scene-config.d.ts +0 -59
- package/dist/core/Worlds/src/simple-scene.d.ts +0 -25
- package/dist/core/Worlds/src/simple-world.d.ts +0 -79
- package/dist/core/index.d.ts +0 -13
- package/dist/fragments/BoundingBoxer/index.d.ts +0 -208
- package/dist/fragments/Classifier/index.d.ts +0 -197
- package/dist/fragments/Exploder/index.d.ts +0 -50
- package/dist/fragments/FragmentsManager/index.d.ts +0 -152
- package/dist/fragments/Hider/index.d.ts +0 -38
- package/dist/fragments/IfcGeometryTiler/index.d.ts +0 -103
- package/dist/fragments/IfcGeometryTiler/src/base-types.d.ts +0 -29
- package/dist/fragments/IfcGeometryTiler/src/index.d.ts +0 -2
- package/dist/fragments/IfcGeometryTiler/src/streaming-settings.d.ts +0 -20
- package/dist/fragments/IfcLoader/index.d.ts +0 -116
- package/dist/fragments/IfcLoader/src/civil-reader.d.ts +0 -15
- package/dist/fragments/IfcLoader/src/ifc-fragment-settings.d.ts +0 -41
- package/dist/fragments/IfcLoader/src/ifc-metadata-reader.d.ts +0 -5
- package/dist/fragments/IfcLoader/src/index.d.ts +0 -5
- package/dist/fragments/IfcLoader/src/spatial-ids-finder.d.ts +0 -5
- package/dist/fragments/IfcLoader/src/spatial-structure.d.ts +0 -8
- package/dist/fragments/IfcLoader/src/transform-helper.d.ts +0 -5
- package/dist/fragments/IfcLoader/src/units.d.ts +0 -10
- package/dist/fragments/IfcPropertiesTiler/index.d.ts +0 -66
- package/dist/fragments/IfcPropertiesTiler/src/index.d.ts +0 -1
- package/dist/fragments/IfcPropertiesTiler/src/streaming-settings.d.ts +0 -11
- package/dist/fragments/index.d.ts +0 -8
- package/dist/ifc/IfcFinder/index.d.ts +0 -50
- package/dist/ifc/IfcFinder/src/ifc-basic-query.d.ts +0 -35
- package/dist/ifc/IfcFinder/src/ifc-finder-query.d.ts +0 -96
- package/dist/ifc/IfcFinder/src/ifc-property-query.d.ts +0 -36
- package/dist/ifc/IfcFinder/src/ifc-query-group.d.ts +0 -69
- package/dist/ifc/IfcFinder/src/index.d.ts +0 -4
- package/dist/ifc/IfcFinder/src/types.d.ts +0 -84
- package/dist/ifc/IfcIsolator/index.d.ts +0 -24
- package/dist/ifc/IfcJsonExporter/index.d.ts +0 -26
- package/dist/ifc/IfcJsonExporter/src/ifc-geometry-types.d.ts +0 -4
- package/dist/ifc/IfcJsonExporter/src/index.d.ts +0 -1
- package/dist/ifc/IfcPropertiesManager/index.d.ts +0 -289
- package/dist/ifc/IfcPropertiesManager/src/index.d.ts +0 -3
- package/dist/ifc/IfcPropertiesManager/src/rel-attrs.d.ts +0 -7
- package/dist/ifc/IfcPropertiesManager/src/rel-names.d.ts +0 -3
- package/dist/ifc/IfcPropertiesManager/src/types.d.ts +0 -18
- package/dist/ifc/IfcRelationsIndexer/index.d.ts +0 -195
- package/dist/ifc/IfcRelationsIndexer/src/index.d.ts +0 -2
- package/dist/ifc/IfcRelationsIndexer/src/newVersion.d.ts +0 -51
- package/dist/ifc/IfcRelationsIndexer/src/relToAttributesMap.d.ts +0 -5
- package/dist/ifc/IfcRelationsIndexer/src/types.d.ts +0 -73
- package/dist/ifc/Utils/ifc-categories.d.ts +0 -7
- package/dist/ifc/Utils/ifc-category-case.d.ts +0 -3
- package/dist/ifc/Utils/ifc-category-map.d.ts +0 -6
- package/dist/ifc/Utils/ifc-elements-map.d.ts +0 -11
- package/dist/ifc/Utils/index.d.ts +0 -5
- package/dist/ifc/Utils/properties-utils.d.ts +0 -25
- package/dist/ifc/index.d.ts +0 -6
- package/dist/measurement/MeasurementUtils/index.d.ts +0 -105
- package/dist/measurement/index.d.ts +0 -1
- package/dist/namespace.d.ts +0 -6018
- package/dist/openbim/BCFTopics/index.d.ts +0 -114
- package/dist/openbim/BCFTopics/src/Comment.d.ts +0 -40
- package/dist/openbim/BCFTopics/src/Topic.d.ts +0 -127
- package/dist/openbim/BCFTopics/src/bcf-topics-config.d.ts +0 -121
- package/dist/openbim/BCFTopics/src/importers/extensions.d.ts +0 -2
- package/dist/openbim/BCFTopics/src/importers/index.d.ts +0 -1
- package/dist/openbim/BCFTopics/src/index.d.ts +0 -5
- package/dist/openbim/BCFTopics/src/types.d.ts +0 -19
- package/dist/openbim/IDSSpecifications/index.d.ts +0 -60
- package/dist/openbim/IDSSpecifications/src/Specification.d.ts +0 -40
- package/dist/openbim/IDSSpecifications/src/exporters/parameter.d.ts +0 -2
- package/dist/openbim/IDSSpecifications/src/facets/Attribute.d.ts +0 -13
- package/dist/openbim/IDSSpecifications/src/facets/Classification.d.ts +0 -21
- package/dist/openbim/IDSSpecifications/src/facets/Entity.d.ts +0 -15
- package/dist/openbim/IDSSpecifications/src/facets/Facet.d.ts +0 -26
- package/dist/openbim/IDSSpecifications/src/facets/Material.d.ts +0 -10
- package/dist/openbim/IDSSpecifications/src/facets/PartOf.d.ts +0 -26
- package/dist/openbim/IDSSpecifications/src/facets/Property.d.ts +0 -25
- package/dist/openbim/IDSSpecifications/src/facets/index.d.ts +0 -5
- package/dist/openbim/IDSSpecifications/src/importers/attribute.d.ts +0 -3
- package/dist/openbim/IDSSpecifications/src/importers/classification.d.ts +0 -3
- package/dist/openbim/IDSSpecifications/src/importers/entity.d.ts +0 -3
- package/dist/openbim/IDSSpecifications/src/importers/index.d.ts +0 -3
- package/dist/openbim/IDSSpecifications/src/importers/parameter.d.ts +0 -2
- package/dist/openbim/IDSSpecifications/src/importers/property.d.ts +0 -3
- package/dist/openbim/IDSSpecifications/src/index.d.ts +0 -3
- package/dist/openbim/IDSSpecifications/src/types.d.ts +0 -70
- package/dist/openbim/index.d.ts +0 -2
- package/dist/utils/bbox.d.ts +0 -7
- package/dist/utils/geometry.d.ts +0 -1
- package/dist/utils/index.d.ts +0 -6
- package/dist/utils/materials.d.ts +0 -4
- package/dist/utils/section-generator.d.ts +0 -31
- package/dist/utils/uuid.d.ts +0 -6
- package/dist/utils/vertex-picker.d.ts +0 -116
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import * as THREE from "three";
|
|
2
|
-
import * as FRAGS from "@thatopen/fragments";
|
|
3
|
-
import { FragmentsGroup } from "@thatopen/fragments";
|
|
4
|
-
import { Component, Components, Disposable, Event } from "../../core";
|
|
5
|
-
/**
|
|
6
|
-
* A 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](https://docs.thatopen.com/Tutorials/Components/Core/BoundingBoxer). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/BoundingBoxer).
|
|
7
|
-
*/
|
|
8
|
-
export declare class BoundingBoxer extends Component implements Disposable {
|
|
9
|
-
static readonly uuid: "d1444724-dba6-4cdd-a0c7-68ee1450d166";
|
|
10
|
-
/** {@link Component.enabled} */
|
|
11
|
-
enabled: boolean;
|
|
12
|
-
/** {@link Disposable.onDisposed} */
|
|
13
|
-
readonly onDisposed: Event<unknown>;
|
|
14
|
-
private _absoluteMin;
|
|
15
|
-
private _absoluteMax;
|
|
16
|
-
private _meshes;
|
|
17
|
-
constructor(components: Components);
|
|
18
|
-
/**
|
|
19
|
-
* A static method to calculate the dimensions of a given bounding box.
|
|
20
|
-
*
|
|
21
|
-
* @param bbox - The bounding box to calculate the dimensions for.
|
|
22
|
-
* @returns An object containing the width, height, depth, and center of the bounding box.
|
|
23
|
-
*/
|
|
24
|
-
static getDimensions(bbox: THREE.Box3): {
|
|
25
|
-
width: number;
|
|
26
|
-
height: number;
|
|
27
|
-
depth: number;
|
|
28
|
-
center: THREE.Vector3;
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* A static method to create a new bounding box boundary.
|
|
32
|
-
*
|
|
33
|
-
* @param positive - A boolean indicating whether to create a boundary for positive or negative values.
|
|
34
|
-
* @returns A new THREE.Vector3 representing the boundary.
|
|
35
|
-
*
|
|
36
|
-
* @remarks
|
|
37
|
-
* This method is used to create a new boundary for calculating bounding boxes.
|
|
38
|
-
* It sets the x, y, and z components of the returned vector to positive or negative infinity,
|
|
39
|
-
* depending on the value of the `positive` parameter.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```typescript
|
|
43
|
-
* const positiveBound = BoundingBoxer.newBound(true);
|
|
44
|
-
* console.log(positiveBound); // Output: Vector3 { x: Infinity, y: Infinity, z: Infinity }
|
|
45
|
-
*
|
|
46
|
-
* const negativeBound = BoundingBoxer.newBound(false);
|
|
47
|
-
* console.log(negativeBound); // Output: Vector3 { x: -Infinity, y: -Infinity, z: -Infinity }
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
static newBound(positive: boolean): THREE.Vector3;
|
|
51
|
-
/**
|
|
52
|
-
* A static method to calculate the bounding box of a set of points.
|
|
53
|
-
*
|
|
54
|
-
* @param points - An array of THREE.Vector3 representing the points.
|
|
55
|
-
* @param min - An optional THREE.Vector3 representing the minimum bounds. If not provided, it will be calculated.
|
|
56
|
-
* @param max - An optional THREE.Vector3 representing the maximum bounds. If not provided, it will be calculated.
|
|
57
|
-
* @returns A THREE.Box3 representing the bounding box of the given points.
|
|
58
|
-
*
|
|
59
|
-
* @remarks
|
|
60
|
-
* This method calculates the bounding box of a set of points by iterating through each point and updating the minimum and maximum bounds accordingly.
|
|
61
|
-
* If the `min` or `max` parameters are provided, they will be used as the initial bounds. Otherwise, the initial bounds will be set to positive and negative infinity.
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```typescript
|
|
65
|
-
* const points = [
|
|
66
|
-
* new THREE.Vector3(1, 2, 3),
|
|
67
|
-
* new THREE.Vector3(4, 5, 6),
|
|
68
|
-
* new THREE.Vector3(7, 8, 9),
|
|
69
|
-
* ];
|
|
70
|
-
*
|
|
71
|
-
* const bbox = BoundingBoxer.getBounds(points);
|
|
72
|
-
* console.log(bbox); // Output: Box3 { min: Vector3 { x: 1, y: 2, z: 3 }, max: Vector3 { x: 7, y: 8, z: 9 } }
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
static getBounds(points: THREE.Vector3[], min?: THREE.Vector3, max?: THREE.Vector3): THREE.Box3;
|
|
76
|
-
/** {@link Disposable.dispose} */
|
|
77
|
-
dispose(): void;
|
|
78
|
-
/**
|
|
79
|
-
* Returns the bounding box of the calculated fragments.
|
|
80
|
-
*
|
|
81
|
-
* @returns A new THREE.Box3 instance representing the bounding box.
|
|
82
|
-
*
|
|
83
|
-
* @remarks
|
|
84
|
-
* This method clones the internal minimum and maximum vectors and returns a new THREE.Box3 instance.
|
|
85
|
-
* The returned box represents the bounding box of the calculated fragments.
|
|
86
|
-
*
|
|
87
|
-
* @example
|
|
88
|
-
* ```typescript
|
|
89
|
-
* const boundingBox = boundingBoxer.get();
|
|
90
|
-
* console.log(boundingBox); // Output: Box3 { min: Vector3 { x: -10, y: -10, z: -10 }, max: Vector3 { x: 10, y: 10, z: 10 } }
|
|
91
|
-
* ```
|
|
92
|
-
*/
|
|
93
|
-
get(): THREE.Box3;
|
|
94
|
-
/**
|
|
95
|
-
* Calculates and returns a sphere that encompasses the entire bounding box.
|
|
96
|
-
*
|
|
97
|
-
* @returns A new THREE.Sphere instance representing the calculated sphere.
|
|
98
|
-
*
|
|
99
|
-
* @remarks
|
|
100
|
-
* This method calculates the center and radius of a sphere that encompasses the entire bounding box.
|
|
101
|
-
* The center is calculated as the midpoint between the minimum and maximum bounds of the bounding box.
|
|
102
|
-
* The radius is calculated as the distance from the center to the minimum bound.
|
|
103
|
-
*
|
|
104
|
-
* @example
|
|
105
|
-
* ```typescript
|
|
106
|
-
* const boundingBoxer = components.get(BoundingBoxer);
|
|
107
|
-
* boundingBoxer.add(fragmentsGroup);
|
|
108
|
-
* const boundingSphere = boundingBoxer.getSphere();
|
|
109
|
-
* console.log(boundingSphere); // Output: Sphere { center: Vector3 { x: 0, y: 0, z: 0 }, radius: 10 }
|
|
110
|
-
* ```
|
|
111
|
-
*/
|
|
112
|
-
getSphere(): THREE.Sphere;
|
|
113
|
-
/**
|
|
114
|
-
* Returns a THREE.Mesh instance representing the bounding box.
|
|
115
|
-
*
|
|
116
|
-
* @returns A new THREE.Mesh instance representing the bounding box.
|
|
117
|
-
*
|
|
118
|
-
* @remarks
|
|
119
|
-
* This method calculates the dimensions of the bounding box using the `getDimensions` method.
|
|
120
|
-
* It then creates a new THREE.BoxGeometry with the calculated dimensions.
|
|
121
|
-
* A new THREE.Mesh is created using the box geometry, and it is added to the `_meshes` array.
|
|
122
|
-
* The position of the mesh is set to the center of the bounding box.
|
|
123
|
-
*
|
|
124
|
-
* @example
|
|
125
|
-
* ```typescript
|
|
126
|
-
* const boundingBoxer = components.get(BoundingBoxer);
|
|
127
|
-
* boundingBoxer.add(fragmentsGroup);
|
|
128
|
-
* const boundingBoxMesh = boundingBoxer.getMesh();
|
|
129
|
-
* scene.add(boundingBoxMesh);
|
|
130
|
-
* ```
|
|
131
|
-
*/
|
|
132
|
-
getMesh(): THREE.Mesh<THREE.BoxGeometry, THREE.Material | THREE.Material[], THREE.Object3DEventMap>;
|
|
133
|
-
/**
|
|
134
|
-
* Resets the internal minimum and maximum vectors to positive and negative infinity, respectively.
|
|
135
|
-
* This method is used to prepare the BoundingBoxer for a new set of fragments.
|
|
136
|
-
*
|
|
137
|
-
* @remarks
|
|
138
|
-
* This method is called when a new set of fragments is added to the BoundingBoxer.
|
|
139
|
-
* It ensures that the bounding box calculations are accurate and up-to-date.
|
|
140
|
-
*
|
|
141
|
-
* @example
|
|
142
|
-
* ```typescript
|
|
143
|
-
* const boundingBoxer = components.get(BoundingBoxer);
|
|
144
|
-
* boundingBoxer.add(fragmentsGroup);
|
|
145
|
-
* // ...
|
|
146
|
-
* boundingBoxer.reset();
|
|
147
|
-
* ```
|
|
148
|
-
*/
|
|
149
|
-
reset(): void;
|
|
150
|
-
/**
|
|
151
|
-
* Adds a FragmentsGroup to the BoundingBoxer.
|
|
152
|
-
*
|
|
153
|
-
* @param group - The FragmentsGroup to add.
|
|
154
|
-
*
|
|
155
|
-
* @remarks
|
|
156
|
-
* This method iterates through each fragment in the provided FragmentsGroup,
|
|
157
|
-
* and calls the `addMesh` method for each fragment's mesh.
|
|
158
|
-
*
|
|
159
|
-
* @example
|
|
160
|
-
* ```typescript
|
|
161
|
-
* const boundingBoxer = components.get(BoundingBoxer);
|
|
162
|
-
* boundingBoxer.add(fragmentsGroup);
|
|
163
|
-
* ```
|
|
164
|
-
*/
|
|
165
|
-
add(group: FragmentsGroup): void;
|
|
166
|
-
/**
|
|
167
|
-
* Adds a mesh to the BoundingBoxer and calculates the bounding box.
|
|
168
|
-
*
|
|
169
|
-
* @param mesh - The mesh to add. It can be an instance of THREE.InstancedMesh, THREE.Mesh, or FRAGS.CurveMesh.
|
|
170
|
-
* @param itemIDs - An optional iterable of numbers representing the item IDs.
|
|
171
|
-
*
|
|
172
|
-
* @remarks
|
|
173
|
-
* This method calculates the bounding box of the provided mesh and updates the internal minimum and maximum vectors.
|
|
174
|
-
* If the mesh is an instance of THREE.InstancedMesh, it calculates the bounding box for each instance.
|
|
175
|
-
* If the mesh is an instance of FRAGS.FragmentMesh and itemIDs are provided, it calculates the bounding box for the specified item IDs.
|
|
176
|
-
*
|
|
177
|
-
* @example
|
|
178
|
-
* ```typescript
|
|
179
|
-
* const boundingBoxer = components.get(BoundingBoxer);
|
|
180
|
-
* boundingBoxer.addMesh(mesh);
|
|
181
|
-
* ```
|
|
182
|
-
*/
|
|
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;
|
|
207
|
-
private static getFragmentBounds;
|
|
208
|
-
}
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
import * as THREE from "three";
|
|
2
|
-
import * as FRAGS from "@thatopen/fragments";
|
|
3
|
-
import { Disposable, Component, Event, Components } from "../../core";
|
|
4
|
-
/**
|
|
5
|
-
* Interface 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.
|
|
6
|
-
*/
|
|
7
|
-
export interface Classification {
|
|
8
|
-
/**
|
|
9
|
-
* A system within the classification.
|
|
10
|
-
* The key is the system name, and the value is an object representing the classes within the system.
|
|
11
|
-
*/
|
|
12
|
-
[system: string]: {
|
|
13
|
-
/**
|
|
14
|
-
* A class within the system.
|
|
15
|
-
* The key is the class name, and the value is an object containing a map of fragment IDs with extra information.
|
|
16
|
-
*/
|
|
17
|
-
[groupName: string]: {
|
|
18
|
-
map: FRAGS.FragmentIdMap;
|
|
19
|
-
name: string;
|
|
20
|
-
id: number | null;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
interface ExportedClassification {
|
|
25
|
-
[system: string]: {
|
|
26
|
-
[groupName: string]: {
|
|
27
|
-
map: {
|
|
28
|
-
[name: string]: number[];
|
|
29
|
-
};
|
|
30
|
-
name: string;
|
|
31
|
-
id: number | null;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* The 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](https://docs.thatopen.com/Tutorials/Components/Core/Classifier). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/Classifier).
|
|
37
|
-
*/
|
|
38
|
-
export declare class Classifier extends Component implements Disposable {
|
|
39
|
-
/**
|
|
40
|
-
* A unique identifier for the component.
|
|
41
|
-
* This UUID is used to register the component within the Components system.
|
|
42
|
-
*/
|
|
43
|
-
static readonly uuid: "e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7";
|
|
44
|
-
/** {@link Component.enabled} */
|
|
45
|
-
enabled: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* A map representing the classification systems.
|
|
48
|
-
* The key is the system name, and the value is an object representing the classes within the system.
|
|
49
|
-
*/
|
|
50
|
-
list: Classification;
|
|
51
|
-
/** {@link Disposable.onDisposed} */
|
|
52
|
-
readonly onDisposed: Event<unknown>;
|
|
53
|
-
constructor(components: Components);
|
|
54
|
-
private onFragmentsDisposed;
|
|
55
|
-
/** {@link Disposable.dispose} */
|
|
56
|
-
dispose(): void;
|
|
57
|
-
/**
|
|
58
|
-
* Removes a fragment from the classification based on its unique identifier (guid).
|
|
59
|
-
* This method iterates through all classification systems and classes, and deletes the fragment with the specified guid from the respective group.
|
|
60
|
-
*
|
|
61
|
-
* @param guid - The unique identifier of the fragment to be removed.
|
|
62
|
-
*/
|
|
63
|
-
remove(guid: string): void;
|
|
64
|
-
/**
|
|
65
|
-
* Finds and returns fragments based on the provided filter criteria.
|
|
66
|
-
* If no filter is provided, it returns all fragments.
|
|
67
|
-
*
|
|
68
|
-
* @param filter - An optional object containing filter criteria.
|
|
69
|
-
* The keys of the object represent the classification system names,
|
|
70
|
-
* and the values are arrays of class names to match.
|
|
71
|
-
*
|
|
72
|
-
* @returns A map of fragment GUIDs to their respective express IDs,
|
|
73
|
-
* where the express IDs are filtered based on the provided filter criteria.
|
|
74
|
-
*
|
|
75
|
-
* @throws Will throw an error if the fragments map is malformed.
|
|
76
|
-
*/
|
|
77
|
-
find(filter?: {
|
|
78
|
-
[name: string]: string[];
|
|
79
|
-
}): FRAGS.FragmentIdMap;
|
|
80
|
-
/**
|
|
81
|
-
* Classifies fragments based on their modelID.
|
|
82
|
-
*
|
|
83
|
-
* @param modelID - The unique identifier of the model to classify fragments by.
|
|
84
|
-
* @param group - The FragmentsGroup containing the fragments to be classified.
|
|
85
|
-
*
|
|
86
|
-
* @remarks
|
|
87
|
-
* This method iterates through the fragments in the provided group,
|
|
88
|
-
* and classifies them based on their modelID.
|
|
89
|
-
* The classification is stored in the `list.models` property,
|
|
90
|
-
* with the modelID as the key and a map of fragment IDs to their respective express IDs as the value.
|
|
91
|
-
*
|
|
92
|
-
*/
|
|
93
|
-
byModel(modelID: string, group: FRAGS.FragmentsGroup): void;
|
|
94
|
-
/**
|
|
95
|
-
* Classifies fragments based on their PredefinedType property.
|
|
96
|
-
*
|
|
97
|
-
* @param group - The FragmentsGroup containing the fragments to be classified.
|
|
98
|
-
*
|
|
99
|
-
* @remarks
|
|
100
|
-
* This method iterates through the properties of the fragments in the provided group,
|
|
101
|
-
* and classifies them based on their PredefinedType property.
|
|
102
|
-
* The classification is stored in the `list.predefinedTypes` property,
|
|
103
|
-
* with the PredefinedType as the key and a map of fragment IDs to their respective express IDs as the value.
|
|
104
|
-
*
|
|
105
|
-
* @throws Will throw an error if the fragment ID is not found.
|
|
106
|
-
*/
|
|
107
|
-
byPredefinedType(group: FRAGS.FragmentsGroup): Promise<void>;
|
|
108
|
-
/**
|
|
109
|
-
* Classifies fragments based on their entity type.
|
|
110
|
-
*
|
|
111
|
-
* @param group - The FragmentsGroup containing the fragments to be classified.
|
|
112
|
-
*
|
|
113
|
-
* @remarks
|
|
114
|
-
* This method iterates through the relations of the fragments in the provided group,
|
|
115
|
-
* and classifies them based on their entity type.
|
|
116
|
-
* The classification is stored in the `list.entities` property,
|
|
117
|
-
* with the entity type as the key and a map of fragment IDs to their respective express IDs as the value.
|
|
118
|
-
*
|
|
119
|
-
* @throws Will throw an error if the fragment ID is not found.
|
|
120
|
-
*/
|
|
121
|
-
byEntity(group: FRAGS.FragmentsGroup): void;
|
|
122
|
-
/**
|
|
123
|
-
* Classifies fragments based on a specific IFC relationship.
|
|
124
|
-
*
|
|
125
|
-
* @param group - The FragmentsGroup containing the fragments to be classified.
|
|
126
|
-
* @param ifcRel - The IFC relationship number to classify fragments by.
|
|
127
|
-
* @param systemName - The name of the classification system to store the classification.
|
|
128
|
-
*
|
|
129
|
-
* @remarks
|
|
130
|
-
* This method iterates through the relations of the fragments in the provided group,
|
|
131
|
-
* and classifies them based on the specified IFC relationship.
|
|
132
|
-
* The classification is stored in the `list` property under the specified system name,
|
|
133
|
-
* with the relationship name as the class name and a map of fragment IDs to their respective express IDs as the value.
|
|
134
|
-
*
|
|
135
|
-
* @throws Will throw an error if the fragment ID is not found or if the IFC relationship is not valid.
|
|
136
|
-
*/
|
|
137
|
-
byIfcRel(group: FRAGS.FragmentsGroup, ifcRel: number, systemName: string): Promise<void>;
|
|
138
|
-
/**
|
|
139
|
-
* Classifies fragments based on their spatial structure in the IFC model.
|
|
140
|
-
*
|
|
141
|
-
* @param model - The FragmentsGroup containing the fragments to be classified.
|
|
142
|
-
* @param config - The configuration for the classifier. It includes "useProperties", which is true by default
|
|
143
|
-
* (if false, the classification will use the expressIDs instead of the names), and "isolate", which will make
|
|
144
|
-
* the classifier just pick the WEBIFC categories provided.
|
|
145
|
-
*
|
|
146
|
-
* @remarks
|
|
147
|
-
* This method iterates through the relations of the fragments in the provided group,
|
|
148
|
-
* and classifies them based on their spatial structure in the IFC model.
|
|
149
|
-
* The classification is stored in the `list` property under the system name "spatialStructures",
|
|
150
|
-
* with the relationship name as the class name and a map of fragment IDs to their respective express IDs as the value.
|
|
151
|
-
*
|
|
152
|
-
* @throws Will throw an error if the fragment ID is not found or if the model relations do not exist.
|
|
153
|
-
*/
|
|
154
|
-
bySpatialStructure(model: FRAGS.FragmentsGroup, config?: {
|
|
155
|
-
useProperties?: boolean;
|
|
156
|
-
isolate?: Set<number>;
|
|
157
|
-
systemName?: string;
|
|
158
|
-
}): Promise<void>;
|
|
159
|
-
/**
|
|
160
|
-
* Sets the color of the specified fragments.
|
|
161
|
-
*
|
|
162
|
-
* @param items - A map of fragment IDs to their respective express IDs.
|
|
163
|
-
* @param color - The color to set for the fragments.
|
|
164
|
-
* @param override - A boolean indicating whether to override the existing color of the fragments.
|
|
165
|
-
*
|
|
166
|
-
* @remarks
|
|
167
|
-
* This method iterates through the provided fragment IDs, retrieves the corresponding fragments,
|
|
168
|
-
* and sets their color using the `setColor` method of the FragmentsGroup class.
|
|
169
|
-
*
|
|
170
|
-
* @throws Will throw an error if the fragment with the specified ID is not found.
|
|
171
|
-
*/
|
|
172
|
-
setColor(items: FRAGS.FragmentIdMap, color: THREE.Color, override?: boolean): void;
|
|
173
|
-
/**
|
|
174
|
-
* Resets the color of the specified fragments to their original color.
|
|
175
|
-
*
|
|
176
|
-
* @param items - A map of fragment IDs to their respective express IDs.
|
|
177
|
-
*
|
|
178
|
-
* @remarks
|
|
179
|
-
* This method iterates through the provided fragment IDs, retrieves the corresponding fragments,
|
|
180
|
-
* and resets their color using the `resetColor` method of the FragmentsGroup class.
|
|
181
|
-
*
|
|
182
|
-
* @throws Will throw an error if the fragment with the specified ID is not found.
|
|
183
|
-
*/
|
|
184
|
-
resetColor(items: FRAGS.FragmentIdMap): void;
|
|
185
|
-
/**
|
|
186
|
-
* Exports the computed classification to persists them and import them back
|
|
187
|
-
* later for faster loading.
|
|
188
|
-
*/
|
|
189
|
-
export(): ExportedClassification;
|
|
190
|
-
/**
|
|
191
|
-
* Imports a classification previously exported with .export().
|
|
192
|
-
* @param data the serialized classification to import.
|
|
193
|
-
*/
|
|
194
|
-
import(data: ExportedClassification): void;
|
|
195
|
-
protected saveItem(group: FRAGS.FragmentsGroup, systemName: string, className: string, expressID: number, parentID?: number | null): void;
|
|
196
|
-
}
|
|
197
|
-
export {};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Component, Disposable, Event, Components } from "../../core";
|
|
2
|
-
/**
|
|
3
|
-
* The Exploder component is responsible for managing the explosion of 3D model fragments (generally by floor). 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/Exploder). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/Exploder).
|
|
4
|
-
*/
|
|
5
|
-
export declare class Exploder extends Component implements Disposable {
|
|
6
|
-
/**
|
|
7
|
-
* A unique identifier for the component.
|
|
8
|
-
* This UUID is used to register the component within the Components system.
|
|
9
|
-
*/
|
|
10
|
-
static readonly uuid: "d260618b-ce88-4c7d-826c-6debb91de3e2";
|
|
11
|
-
/** {@link Disposable.onDisposed} */
|
|
12
|
-
readonly onDisposed: Event<unknown>;
|
|
13
|
-
/** {@link Component.enabled} */
|
|
14
|
-
enabled: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* The height of the explosion animation.
|
|
17
|
-
* This property determines the vertical distance by which fragments are moved during the explosion.
|
|
18
|
-
* Default value is 10.
|
|
19
|
-
*/
|
|
20
|
-
height: number;
|
|
21
|
-
/**
|
|
22
|
-
* The group name used for the explosion animation.
|
|
23
|
-
* This property specifies the group of fragments that will be affected by the explosion.
|
|
24
|
-
* Default value is "storeys".
|
|
25
|
-
*/
|
|
26
|
-
groupName: string;
|
|
27
|
-
/**
|
|
28
|
-
* A set of strings representing the exploded items.
|
|
29
|
-
* This set is used to keep track of which items have been exploded.
|
|
30
|
-
*/
|
|
31
|
-
list: Set<string>;
|
|
32
|
-
constructor(components: Components);
|
|
33
|
-
/** {@link Disposable.dispose} */
|
|
34
|
-
dispose(): void;
|
|
35
|
-
/**
|
|
36
|
-
* Sets the explosion state of the fragments.
|
|
37
|
-
*
|
|
38
|
-
* @param active - A boolean indicating whether to activate or deactivate the explosion.
|
|
39
|
-
*
|
|
40
|
-
* @remarks
|
|
41
|
-
* This method applies a vertical transformation to the fragments based on the `active` parameter.
|
|
42
|
-
* If `active` is true, the fragments are moved upwards by a distance determined by the `height` property.
|
|
43
|
-
* If `active` is false, the fragments are moved back to their original position.
|
|
44
|
-
*
|
|
45
|
-
* The method also keeps track of the exploded items using the `list` set.
|
|
46
|
-
*
|
|
47
|
-
* @throws Will throw an error if the `Classifier` or `FragmentsManager` components are not found in the `components` system.
|
|
48
|
-
*/
|
|
49
|
-
set(active: boolean): void;
|
|
50
|
-
}
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { Fragment, FragmentsGroup } from "@thatopen/fragments";
|
|
2
|
-
import * as THREE from "three";
|
|
3
|
-
import * as FRAGS from "@thatopen/fragments";
|
|
4
|
-
import { Component, Components, Event, Disposable, DataMap } from "../../core";
|
|
5
|
-
import { RelationsMap } from "../../ifc/IfcRelationsIndexer/src/types";
|
|
6
|
-
/**
|
|
7
|
-
* Component to load, delete and manage [fragments](https://github.com/ThatOpen/engine_fragment) efficiently. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/FragmentsManager). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/FragmentsManager).
|
|
8
|
-
*/
|
|
9
|
-
export declare class FragmentsManager extends Component implements Disposable {
|
|
10
|
-
/**
|
|
11
|
-
* A unique identifier for the component.
|
|
12
|
-
* This UUID is used to register the component within the Components system.
|
|
13
|
-
*/
|
|
14
|
-
static readonly uuid: "fef46874-46a3-461b-8c44-2922ab77c806";
|
|
15
|
-
/** {@link Disposable.onDisposed} */
|
|
16
|
-
readonly onDisposed: Event<unknown>;
|
|
17
|
-
/**
|
|
18
|
-
* Event triggered when fragments are loaded.
|
|
19
|
-
*/
|
|
20
|
-
readonly onFragmentsLoaded: Event<FragmentsGroup>;
|
|
21
|
-
/**
|
|
22
|
-
* Event triggered when fragments are disposed.
|
|
23
|
-
*/
|
|
24
|
-
readonly onFragmentsDisposed: Event<{
|
|
25
|
-
groupID: string;
|
|
26
|
-
fragmentIDs: string[];
|
|
27
|
-
}>;
|
|
28
|
-
/**
|
|
29
|
-
* DataMap containing all loaded fragments.
|
|
30
|
-
* The key is the fragment's unique identifier, and the value is the fragment itself.
|
|
31
|
-
*/
|
|
32
|
-
readonly list: DataMap<string, Fragment>;
|
|
33
|
-
/**
|
|
34
|
-
* DataMap containing all loaded fragment groups.
|
|
35
|
-
* The key is the group's unique identifier, and the value is the group itself.
|
|
36
|
-
*/
|
|
37
|
-
readonly groups: DataMap<string, FragmentsGroup>;
|
|
38
|
-
baseCoordinationModel: string;
|
|
39
|
-
baseCoordinationMatrix: THREE.Matrix4;
|
|
40
|
-
/** {@link Component.enabled} */
|
|
41
|
-
enabled: boolean;
|
|
42
|
-
private _loader;
|
|
43
|
-
/**
|
|
44
|
-
* Getter for the meshes of all fragments in the FragmentsManager.
|
|
45
|
-
* It iterates over the fragments in the list and pushes their meshes into an array.
|
|
46
|
-
* @returns {THREE.Mesh[]} An array of THREE.Mesh objects representing the fragments.
|
|
47
|
-
*/
|
|
48
|
-
get meshes(): THREE.Mesh<THREE.BufferGeometry<THREE.NormalBufferAttributes>, THREE.Material | THREE.Material[], THREE.Object3DEventMap>[];
|
|
49
|
-
constructor(components: Components);
|
|
50
|
-
/** {@link Disposable.dispose} */
|
|
51
|
-
dispose(): void;
|
|
52
|
-
/**
|
|
53
|
-
* Dispose of a specific fragment group.
|
|
54
|
-
* This method removes the group from the groups map, deletes all fragments within the group from the list,
|
|
55
|
-
* disposes of the group, and triggers the onFragmentsDisposed event.
|
|
56
|
-
*
|
|
57
|
-
* @param group - The fragment group to be disposed.
|
|
58
|
-
*/
|
|
59
|
-
disposeGroup(group: FragmentsGroup): void;
|
|
60
|
-
/**
|
|
61
|
-
* Loads a binary file that contain fragment geometry.
|
|
62
|
-
* @param data - The binary data to load.
|
|
63
|
-
* @param config - Optional configuration for loading.
|
|
64
|
-
* @param config.isStreamed - Optional setting to determine whether this model is streamed or not.
|
|
65
|
-
* @param config.coordinate - Whether to apply coordinate transformation. Default is true.
|
|
66
|
-
* @param config.properties - Ifc properties to set on the loaded fragments. Not to be used when streaming.
|
|
67
|
-
* @returns The loaded FragmentsGroup.
|
|
68
|
-
*/
|
|
69
|
-
load(data: Uint8Array, config?: Partial<{
|
|
70
|
-
coordinate: boolean;
|
|
71
|
-
name: string;
|
|
72
|
-
properties: FRAGS.IfcProperties;
|
|
73
|
-
relationsMap: RelationsMap;
|
|
74
|
-
isStreamed?: boolean;
|
|
75
|
-
}>): FragmentsGroup;
|
|
76
|
-
/**
|
|
77
|
-
* Export the specified fragmentsgroup to binary data.
|
|
78
|
-
* @param group - the fragments group to be exported.
|
|
79
|
-
* @returns the exported data as binary buffer.
|
|
80
|
-
*/
|
|
81
|
-
export(group: FragmentsGroup): Uint8Array;
|
|
82
|
-
/**
|
|
83
|
-
* Gets a map of model IDs to sets of express IDs for the given fragment ID map.
|
|
84
|
-
* @param fragmentIdMap - A map of fragment IDs to their corresponding express IDs.
|
|
85
|
-
* @returns A map of model IDs to sets of express IDs.
|
|
86
|
-
*/
|
|
87
|
-
getModelIdMap(fragmentIdMap: FRAGS.FragmentIdMap): {
|
|
88
|
-
[modelID: string]: Set<number>;
|
|
89
|
-
};
|
|
90
|
-
/**
|
|
91
|
-
* Converts a map of model IDs to sets of express IDs to a fragment ID map.
|
|
92
|
-
* @param modelIdMap - A map of model IDs to their corresponding express IDs.
|
|
93
|
-
* @returns A fragment ID map.
|
|
94
|
-
* @remarks
|
|
95
|
-
* This method iterates through the provided model ID map, retrieves the corresponding model from the `groups` map,
|
|
96
|
-
* and then calls the `getFragmentMap` method of the model to obtain a fragment ID map for the given express IDs.
|
|
97
|
-
* The fragment ID maps are then merged into a single map and returned.
|
|
98
|
-
* If a model with a given ID is not found in the `groups` map, the method skips that model and continues with the next one.
|
|
99
|
-
*/
|
|
100
|
-
modelIdToFragmentIdMap(modelIdMap: {
|
|
101
|
-
[modelID: string]: Set<number>;
|
|
102
|
-
}): FRAGS.FragmentIdMap;
|
|
103
|
-
/**
|
|
104
|
-
* Converts a collection of IFC GUIDs to a fragmentIdMap.
|
|
105
|
-
*
|
|
106
|
-
* @param guids - An iterable collection of global IDs to be converted to a fragment ID map.
|
|
107
|
-
*
|
|
108
|
-
* @returns A fragment ID map, where the keys are fragment IDs and the values are the corresponding express IDs.
|
|
109
|
-
*/
|
|
110
|
-
guidToFragmentIdMap(guids: Iterable<string>): FRAGS.FragmentIdMap;
|
|
111
|
-
/**
|
|
112
|
-
* Converts a fragment ID map to a collection of IFC GUIDs.
|
|
113
|
-
*
|
|
114
|
-
* @param fragmentIdMap - A fragment ID map to be converted to a collection of IFC GUIDs.
|
|
115
|
-
*
|
|
116
|
-
* @returns An array of IFC GUIDs.
|
|
117
|
-
*/
|
|
118
|
-
fragmentIdMapToGuids(fragmentIdMap: FRAGS.FragmentIdMap): string[];
|
|
119
|
-
/**
|
|
120
|
-
* Applies coordinate transformation to the provided models.
|
|
121
|
-
* If no models are provided, all groups are used.
|
|
122
|
-
* The first model in the list becomes the base model for coordinate transformation.
|
|
123
|
-
* All other models are then transformed to match the base model's coordinate system.
|
|
124
|
-
*
|
|
125
|
-
* @param models - The models to apply coordinate transformation to.
|
|
126
|
-
* If not provided, all models are used.
|
|
127
|
-
*/
|
|
128
|
-
coordinate(models?: FragmentsGroup[]): void;
|
|
129
|
-
/**
|
|
130
|
-
* Applies the base coordinate system to the provided object.
|
|
131
|
-
*
|
|
132
|
-
* This function takes an object and its original coordinate system as input.
|
|
133
|
-
* It then inverts the original coordinate system and applies the base coordinate system
|
|
134
|
-
* to the object. This ensures that the object's position, rotation, and scale are
|
|
135
|
-
* transformed to match the base coordinate system (which is taken from the first model loaded).
|
|
136
|
-
*
|
|
137
|
-
* @param object - The object to which the base coordinate system will be applied.
|
|
138
|
-
* This should be an instance of THREE.Object3D.
|
|
139
|
-
*
|
|
140
|
-
* @param originalCoordinateSystem - The original coordinate system of the object.
|
|
141
|
-
* This should be a THREE.Matrix4 representing the object's transformation matrix.
|
|
142
|
-
*/
|
|
143
|
-
applyBaseCoordinateSystem(object: THREE.Object3D | THREE.Vector3, originalCoordinateSystem?: THREE.Matrix4): void;
|
|
144
|
-
/**
|
|
145
|
-
* Creates a copy of the whole model or a part of it.
|
|
146
|
-
*
|
|
147
|
-
* @param model - The model to clone.
|
|
148
|
-
* @param items - Optional - The part of the model to be cloned. If not given, the whole group is cloned.
|
|
149
|
-
*
|
|
150
|
-
*/
|
|
151
|
-
clone(model: FRAGS.FragmentsGroup, items?: FRAGS.FragmentIdMap): FragmentsGroup;
|
|
152
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import * as FRAGS from "@thatopen/fragments";
|
|
2
|
-
import { Components, Component } from "../../core";
|
|
3
|
-
/**
|
|
4
|
-
* A 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](https://docs.thatopen.com/Tutorials/Components/Core/Hider). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/Hider).
|
|
5
|
-
*/
|
|
6
|
-
export declare class Hider extends Component {
|
|
7
|
-
/**
|
|
8
|
-
* A unique identifier for the component.
|
|
9
|
-
* This UUID is used to register the component within the Components system.
|
|
10
|
-
*/
|
|
11
|
-
static readonly uuid: "dd9ccf2d-8a21-4821-b7f6-2949add16a29";
|
|
12
|
-
/** {@link Component.enabled} */
|
|
13
|
-
enabled: boolean;
|
|
14
|
-
constructor(components: Components);
|
|
15
|
-
/**
|
|
16
|
-
* Sets the visibility of fragments within the 3D scene.
|
|
17
|
-
* If no `items` parameter is provided, all fragments will be set to the specified visibility.
|
|
18
|
-
* If `items` is provided, only the specified fragments will be affected.
|
|
19
|
-
*
|
|
20
|
-
* @param visible - The visibility state to set for the fragments.
|
|
21
|
-
* @param items - An optional map of fragment IDs and their corresponding sub-fragment IDs to be affected.
|
|
22
|
-
* If not provided, all fragments will be affected.
|
|
23
|
-
*
|
|
24
|
-
* @returns {void}
|
|
25
|
-
*/
|
|
26
|
-
set(visible: boolean, items?: FRAGS.FragmentIdMap): void;
|
|
27
|
-
/**
|
|
28
|
-
* Isolates fragments within the 3D scene by hiding all other fragments and showing only the specified ones.
|
|
29
|
-
* It calls the `set` method twice: first to hide all fragments, and then to show only the specified ones.
|
|
30
|
-
*
|
|
31
|
-
* @param items - A map of fragment IDs and their corresponding sub-fragment IDs to be isolated.
|
|
32
|
-
* If not provided, all fragments will be isolated.
|
|
33
|
-
*
|
|
34
|
-
* @returns {void}
|
|
35
|
-
*/
|
|
36
|
-
isolate(items: FRAGS.FragmentIdMap): void;
|
|
37
|
-
private updateCulledVisibility;
|
|
38
|
-
}
|