@procore/bim-webviewer-sdk 17.3.0-rc.17 → 17.3.0-rc.19
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 +11 -2
- package/dist/Procore.Bim.Webviewer.d.ts +48 -5
- package/dist/Procore.Bim.Webviewer.js +1 -1
- package/dist/types/src/pwfreader/v1/streaming/StreamedMeshServices.d.ts +2 -0
- package/dist/types/src/pwfreader/v2/PWFV2.d.ts +7 -0
- package/dist/types/src/pwfreader/v2/streaming/MeshData.d.ts +1 -0
- package/dist/types/src/pwfreader/v2/streaming/PartitionProxy.d.ts +7 -2
- package/dist/types/src/pwfreader/v2/streaming/StreamedMeshServices.d.ts +24 -3
- package/dist/types/src/{pwfreader/v1/streaming → utils}/OPFSFile/MainThreadSyncAccessHandleFallback.d.ts +1 -0
- package/dist/types/src/utils/OPFSFile/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/types/src/pwfreader/v1/streaming/OPFSFile/index.d.ts +0 -1
- /package/dist/types/src/{pwfreader/v1/streaming → utils}/OPFSFile/OPFSFile.d.ts +0 -0
- /package/dist/types/src/{pwfreader/v1/streaming → utils}/OPFSFile/__tests__/OPFSFile.test.d.ts +0 -0
- /package/dist/types/src/{navigation/Orbit → utils}/log.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
17
17
|
- ([#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
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
19
|
- ([#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.
|
|
20
|
+
- ([#1452])(https://github.com/procore/bim-webviewer/pull/1452) [Internal][QA Ignore] Add support for writing mesh data to OPFS for PWFv2 partitioned models. Effectively just copying over the implementation from v1.
|
|
20
21
|
|
|
21
22
|
### Fixed
|
|
22
23
|
|
|
@@ -29,9 +30,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
29
30
|
- ([#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
31
|
- ([#1447](https://github.com/procore/bim-webviewer/pull/1447)) [Internal][QA Ignore] Fix `OPFSFile` median stats
|
|
31
32
|
|
|
32
|
-
## [17.2.1]
|
|
33
|
+
## [17.2.1] 2025-01-15
|
|
33
34
|
|
|
34
|
-
- ([#
|
|
35
|
+
- ([#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.
|
|
35
36
|
|
|
36
37
|
## [17.2.0] 2024-12-13
|
|
37
38
|
|
|
@@ -75,6 +76,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
75
76
|
- ([#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.
|
|
76
77
|
- ([#1419](https://github.com/procore/bim-webviewer/pull/1419)) Fixed erroneous test mock data that was causing the whole test suite to fail.
|
|
77
78
|
|
|
79
|
+
## [16.5.1] 2025-01-15
|
|
80
|
+
|
|
81
|
+
- ([#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.
|
|
82
|
+
|
|
78
83
|
## [16.5.0] 2024-11-08
|
|
79
84
|
|
|
80
85
|
### Added
|
|
@@ -167,6 +172,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
167
172
|
|
|
168
173
|
- [Breaking Change] Removed `enableObjectTreeSearch` feature flag as it is now always enabled and cannot be disabled.
|
|
169
174
|
|
|
175
|
+
## [15.5.1] 2025-01-15
|
|
176
|
+
|
|
177
|
+
- ([#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.
|
|
178
|
+
|
|
170
179
|
## [15.5.0] - 2024-08-02
|
|
171
180
|
|
|
172
181
|
### 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(
|
|
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
|
-
|
|
1446
|
-
|
|
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
|
-
|
|
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;
|