@thatopen/components 2.0.11 → 2.0.12

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.
Files changed (50) hide show
  1. package/dist/core/Clipper/index.d.ts +1 -1
  2. package/dist/core/Clipper/src/simple-plane.d.ts +16 -16
  3. package/dist/core/Components/index.d.ts +2 -2
  4. package/dist/core/Cullers/index.d.ts +3 -3
  5. package/dist/core/Cullers/src/culler-renderer.d.ts +1 -1
  6. package/dist/core/Cullers/src/mesh-culler-renderer.d.ts +6 -6
  7. package/dist/core/Disposer/index.d.ts +1 -1
  8. package/dist/core/Grids/index.d.ts +10 -9
  9. package/dist/core/Grids/src/simple-grid.d.ts +16 -4
  10. package/dist/core/MiniMap/index.d.ts +20 -19
  11. package/dist/core/MiniMap/src/index.d.ts +16 -16
  12. package/dist/core/OrthoPerspectiveCamera/index.d.ts +8 -8
  13. package/dist/core/Raycasters/index.d.ts +2 -1
  14. package/dist/core/Raycasters/src/mouse.d.ts +1 -4
  15. package/dist/core/Raycasters/src/simple-raycaster.d.ts +9 -11
  16. package/dist/core/Types/src/base-camera.d.ts +1 -1
  17. package/dist/core/Types/src/base-renderer.d.ts +19 -19
  18. package/dist/core/Types/src/base-scene.d.ts +3 -3
  19. package/dist/core/Worlds/index.d.ts +15 -15
  20. package/dist/core/Worlds/src/simple-camera.d.ts +1 -1
  21. package/dist/core/Worlds/src/simple-scene.d.ts +3 -3
  22. package/dist/fragments/BoundingBoxer/index.d.ts +151 -1
  23. package/dist/fragments/Classifier/index.d.ts +133 -0
  24. package/dist/fragments/Exploder/index.d.ts +39 -2
  25. package/dist/fragments/FragmentsManager/index.d.ts +45 -6
  26. package/dist/fragments/Hider/index.d.ts +28 -0
  27. package/dist/fragments/IfcGeometryTiler/index.d.ts +62 -4
  28. package/dist/fragments/IfcGeometryTiler/src/base-types.d.ts +14 -0
  29. package/dist/fragments/IfcGeometryTiler/src/index.d.ts +0 -1
  30. package/dist/fragments/IfcGeometryTiler/src/streaming-settings.d.ts +11 -5
  31. package/dist/fragments/IfcLoader/index.d.ts +89 -4
  32. package/dist/fragments/IfcLoader/src/ifc-fragment-settings.d.ts +14 -0
  33. package/dist/fragments/IfcPropertiesTiler/index.d.ts +44 -4
  34. package/dist/fragments/IfcPropertiesTiler/src/index.d.ts +1 -0
  35. package/dist/fragments/IfcPropertiesTiler/src/streaming-settings.d.ts +11 -0
  36. package/dist/ifc/IfcJsonExporter/index.d.ts +7 -2
  37. package/dist/ifc/IfcJsonExporter/src/ifc-geometry-types.d.ts +3 -0
  38. package/dist/ifc/IfcJsonExporter/src/index.d.ts +1 -0
  39. package/dist/ifc/IfcPropertiesManager/index.d.ts +195 -11
  40. package/dist/ifc/IfcRelationsIndexer/index.d.ts +20 -11
  41. package/dist/ifc/Utils/ifc-category-map.d.ts +3 -0
  42. package/dist/ifc/Utils/ifc-elements-map.d.ts +8 -0
  43. package/dist/index.cjs +5 -5
  44. package/dist/index.mjs +3564 -2892
  45. package/dist/measurement/MeasurementUtils/index.d.ts +76 -0
  46. package/dist/measurement/index.d.ts +1 -1
  47. package/dist/namespace.d.ts +2578 -1722
  48. package/package.json +1 -1
  49. package/dist/fragments/IfcGeometryTiler/src/fragment-props-stream-converter.d.ts +0 -27
  50. package/dist/measurement/Utils/index.d.ts +0 -24
@@ -0,0 +1,76 @@
1
+ import * as THREE from "three";
2
+ import { Component, Components } from "../../core";
3
+ /**
4
+ * Represents an edge measurement result.
5
+ */
6
+ export interface MeasureEdge {
7
+ /**
8
+ * The distance between the two points of the edge.
9
+ */
10
+ distance: number;
11
+ /**
12
+ * The two points that define the edge.
13
+ */
14
+ points: THREE.Vector3[];
15
+ }
16
+ /**
17
+ * Utility component for performing measurements on 3D meshes by providing methods for measuring distances between edges and faces. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/MeasurementUtils). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/MeasurementUtils).
18
+ */
19
+ export declare class MeasurementUtils extends Component {
20
+ /**
21
+ * A unique identifier for the component.
22
+ * This UUID is used to register the component within the Components system.
23
+ */
24
+ static uuid: string;
25
+ /** {@link Component.enabled} */
26
+ enabled: boolean;
27
+ constructor(components: Components);
28
+ /**
29
+ * Utility method to calculate the distance from a point to a line segment.
30
+ *
31
+ * @param point - The point from which to calculate the distance.
32
+ * @param lineStart - The start point of the line segment.
33
+ * @param lineEnd - The end point of the line segment.
34
+ * @param clamp - If true, the distance will be clamped to the line segment's length.
35
+ * @returns The distance from the point to the line segment.
36
+ */
37
+ static distanceFromPointToLine(point: THREE.Vector3, lineStart: THREE.Vector3, lineEnd: THREE.Vector3, clamp?: boolean): number;
38
+ /**
39
+ * Method to get the face of a mesh that contains a given triangle index.
40
+ * It also returns the edges of the found face and their indices.
41
+ *
42
+ * @param mesh - The mesh to get the face from. It must be indexed.
43
+ * @param triangleIndex - The index of the triangle within the mesh.
44
+ * @param instance - The instance of the mesh (optional).
45
+ * @returns An object containing the edges of the found face and their indices, or null if no face was found.
46
+ */
47
+ getFace(mesh: THREE.InstancedMesh | THREE.Mesh, triangleIndex: number, instance?: number): {
48
+ edges: MeasureEdge[];
49
+ indices: Set<number>;
50
+ } | null;
51
+ /**
52
+ * Method to get the vertices and normal of a mesh face at a given index.
53
+ * It also applies instance transformation if provided.
54
+ *
55
+ * @param mesh - The mesh to get the face from. It must be indexed.
56
+ * @param faceIndex - The index of the face within the mesh.
57
+ * @param instance - The instance of the mesh (optional).
58
+ * @returns An object containing the vertices and normal of the face.
59
+ * @throws Will throw an error if the geometry is not indexed.
60
+ */
61
+ getVerticesAndNormal(mesh: THREE.Mesh | THREE.InstancedMesh, faceIndex: number, instance: number | undefined): {
62
+ p1: THREE.Vector3;
63
+ p2: THREE.Vector3;
64
+ p3: THREE.Vector3;
65
+ faceNormal: THREE.Vector3;
66
+ };
67
+ /**
68
+ * Method to round the vector's components to a specified number of decimal places.
69
+ * This is used to ensure numerical precision in edge detection.
70
+ *
71
+ * @param vector - The vector to round.
72
+ * @returns The vector with rounded components.
73
+ */
74
+ round(vector: THREE.Vector3): void;
75
+ private getFaceData;
76
+ }
@@ -1 +1 @@
1
- export * from "./Utils";
1
+ export * from "./MeasurementUtils";