@procore/bim-webviewer-sdk 17.3.0-rc.8 → 17.3.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +23 -3
  2. package/dist/Procore.Bim.Webviewer.d.ts +48 -5
  3. package/dist/Procore.Bim.Webviewer.js +1 -1
  4. package/dist/types/src/api/analytic_events/analyticKeys.d.ts +1 -0
  5. package/dist/types/src/components/ToolBarComponent/ToolBarComponent.d.ts +0 -1
  6. package/dist/types/src/controllers/RenderControllerProxy.d.ts +0 -3
  7. package/dist/types/src/{navigation → hotkeys}/Hotkeys.d.ts +8 -5
  8. package/dist/types/src/hotkeys/__tests__/Hotkeys.test.d.ts +1 -0
  9. package/dist/types/src/measuring/DistanceLabel.d.ts +1 -0
  10. package/dist/types/src/measuring/FeatureTooltip/FeatureTooltip.d.ts +2 -0
  11. package/dist/types/src/measuring/MeasureToolUtils.d.ts +9 -8
  12. package/dist/types/src/measuring/MeasurementManager.d.ts +3 -0
  13. package/dist/types/src/measuring/PointToPointController.d.ts +3 -9
  14. package/dist/types/src/measuring/PointToPointManager.d.ts +2 -0
  15. package/dist/types/src/measuring/__tests__/PointToPointFixtures.d.ts +29 -50
  16. package/dist/types/src/measuring/__tests__/fixtures.d.ts +17 -0
  17. package/dist/types/src/navigation/DefaultControl.d.ts +1 -0
  18. package/dist/types/src/navigation/__tests__/DefaultControl.test.d.ts +1 -0
  19. package/dist/types/src/procoregl/MeshTopology/__tests__/TopologyFixtures.d.ts +2 -0
  20. package/dist/types/src/pwfreader/v1/streaming/StreamedMeshServices.d.ts +2 -0
  21. package/dist/types/src/pwfreader/v2/PWFV2.d.ts +7 -0
  22. package/dist/types/src/pwfreader/v2/streaming/MeshData.d.ts +1 -0
  23. package/dist/types/src/pwfreader/v2/streaming/PartitionProxy.d.ts +7 -2
  24. package/dist/types/src/pwfreader/v2/streaming/StreamedMeshServices.d.ts +24 -3
  25. package/dist/types/src/types/setMeasurementSchema.d.ts +21 -0
  26. package/dist/types/src/utils/Enums.d.ts +1 -0
  27. package/dist/types/src/{pwfreader/v1/streaming → utils}/OPFSFile/MainThreadSyncAccessHandleFallback.d.ts +2 -1
  28. package/dist/types/src/{pwfreader/v1/streaming → utils}/OPFSFile/OPFSFile.d.ts +3 -2
  29. package/dist/types/src/utils/OPFSFile/__tests__/OPFSFile.test.d.ts +1 -0
  30. package/dist/types/src/utils/OPFSFile/index.d.ts +1 -0
  31. package/package.json +2 -2
  32. package/dist/types/src/pwfreader/v1/streaming/OPFSFile/index.d.ts +0 -1
  33. /package/dist/types/src/{navigation/Orbit → utils}/log.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -5,23 +5,35 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
7
7
 
8
- ## [Unreleased]
8
+ ## [17.3.0] 2025-01-17
9
9
 
10
10
  ### Added
11
11
 
12
+ - ([#1440](https://github.com/procore/bim-webviewer/pull/1440)) Added clipping of the point to point outline that appears when a user hovers over a mesh/surface, respecting the applied section box/plane.
12
13
  - ([#1389](https://github.com/procore/bim-webviewer/pull/1389)) [QA Ignore] Fetching the model by only using model revision id in SDK side.
13
14
 
14
15
  ### Changed
15
16
 
16
17
  - ([#1415](https://github.com/procore/bim-webviewer/pull/1415)) Changed the priority of the escape key operations to place resetting the measurement below closing the floor plan modal, but above closing any open windows.
17
18
  - ([#1416](https://github.com/procore/bim-webviewer/pull/1416)) When the Measurement Tool is enabled, the context menu for mouse right click button will no longer display.
18
- - ([#1442](https://github.com/procore/bim-webviewer/pull/1442)) [Internal] Refactor Shortest Distance Measurement to get mesh data in the same code path for both standard and partitioned models. For partitioned models this means it no longer fetches the partition from cache for the mesh data and instead reads it from OPFS
19
+ - ([#1444](https://github.com/procore/bim-webviewer/pull/1444)) While Measurement Tool is enabled, changing to a different navigation mode other than the default navigation mode will now disable the Measurement Tool. Additionally, when enabling the Measurement Tool, the default navigation mode will be set regardless of the current navigation mode.
20
+ - ([#1446](https://github.com/procore/bim-webviewer/pull/1446)) Hotkey refactoring. Additionally, the SDK method `setMeasurement` can now be used even if the Measurement Tool is not added to the `options.tools` array when initializing the Web Viewer. This allows third party developers to enable the Measurement Tool after the Web Viewer has been initialized.
19
21
 
20
22
  ### Fixed
21
23
 
22
24
  - ([#1422](https://github.com/procore/bim-webviewer/pull/1422)) Fixed an issue where the crosshair cursor wouldn't appear when enabling the point-to-point measurement tool, requiring users to hover over a mesh and then move into empty space.
23
25
  - ([#1423](https://github.com/procore/bim-webviewer/pull/1423)) Fixed bug that caused the temporary distance label to reappear in the scene when zooming in even when it was hidden behind the camera.
24
- - ([#1414](https://github.com/procore/bim-webviewer/pull/1414)) [Internal][QA Ignore] Removes noisy console logs from the PointToPointController when a user of p2p hovers over non-manifold meshes.
26
+ - ([#1445](https://github.com/procore/bim-webviewer/pull/1445)) Fixed UI bug in which the footer line of the Settings dialog was on top of the Measurement Units dropdown menu.
27
+ - ([#1448](https://github.com/procore/bim-webviewer/pull/1448)) Fixed an issue where the cursor was not updated to the default one if the section box was disabled while the resize cursor was applied.
28
+ - ([#1449](https://github.com/procore/bim-webviewer/pull/1449)) Fixed bug in which the point to point feature tooltip was not hiding when zooming in/out as it does when moving the mouse around. It now behaves exactly as it does when moving the mouse around.
29
+ - ([#1450](https://github.com/procore/bim-webviewer/pull/1450)) Fixes the issue with opening the same large model multiple times, on separate tabs of the same Safari browser instance.
30
+ - ([#1451](https://github.com/procore/bim-webviewer/pull/1451)) Fixed issue with SDK method `setMeasurement` not working as expected when disabling the measurement tool while the tool is enabled and the optional `measurementMode` parameter is set to a different mode than the current mode.
31
+ - ([#1462](https://github.com/procore/bim-webviewer/pull/1462)) Fixed bug that was causing the temporary distance label to flicker its visibility when zooming out past a certain limit. This limit makes sure to hide the label so it doesn't occlude the line.
32
+ - ([#1464](https://github.com/procore/bim-webviewer/pull/1464)) Fixed bug in which the fixed orbit stayed active after the point-to-point tool was toggled off.
33
+
34
+ ## [17.2.1] 2025-01-15
35
+
36
+ - ([#1453](https://github.com/procore/bim-webviewer/pull/1453)) Fix issue where models that have beyond a certain number of nodes in the object tree would fail to load in Chrome v132 (which released 2025-01-14). Chrome v131 did not seem to have this issue.
25
37
 
26
38
  ## [17.2.0] 2024-12-13
27
39
 
@@ -65,6 +77,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
65
77
  - ([#1399](https://github.com/procore/bim-webviewer/pull/1399)) When zooming in and/or out while the point to point measurement tool is active, the mouse cursor and intersection snap results now automatically update and the temporary distance label stays in the midpoint of the measuring line.
66
78
  - ([#1419](https://github.com/procore/bim-webviewer/pull/1419)) Fixed erroneous test mock data that was causing the whole test suite to fail.
67
79
 
80
+ ## [16.5.1] 2025-01-15
81
+
82
+ - ([#1453](https://github.com/procore/bim-webviewer/pull/1453)) Fix issue where models that have beyond a certain number of nodes in the object tree would fail to load in Chrome v132 (which released 2025-01-14). Chrome v131 did not seem to have this issue.
83
+
68
84
  ## [16.5.0] 2024-11-08
69
85
 
70
86
  ### Added
@@ -157,6 +173,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
157
173
 
158
174
  - [Breaking Change] Removed `enableObjectTreeSearch` feature flag as it is now always enabled and cannot be disabled.
159
175
 
176
+ ## [15.5.1] 2025-01-15
177
+
178
+ - ([#1453](https://github.com/procore/bim-webviewer/pull/1453)) Fix issue where models that have beyond a certain number of nodes in the object tree would fail to load in Chrome v132 (which released 2025-01-14). Chrome v131 did not seem to have this issue.
179
+
160
180
  ## [15.5.0] - 2024-08-02
161
181
 
162
182
  ### Added
@@ -367,6 +367,7 @@ declare class MeshData {
367
367
  faces(): Uint16Array;
368
368
  uploadToGPU(geometryFactory: StreamedGeometryFactory): StreamedMeshGeometry;
369
369
  uploadToGPUPreFetching(geometryFactory: StreamedGeometryFactory): StreamedMeshGeometry;
370
+ getCompressedMeshData(): ArrayBuffer;
370
371
  getUncompressedMeshData(): ArrayBuffer;
371
372
  }
372
373
 
@@ -833,6 +834,22 @@ export declare type ObjectFilter = {
833
834
  filterValue: string;
834
835
  };
835
836
 
837
+ declare class OPFSFile {
838
+ private path;
839
+ private syncAccessHandle?;
840
+ private directoryHandle?;
841
+ private fileName?;
842
+ private static stats;
843
+ constructor(path: string);
844
+ open(): Promise<void>;
845
+ delete(): Promise<void>;
846
+ close(): void;
847
+ truncate(offset: number): void;
848
+ write(buffer: ArrayBuffer, byteOffset?: number): number | undefined;
849
+ read(byteOffset?: number, byteLength?: number): ArrayBuffer;
850
+ private updateReadStats;
851
+ }
852
+
836
853
  export declare type Options = FileExtractionModePwfV2OverrideOptions | FileExtractionModePwfV1OverrideOptions | FileExtractionModeOptions | ModelRevisionModePwfV2OverrideOptions | ModelRevisionModePwfV1OverrideOptions | ModelRevisionModeOptions | ResourceOptions;
837
854
 
838
855
  declare type Palette = {
@@ -862,6 +879,7 @@ declare class Partition_2 {
862
879
 
863
880
  declare class PartitionProxy {
864
881
  private pwfPartitionProxy;
882
+ private meshServices;
865
883
  static numberOfPartitions: number;
866
884
  static numberOfPartitionsLoaded: number;
867
885
  static currentNumberOfDownloading: number;
@@ -872,7 +890,10 @@ declare class PartitionProxy {
872
890
  private _byteLength?;
873
891
  private _compressedByteLength?;
874
892
  private stats;
875
- constructor(pwfPartitionProxy: PWFPartitionProxy);
893
+ constructor(params: {
894
+ pwfPartitionProxy: PWFPartitionProxy;
895
+ meshServices: StreamedMeshServices;
896
+ });
876
897
  meshCount(): number;
877
898
  incrementMeshCount(numMeshes: number): void;
878
899
  vertexCount(): number;
@@ -890,7 +911,7 @@ declare class PartitionProxy {
890
911
  compressed: number;
891
912
  size: number;
892
913
  };
893
- static processPartitionProxiesAB(partitionProxiesAB: ArrayBuffer, callback: (partitionProxy: PartitionProxy) => void): void;
914
+ static processPartitionProxiesAB(partitionProxiesAB: ArrayBuffer, meshServices: StreamedMeshServices, callback: (partitionProxy: PartitionProxy) => void): void;
894
915
  static getPartitionProxies(partitionProxiesAB: ArrayBuffer): PWFPartitionProxy[];
895
916
  getContentOfPartitionUrl(): string;
896
917
  }
@@ -1264,6 +1285,7 @@ export declare type PwfV1Bundle = {
1264
1285
  declare class PWFV2 implements PWF {
1265
1286
  private readonly downloadMetaData;
1266
1287
  resourceId: number;
1288
+ resource: ResourceDiscriminator;
1267
1289
  streaming: boolean;
1268
1290
  nodeAB?: ArrayBuffer;
1269
1291
  meshnodeAB?: ArrayBuffer;
@@ -1286,14 +1308,18 @@ declare class PWFV2 implements PWF {
1286
1308
  meshnodeOffPointer: number;
1287
1309
  bvhTree?: BVHTree;
1288
1310
  _virtualMeshnodeIndexOffset: number;
1311
+ private readonly featureFlags;
1289
1312
  loadPartitionPromises: Promise<void>[];
1290
1313
  currentIndex: number;
1291
1314
  partitionProxies: PartitionProxy[];
1292
1315
  partitionsCache: LRUCache<string, Partition>;
1316
+ private meshServicesOPFSInitialized;
1293
1317
  constructor(params: {
1294
1318
  downloadMetaData: DownloadMetaData;
1295
1319
  resourceId: number;
1320
+ resource: ResourceDiscriminator;
1296
1321
  manifest: Manifest;
1322
+ featureFlags: ValidatedFeatureFlags;
1297
1323
  });
1298
1324
  setStandardModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, meshAB: ArrayBuffer): void;
1299
1325
  setPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionProxiesAB: ArrayBuffer): void;
@@ -1442,11 +1468,27 @@ declare class StreamedMeshnodeServices_2 extends MeshnodeServices_2 {
1442
1468
  }
1443
1469
 
1444
1470
  declare class StreamedMeshServices extends MeshServices {
1445
- constructor(pwf: PWFV2);
1446
- getMeshObject(meshOffset: number): MeshObject_2;
1471
+ private readonly featureFlags;
1472
+ private meshIndexToOPFSRecord;
1473
+ private opfsFile?;
1474
+ private opfsOffset;
1475
+ private resource;
1476
+ constructor(params: {
1477
+ pwf: PWFV2;
1478
+ featureFlags: ValidatedFeatureFlags;
1479
+ resource: ResourceDiscriminator;
1480
+ });
1481
+ initOPFS(): Promise<void>;
1482
+ private deleteOPFSFile;
1483
+ getOPFSFile(): OPFSFile | undefined;
1484
+ closeOPFS(): Promise<void>;
1485
+ writeMeshDataToOPFS(meshData: MeshData): Promise<void>;
1486
+ getMeshObject(meshIndex: number): MeshObject_2;
1447
1487
  loadPartitionContainingMeshnode(streamedMeshnode: StreamedMeshnode): Promise<void>;
1448
1488
  getMeshGeometryForOffsets(meshOffset: number, meshnodeOffset: number): StreamedMeshGeometry | undefined;
1449
- dispose(): void;
1489
+ meshFromOffset(meshIndex: number): Mesh;
1490
+ private getCompressedMeshDataFromOPFS;
1491
+ dispose(): Promise<void>;
1450
1492
  }
1451
1493
 
1452
1494
  declare class StreamedMeshServices_2 extends MeshServices_2 {
@@ -1462,6 +1504,7 @@ declare class StreamedMeshServices_2 extends MeshServices_2 {
1462
1504
  });
1463
1505
  initOPFS(): Promise<void>;
1464
1506
  private deleteOPFSFile;
1507
+ getOPFSFile(): OPFSFile | undefined;
1465
1508
  closeOPFS(): Promise<void>;
1466
1509
  writeMeshDataToOPFS(meshData: MeshData_2): Promise<void>;
1467
1510
  getMeshObject(meshIndex: number): MeshObject;