@procore/bim-webviewer-sdk 16.6.0-rc.10 → 16.6.0-rc.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.
- package/CHANGELOG.md +4 -0
- package/dist/Procore.Bim.Webviewer.d.ts +49 -11
- package/dist/Procore.Bim.Webviewer.js +1 -1
- package/dist/types/src/controllers/CacheController.d.ts +1 -0
- package/dist/types/src/controllers/DatabaseController.d.ts +1 -0
- package/dist/types/src/controllers/PubSubController.d.ts +1 -0
- package/dist/types/src/controllers/RenderController.d.ts +1 -1
- package/dist/types/src/controllers/RenderControllerProxy.d.ts +1 -0
- package/dist/types/src/controllers/__tests__/fixtures.d.ts +4 -1
- package/dist/types/src/navigation/__tests__/FixedOrbitControl.test.d.ts +1 -0
- package/dist/types/src/procoregl/Models/Models.d.ts +3 -1
- package/dist/types/src/pwfreader/PWF.d.ts +1 -0
- package/dist/types/src/pwfreader/PWFProxy.d.ts +4 -1
- package/dist/types/src/pwfreader/v1/PWFV1.d.ts +6 -1
- package/dist/types/src/pwfreader/v1/standard/MeshServices.d.ts +1 -0
- package/dist/types/src/pwfreader/v1/streaming/MeshData.d.ts +1 -0
- package/dist/types/src/pwfreader/v1/streaming/OPFSFile/MainThreadSyncAccessHandleFallback.d.ts +14 -0
- package/dist/types/src/pwfreader/v1/streaming/OPFSFile/OPFSFile.d.ts +12 -0
- package/dist/types/src/pwfreader/v1/streaming/OPFSFile/index.d.ts +1 -0
- package/dist/types/src/pwfreader/v1/streaming/PartitionProxy.d.ts +7 -2
- package/dist/types/src/pwfreader/v1/streaming/StreamedMeshServices.d.ts +18 -2
- package/dist/types/src/pwfreader/v2/PWFV2.d.ts +1 -0
- package/dist/types/src/pwfreader/v2/standard/MeshServices.d.ts +1 -0
- package/dist/types/src/pwfreader/v2/streaming/StreamedMeshServices.d.ts +1 -0
- package/dist/types/src/types/WebviewerOptions.d.ts +8 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
|
|
12
12
|
- ([#1393](https://github.com/procore/bim-webviewer/pull/1393)) [Internal][QA Ignore] Add `project.3d_models.webviewer.environment` analytics event that gathers information from `navigator.userAgent` and `navigator.storage` before bootstrapping.
|
|
13
13
|
- ([#1394](https://github.com/procore/bim-webviewer/pull/1394)) Automatic conversion of angle properties from radian to degrees (°) and correct formatting for angles in degrees.
|
|
14
|
+
- ([#1398](https://github.com/procore/bim-webviewer/pull/1398)) Add `featureFlags.enableMeshDataOnOPFS` to `Webviewer(options)`, defaulting to `false`.
|
|
15
|
+
- This option enables writing mesh data to disk using OPFS for partitioned models, which allows users to use features that use mesh data, notably Point to Point Measurement.
|
|
16
|
+
- To use Point to Point Measurement on a partitioned model, this flag and `enablePointToPoint` must both be `true`.
|
|
14
17
|
|
|
15
18
|
### Changed
|
|
16
19
|
|
|
@@ -21,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
21
24
|
- ([#1379](https://github.com/procore/bim-webviewer/pull/1379)) Fix the point to point crosshair size to 40px and align in the center.
|
|
22
25
|
- ([#1397](https://github.com/procore/bim-webviewer/pull/1397)) [Internal][QA Ignore] Update Typescript from v4 to v5
|
|
23
26
|
- ([#1400](https://github.com/procore/bim-webviewer/pull/1400)) Cursor tooltip for Measurement tool now uses clientX and clientY to position the tooltip. This is to prevent the tooltip from being positioned incorrectly when users mouse is over a child element of the bim main container.
|
|
27
|
+
- ([#1408](https://github.com/procore/bim-webviewer/pull/1408)) Fix the jerk in the camera for point to point and shortest distance measurement tool when a measurement is active.
|
|
24
28
|
|
|
25
29
|
## [16.5.0] 2024-11-08
|
|
26
30
|
|
|
@@ -278,7 +278,7 @@ export declare type CommonOptions = {
|
|
|
278
278
|
multiselect?: boolean;
|
|
279
279
|
selection?: string;
|
|
280
280
|
enableWebWorker?: boolean;
|
|
281
|
-
featureFlags?: FeatureFlags
|
|
281
|
+
featureFlags?: Partial<FeatureFlags>;
|
|
282
282
|
logInitializationTimes?: boolean;
|
|
283
283
|
sceneGraph?: string;
|
|
284
284
|
bimFileId?: number;
|
|
@@ -313,12 +313,16 @@ export declare namespace ErrorLogger {
|
|
|
313
313
|
const dispose: () => void;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
export declare type FeatureFlags =
|
|
316
|
+
export declare type FeatureFlags = {
|
|
317
317
|
/**
|
|
318
318
|
* @beta Enables the new measurement mode Point to Point, which allows users to measure the distance between two points in the model.
|
|
319
319
|
*/
|
|
320
320
|
enablePointToPoint: boolean;
|
|
321
|
-
|
|
321
|
+
/**
|
|
322
|
+
* @beta Enables writing mesh data to OPFS for partitioned models, which allows users to use features that use mesh data, notably Point to Point.
|
|
323
|
+
*/
|
|
324
|
+
enableMeshDataOnOPFS: boolean;
|
|
325
|
+
};
|
|
322
326
|
|
|
323
327
|
export declare type FileExtraction = {
|
|
324
328
|
id: number;
|
|
@@ -708,6 +712,7 @@ declare class MeshData {
|
|
|
708
712
|
faces(): Uint16Array;
|
|
709
713
|
uploadToGPU(geometryFactory: StreamedGeometryFactory): StreamedMeshGeometry;
|
|
710
714
|
uploadToGPUPreFetching(geometryFactory: StreamedGeometryFactory): StreamedMeshGeometry;
|
|
715
|
+
getCompressedMeshData(): ArrayBuffer;
|
|
711
716
|
getUncompressedMeshData(): ArrayBuffer;
|
|
712
717
|
}
|
|
713
718
|
|
|
@@ -915,6 +920,7 @@ declare class MeshServices {
|
|
|
915
920
|
private loadToGPU;
|
|
916
921
|
getMeshObject(meshOffset: number): MeshObject;
|
|
917
922
|
private loadMeshGeometryToGPU;
|
|
923
|
+
dispose(): void;
|
|
918
924
|
}
|
|
919
925
|
|
|
920
926
|
declare class MeshServices_2 {
|
|
@@ -937,6 +943,7 @@ declare class MeshServices_2 {
|
|
|
937
943
|
private loadToGPU;
|
|
938
944
|
getMeshObject(meshOffset: number): MeshObject_2;
|
|
939
945
|
private loadMeshGeometryToGPU;
|
|
946
|
+
dispose(): void;
|
|
940
947
|
}
|
|
941
948
|
|
|
942
949
|
declare type MetricId = string;
|
|
@@ -1043,6 +1050,7 @@ declare class Models {
|
|
|
1043
1050
|
modelDescriptors: ModelDescriptor[];
|
|
1044
1051
|
selectionOption: SelectMethod;
|
|
1045
1052
|
prefetchingPartitions?: boolean;
|
|
1053
|
+
featureFlags: ValidatedFeatureFlags;
|
|
1046
1054
|
});
|
|
1047
1055
|
private sceneGraphFactory;
|
|
1048
1056
|
getResourceId: (resource: ResourceDiscriminator) => number;
|
|
@@ -1053,7 +1061,7 @@ declare class Models {
|
|
|
1053
1061
|
parsePwfNodes(): BootstrapperResult;
|
|
1054
1062
|
parsePwfMeshnodes(): BootstrapperResult;
|
|
1055
1063
|
parsePwfMeshes(): void;
|
|
1056
|
-
initMeshServices():
|
|
1064
|
+
initMeshServices(): BootstrapperResult;
|
|
1057
1065
|
initNodeServices(): void;
|
|
1058
1066
|
initMeshnodeServices(): void;
|
|
1059
1067
|
initNodeTree(): BootstrapperResult;
|
|
@@ -1499,6 +1507,7 @@ declare class Partition_2 {
|
|
|
1499
1507
|
|
|
1500
1508
|
declare class PartitionProxy {
|
|
1501
1509
|
private pwfPartitionProxy;
|
|
1510
|
+
private meshServices;
|
|
1502
1511
|
static numberOfPartitions: number;
|
|
1503
1512
|
static numberOfPartitionsLoaded: number;
|
|
1504
1513
|
static currentNumberOfDownloading: number;
|
|
@@ -1509,7 +1518,10 @@ declare class PartitionProxy {
|
|
|
1509
1518
|
private _byteLength?;
|
|
1510
1519
|
private _compressedByteLength?;
|
|
1511
1520
|
private stats;
|
|
1512
|
-
constructor(
|
|
1521
|
+
constructor(params: {
|
|
1522
|
+
pwfPartitionProxy: PWFPartitionProxy;
|
|
1523
|
+
meshServices: StreamedMeshServices;
|
|
1524
|
+
});
|
|
1513
1525
|
meshCount(): number;
|
|
1514
1526
|
incrementMeshCount(numMeshes: number): void;
|
|
1515
1527
|
vertexCount(): number;
|
|
@@ -1527,7 +1539,7 @@ declare class PartitionProxy {
|
|
|
1527
1539
|
compressed: number;
|
|
1528
1540
|
size: number;
|
|
1529
1541
|
};
|
|
1530
|
-
static processPartitionProxiesAB(partitionProxiesAB: ArrayBuffer, callback: (partitionProxy: PartitionProxy) => void): void;
|
|
1542
|
+
static processPartitionProxiesAB(partitionProxiesAB: ArrayBuffer, meshServices: StreamedMeshServices, callback: (partitionProxy: PartitionProxy) => void): void;
|
|
1531
1543
|
static getPartitionProxies(partitionProxiesAB: ArrayBuffer): PWFPartitionProxy[];
|
|
1532
1544
|
getContentOfPartitionUrl(): string;
|
|
1533
1545
|
}
|
|
@@ -1901,6 +1913,7 @@ declare namespace PubSubController {
|
|
|
1901
1913
|
objectTreeUpdated: "objectTreeUpdated";
|
|
1902
1914
|
objectUnhide: "objectUnhide";
|
|
1903
1915
|
optionsChanged: "optionsChanged";
|
|
1916
|
+
allPartitionsDownloadComplete: "allPartitionsDownloadComplete";
|
|
1904
1917
|
projectSettingsLoaded: "projectSettingsLoaded";
|
|
1905
1918
|
projectSettingsUpdated: "projectSettingsUpdated";
|
|
1906
1919
|
propertiesReady: "propertiesReady";
|
|
@@ -1981,6 +1994,7 @@ declare interface PWF {
|
|
|
1981
1994
|
getModelAnalyticsData(): ModelAnalyticsData;
|
|
1982
1995
|
get virtualMeshnodeIndexOffset(): number;
|
|
1983
1996
|
set virtualMeshnodeIndexOffset(offset: number);
|
|
1997
|
+
dispose(): void;
|
|
1984
1998
|
}
|
|
1985
1999
|
|
|
1986
2000
|
declare type PWF_2 = PWFV1 | PWFV2;
|
|
@@ -2140,6 +2154,7 @@ declare class PWFProxy implements PWF {
|
|
|
2140
2154
|
manifest: Manifest | undefined;
|
|
2141
2155
|
downloadMetaData: DownloadMetaData;
|
|
2142
2156
|
resourceId: number;
|
|
2157
|
+
featureFlags: ValidatedFeatureFlags;
|
|
2143
2158
|
});
|
|
2144
2159
|
setStandardModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, meshAB: ArrayBuffer): void;
|
|
2145
2160
|
setPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionAB: ArrayBuffer): void;
|
|
@@ -2148,7 +2163,7 @@ declare class PWFProxy implements PWF {
|
|
|
2148
2163
|
parsePwfNodes(): BootstrapperResult;
|
|
2149
2164
|
parsePwfMeshnodes(): BootstrapperResult;
|
|
2150
2165
|
parsePwfMeshes(): void;
|
|
2151
|
-
initMeshServices():
|
|
2166
|
+
initMeshServices(): BootstrapperResult;
|
|
2152
2167
|
initNodeServices(): void;
|
|
2153
2168
|
initMeshnodeServices(): void;
|
|
2154
2169
|
initNodeTree(): BootstrapperResult;
|
|
@@ -2185,6 +2200,7 @@ declare class PWFProxy implements PWF {
|
|
|
2185
2200
|
get virtualMeshnodeIndexOffset(): number;
|
|
2186
2201
|
set virtualMeshnodeIndexOffset(offset: number);
|
|
2187
2202
|
isPartitionedModel(): boolean;
|
|
2203
|
+
dispose(): void;
|
|
2188
2204
|
}
|
|
2189
2205
|
|
|
2190
2206
|
declare class PWFV1 implements PWF {
|
|
@@ -2210,13 +2226,16 @@ declare class PWFV1 implements PWF {
|
|
|
2210
2226
|
meshnodeServices?: MeshnodeServices | StreamedMeshnodeServices;
|
|
2211
2227
|
bvhTree?: BVHTree;
|
|
2212
2228
|
_virtualMeshnodeIndexOffset: number;
|
|
2229
|
+
private readonly featureFlags;
|
|
2213
2230
|
loadPartitionPromises: Promise<void>[];
|
|
2214
2231
|
currentIndex: number;
|
|
2215
2232
|
partitionProxies: PartitionProxy[];
|
|
2216
2233
|
partitionsCache: LRUCache<string, Partition>;
|
|
2234
|
+
private meshServicesOPFSInitialized;
|
|
2217
2235
|
constructor(params: {
|
|
2218
2236
|
downloadMetaData: DownloadMetaData;
|
|
2219
2237
|
resourceId: number;
|
|
2238
|
+
featureFlags: ValidatedFeatureFlags;
|
|
2220
2239
|
});
|
|
2221
2240
|
setStandardModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, meshAB: ArrayBuffer): void;
|
|
2222
2241
|
setPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionProxiesAB: ArrayBuffer): void;
|
|
@@ -2225,7 +2244,7 @@ declare class PWFV1 implements PWF {
|
|
|
2225
2244
|
parsePwfNodes(): BootstrapperResult;
|
|
2226
2245
|
parsePwfMeshnodes(): BootstrapperResult;
|
|
2227
2246
|
parsePwfMeshes(): void;
|
|
2228
|
-
initMeshServices():
|
|
2247
|
+
initMeshServices(): BootstrapperResult;
|
|
2229
2248
|
initNodeServices(): void;
|
|
2230
2249
|
initMeshnodeServices(): void;
|
|
2231
2250
|
initNodeTree(): BootstrapperResult;
|
|
@@ -2266,6 +2285,7 @@ declare class PWFV1 implements PWF {
|
|
|
2266
2285
|
getModelAnalyticsData(): ModelAnalyticsData;
|
|
2267
2286
|
get virtualMeshnodeIndexOffset(): number;
|
|
2268
2287
|
set virtualMeshnodeIndexOffset(value: number);
|
|
2288
|
+
dispose(): void;
|
|
2269
2289
|
}
|
|
2270
2290
|
|
|
2271
2291
|
export declare type PwfV1Bundle = {
|
|
@@ -2356,6 +2376,7 @@ declare class PWFV2 implements PWF {
|
|
|
2356
2376
|
getModelAnalyticsData(): ModelAnalyticsData;
|
|
2357
2377
|
get virtualMeshnodeIndexOffset(): number;
|
|
2358
2378
|
set virtualMeshnodeIndexOffset(value: number);
|
|
2379
|
+
dispose(): void;
|
|
2359
2380
|
}
|
|
2360
2381
|
|
|
2361
2382
|
export declare type PwfV2Bundle = {
|
|
@@ -2452,7 +2473,7 @@ declare class RenderController {
|
|
|
2452
2473
|
parsePwfNodes(): BootstrapperResult;
|
|
2453
2474
|
parsePwfMeshnodes(): BootstrapperResult;
|
|
2454
2475
|
parsePwfMeshes(): void;
|
|
2455
|
-
initMeshServices():
|
|
2476
|
+
initMeshServices(): BootstrapperResult;
|
|
2456
2477
|
initNodeServices(): void;
|
|
2457
2478
|
initMeshnodeServices(): void;
|
|
2458
2479
|
initNodeTree(): BootstrapperResult;
|
|
@@ -2844,6 +2865,7 @@ declare class RenderControllerProxy {
|
|
|
2844
2865
|
logInitializationTimes: any;
|
|
2845
2866
|
projectId: any;
|
|
2846
2867
|
baseUrl: any;
|
|
2868
|
+
featureFlags: any;
|
|
2847
2869
|
nodeUrl: any;
|
|
2848
2870
|
meshnodeUrl: any;
|
|
2849
2871
|
meshUrl: any;
|
|
@@ -3501,10 +3523,23 @@ declare class StreamedMeshnodeServices_2 extends MeshnodeServices_2 {
|
|
|
3501
3523
|
}
|
|
3502
3524
|
|
|
3503
3525
|
declare class StreamedMeshServices extends MeshServices {
|
|
3504
|
-
|
|
3505
|
-
|
|
3526
|
+
private readonly featureFlags;
|
|
3527
|
+
private meshIndexToOPFSRecord;
|
|
3528
|
+
private opfsFile?;
|
|
3529
|
+
private opfsOffset;
|
|
3530
|
+
constructor(params: {
|
|
3531
|
+
pwf: PWFV1;
|
|
3532
|
+
featureFlags: ValidatedFeatureFlags;
|
|
3533
|
+
});
|
|
3534
|
+
initOPFS(): Promise<void>;
|
|
3535
|
+
closeOPFS(): Promise<void>;
|
|
3536
|
+
writeMeshDataToOPFS(meshData: MeshData): Promise<void>;
|
|
3537
|
+
getMeshObject(meshIndex: number): MeshObject;
|
|
3506
3538
|
loadPartitionContainingMeshnode(streamedMeshnode: StreamedMeshnode): Promise<void>;
|
|
3507
3539
|
getMeshGeometryForOffsets(meshOffset: number, meshnodeOffset: number): StreamedMeshGeometry | undefined;
|
|
3540
|
+
meshFromOffset(meshIndex: number): Mesh;
|
|
3541
|
+
private getCompressedMeshDataFromOPFS;
|
|
3542
|
+
dispose(): void;
|
|
3508
3543
|
}
|
|
3509
3544
|
|
|
3510
3545
|
declare class StreamedMeshServices_2 extends MeshServices_2 {
|
|
@@ -3512,6 +3547,7 @@ declare class StreamedMeshServices_2 extends MeshServices_2 {
|
|
|
3512
3547
|
getMeshObject(meshOffset: number): MeshObject_2;
|
|
3513
3548
|
loadPartitionContainingMeshnode(streamedMeshnode: StreamedMeshnode_2): Promise<void>;
|
|
3514
3549
|
getMeshGeometryForOffsets(meshOffset: number, meshnodeOffset: number): StreamedMeshGeometry | undefined;
|
|
3550
|
+
dispose(): void;
|
|
3515
3551
|
}
|
|
3516
3552
|
|
|
3517
3553
|
declare type SvgData = {
|
|
@@ -3657,6 +3693,8 @@ export declare const UOM: {
|
|
|
3657
3693
|
|
|
3658
3694
|
export declare type Uom = (typeof UOM)[keyof typeof UOM];
|
|
3659
3695
|
|
|
3696
|
+
declare type ValidatedFeatureFlags = Readonly<FeatureFlags>;
|
|
3697
|
+
|
|
3660
3698
|
export declare type Vector2 = {
|
|
3661
3699
|
x: number;
|
|
3662
3700
|
y: number;
|