@procore/bim-webviewer-sdk 16.6.0-rc.7 → 16.6.0-rc.8

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/CHANGELOG.md CHANGED
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
17
17
  - ([#866](https://github.com/procore/bim-webviewer/pull/1377)) [Internal][QA Ignore]Change fetchArray buffer to fetchData and add README file in pwfreader
18
18
  - ([#1386](https://github.com/procore/bim-webviewer/pull/1386)) The Shortest Distance Measurement tool's cursor tooltip now displays "Select first object" then "Select second object" rather than just "Select two objects". This is to match behavior with the new Point to Point Measurement tool.
19
19
  - ([#1382](https://github.com/procore/bim-webviewer/pull/1382)) [Breaking Change]Refactoring global offset to a type of vector3 and SDK method name change from `getGlobalOffset` to `getGlobalOffsetDoNotUse` to avoid 3rd party use.
20
+ - ([#1388](https://github.com/procore/bim-webviewer/pull/1388)) Escape key, when pressed, will now reset measurements that are either in progress or have been completed. If the measurement is enabled and in the initial state, pressing escape will disable the measurement tool.
20
21
  - ([#1379](https://github.com/procore/bim-webviewer/pull/1379)) Fix the point to point crosshair size to 40px and align in the center.
21
22
 
22
23
  ## [16.5.0] 2024-11-08
@@ -609,11 +609,19 @@ declare type Manifest_2 = {
609
609
  numPartitions: number;
610
610
  };
611
611
 
612
+ declare const MEASUREMENT_STATE: {
613
+ readonly initial: "initial";
614
+ readonly inProgress: "inProgress";
615
+ readonly completed: "completed";
616
+ };
617
+
612
618
  declare interface MeasurementInterface {
613
619
  setGlobalOffset(params: Vector3): void;
614
620
  toggle(params: {
615
621
  enable: boolean;
616
622
  }): void;
623
+ getMeasurementProgress(): MeasurementState;
624
+ resetMeasurement(): void;
617
625
  }
618
626
 
619
627
  declare class MeasurementRenderer {
@@ -652,6 +660,8 @@ declare class MeasurementRenderer {
652
660
  private updateSvgData;
653
661
  }
654
662
 
663
+ declare type MeasurementState = (typeof MEASUREMENT_STATE)[keyof typeof MEASUREMENT_STATE];
664
+
655
665
  declare class Mesh {
656
666
  private pwfMesh;
657
667
  constructor(pwfMesh: PWFMesh);
@@ -1750,18 +1760,19 @@ declare class PointToPointManager implements MeasurementInterface {
1750
1760
  });
1751
1761
  setGlobalOffset(params: Vector3): void;
1752
1762
  getGlobalOffset(): THREE.Vector3;
1763
+ getMeasurementProgress(): MeasurementState;
1753
1764
  private onCameraUpdated;
1754
1765
  private onNavigationChanged;
1755
1766
  private onMeasurementObjectMove;
1756
1767
  private updateTemporaryDistanceLabel;
1757
1768
  private onMeasurementObjectLeave;
1758
1769
  private onMeasurementObjectClick;
1759
- private resetMeasurement;
1770
+ resetMeasurement(): void;
1760
1771
  static isEnabled(): boolean;
1761
1772
  toggle(params: {
1762
1773
  enable: boolean;
1763
1774
  }): Promise<void>;
1764
- private createCursors;
1775
+ private clearDisplayElements;
1765
1776
  private removeCursors;
1766
1777
  private setCameraAndNavigationControls;
1767
1778
  private updateSvg;