@procore/bim-webviewer-sdk 17.2.1 → 17.3.0-BM-1142.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.
- package/CHANGELOG.md +50 -0
- package/dist/Procore.Bim.Webviewer.d.ts +84 -41
- package/dist/Procore.Bim.Webviewer.js +1 -1
- package/dist/types/src/EscapeOperationsManager/EscapeOperationsManager.d.ts +21 -0
- package/dist/types/src/EscapeOperationsManager/__tests__/EscapeOperationsManager.test.d.ts +1 -0
- package/dist/types/src/EscapeOperationsManager/index.d.ts +1 -0
- package/dist/types/src/Webviewer.d.ts +1 -0
- package/dist/types/src/api/analytic_events/analyticKeys.d.ts +1 -0
- package/dist/types/src/api/bim_viewpoints.d.ts +5 -0
- package/dist/types/src/api/types/FileExtraction.d.ts +3 -9
- package/dist/types/src/api/types/GeometryFileBundle.d.ts +10 -0
- package/dist/types/src/api/types/ModelRevision.d.ts +2 -0
- package/dist/types/src/components/ContextMenuComponent/ContextMenuComponent.d.ts +9 -5
- package/dist/types/src/components/ContextMenuComponent/__tests__/ContextMenuComponent.test.d.ts +1 -0
- package/dist/types/src/components/ShortestDistanceComponent.d.ts +1 -0
- package/dist/types/src/components/ToolBarComponent/ToolBarComponent.d.ts +0 -1
- package/dist/types/src/controllers/RenderController.d.ts +2 -10
- package/dist/types/src/controllers/RenderControllerProxy.d.ts +6 -8
- package/dist/types/src/controllers/RenderControllerWorker.d.ts +1 -3
- package/dist/types/src/controllers/ShortestDistanceController.d.ts +0 -1
- package/dist/types/src/{navigation → hotkeys}/Hotkeys.d.ts +8 -5
- package/dist/types/src/hotkeys/__tests__/Hotkeys.test.d.ts +1 -0
- package/dist/types/src/measuring/DistanceLabel.d.ts +7 -0
- package/dist/types/src/measuring/FeatureTooltip/FeatureTooltip.d.ts +4 -0
- package/dist/types/src/measuring/MeasureToolUtils.d.ts +11 -8
- package/dist/types/src/measuring/MeasurementInterface.d.ts +1 -0
- package/dist/types/src/measuring/MeasurementManager.d.ts +5 -0
- package/dist/types/src/measuring/MeasurementRenderer.d.ts +0 -1
- package/dist/types/src/measuring/PointToPointController.d.ts +11 -11
- package/dist/types/src/measuring/PointToPointManager.d.ts +5 -0
- package/dist/types/src/measuring/__tests__/PointToPointFixtures.d.ts +30 -50
- package/dist/types/src/measuring/__tests__/fixtures.d.ts +17 -0
- package/dist/types/src/navigation/DefaultControl.d.ts +1 -0
- package/dist/types/src/navigation/__tests__/DefaultControl.test.d.ts +1 -0
- package/dist/types/src/picking/PickingController.d.ts +9 -1
- package/dist/types/src/procoregl/MeshTopology/MeshTopology.d.ts +1 -0
- package/dist/types/src/procoregl/MeshTopology/__tests__/TopologyFixtures.d.ts +5 -1
- package/dist/types/src/procoregl/Models/__tests__/Models.test.d.ts +2 -2
- package/dist/types/src/pwfreader/PWF.d.ts +1 -2
- package/dist/types/src/pwfreader/PWFProxy.d.ts +1 -2
- package/dist/types/src/pwfreader/v1/PWFV1.d.ts +0 -2
- package/dist/types/src/pwfreader/v1/streaming/StreamedMeshServices.d.ts +2 -0
- package/dist/types/src/pwfreader/v2/PWFV2.d.ts +7 -2
- 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/sdk.d.ts +3 -2
- package/dist/types/src/types/WebviewerOptions.d.ts +31 -31
- package/dist/types/src/types/setMeasurementSchema.d.ts +21 -0
- package/dist/types/src/utils/ApiMetaData/ApiMetaData.d.ts +5 -0
- package/dist/types/src/utils/ApiMetaData/__tests__/mocks.d.ts +13 -9
- package/dist/types/src/utils/ApiMetaData/index.d.ts +1 -0
- package/dist/types/src/utils/CameraHelper/CameraHelper.d.ts +8 -0
- package/dist/types/src/utils/CameraHelper/index.d.ts +1 -0
- package/dist/types/src/utils/Enums.d.ts +1 -0
- package/dist/types/src/{pwfreader/v1/streaming → utils}/OPFSFile/MainThreadSyncAccessHandleFallback.d.ts +2 -1
- package/dist/types/src/{pwfreader/v1/streaming → utils}/OPFSFile/OPFSFile.d.ts +3 -2
- package/dist/types/src/utils/OPFSFile/__tests__/OPFSFile.test.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/{navigation/Orbit → utils}/log.d.ts +0 -0
|
@@ -18,6 +18,7 @@ export declare class DefaultControl implements MouseControl {
|
|
|
18
18
|
onMouseMove: (event: MouseEvent) => void;
|
|
19
19
|
dispose(): void;
|
|
20
20
|
private updateSectionHover;
|
|
21
|
+
private onSectionBoxDisplayToggled;
|
|
21
22
|
private onSectionBoxDisplayHoverUpdated;
|
|
22
23
|
private resetCursor;
|
|
23
24
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -18,12 +18,20 @@ export declare class PickingController {
|
|
|
18
18
|
getRayIntersectPoint(params: {
|
|
19
19
|
event: MouseEvent;
|
|
20
20
|
returnOnEdgeHitFailure: 'null' | 'bboxCenter';
|
|
21
|
+
findNearestMeshnodeIndex?: boolean;
|
|
21
22
|
}): {
|
|
22
23
|
intersection: Vector3 | null;
|
|
23
24
|
meshnodeIndex: number;
|
|
24
25
|
faceNormal: Vector3 | null;
|
|
26
|
+
nearestMeshnodeIndex?: number;
|
|
25
27
|
};
|
|
28
|
+
private findNearestMeshnodeIndex;
|
|
26
29
|
mouseToThreeRay(event: MouseEvent): THREE.Raycaster;
|
|
27
|
-
|
|
30
|
+
extractMeshnodeIndex(event: {
|
|
31
|
+
offsetX: number;
|
|
32
|
+
offsetY: number;
|
|
33
|
+
}): number;
|
|
34
|
+
planeTestMesh(plane: THREE.Plane, meshnodeIndex: number): THREE.Line3[];
|
|
28
35
|
private rayTestMesh;
|
|
36
|
+
private iterateMeshFaces;
|
|
29
37
|
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { MeshTopology } from '../MeshTopology';
|
|
2
|
+
import { PWFMeshMock } from './PWFMeshMock';
|
|
2
3
|
import { Mesh } from '../../../pwfreader/PWFTypes';
|
|
3
|
-
export declare const pwfFlatPair:
|
|
4
|
+
export declare const pwfFlatPair: PWFMeshMock;
|
|
4
5
|
export declare const flatPair: MeshTopology;
|
|
5
6
|
export declare const flatRing: MeshTopology;
|
|
6
7
|
export declare const flatRingOrphan: MeshTopology;
|
|
7
8
|
export declare const tetraedron: MeshTopology;
|
|
8
9
|
export declare const tetraedronCW: MeshTopology;
|
|
9
10
|
export declare const tetraedronOpen: MeshTopology;
|
|
11
|
+
export declare const pwfNonManifold: Mesh;
|
|
12
|
+
export declare const pwfFlatWindowedWall: Mesh;
|
|
13
|
+
export declare const flatWindowedWall: MeshTopology;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DownloadMetaData, Models } from '../Models';
|
|
2
2
|
import { ResourceDiscriminator } from '../../../Webviewer';
|
|
3
|
-
import type { FileExtractionModeOptions,
|
|
4
|
-
export declare const getModelsFixture: (resource: ResourceDiscriminator, options: FileExtractionModeOptions |
|
|
3
|
+
import type { FileExtractionModeOptions, ModelRevisionModePwfV1OverrideOptions } from '../../../types/WebviewerOptions';
|
|
4
|
+
export declare const getModelsFixture: (resource: ResourceDiscriminator, options: FileExtractionModeOptions | ModelRevisionModePwfV1OverrideOptions) => Promise<{
|
|
5
5
|
models: Models;
|
|
6
6
|
downloadMetaData: DownloadMetaData;
|
|
7
7
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { StreamedGeometryFactory } from '../procoregl/StreamedGeometryFactory';
|
|
2
2
|
import type { GeometryFactory } from '../procoregl/GeometryFactory';
|
|
3
|
-
import type { Node, Meshnode,
|
|
3
|
+
import type { Node, Meshnode, MeshObject, ModelAnalyticsData } from './PWFTypes';
|
|
4
4
|
import type { BootstrapperResult } from '../controllers/Bootstrapper';
|
|
5
5
|
import { Vector3 } from '../types/Math';
|
|
6
6
|
export interface PWF {
|
|
@@ -42,7 +42,6 @@ export interface PWF {
|
|
|
42
42
|
hasNode(id: number): boolean;
|
|
43
43
|
loadAllMeshGeometryToGPU(): BootstrapperResult;
|
|
44
44
|
loadAllPartitionProxies(): void;
|
|
45
|
-
getMeshDataForPartitionedModel(meshnodeIndex: number): Promise<MeshnodeObject>;
|
|
46
45
|
captureModelStats(): void;
|
|
47
46
|
getModelAnalyticsData(): ModelAnalyticsData;
|
|
48
47
|
get virtualMeshnodeIndexOffset(): number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meshnode, Node, MeshObject,
|
|
1
|
+
import { Meshnode, Node, MeshObject, ModelAnalyticsData, PWF as PWFVersion, Manifest } from './PWFTypes';
|
|
2
2
|
import { StreamedGeometryFactory } from '../procoregl/StreamedGeometryFactory';
|
|
3
3
|
import { GeometryFactory } from '../procoregl/GeometryFactory';
|
|
4
4
|
import type { BootstrapperResult } from '../controllers/Bootstrapper';
|
|
@@ -53,7 +53,6 @@ export declare class PWFProxy implements PWF {
|
|
|
53
53
|
numFirstObjects(): number;
|
|
54
54
|
breadthFirstTraversalNodes(callback: (n: Node | Meshnode) => void): BootstrapperResult;
|
|
55
55
|
getNamedNode(nodeId: number): Node;
|
|
56
|
-
getMeshDataForPartitionedModel(meshnodeIndex: number): Promise<MeshnodeObject>;
|
|
57
56
|
captureModelStats(): number;
|
|
58
57
|
getModelAnalyticsData(): ModelAnalyticsData;
|
|
59
58
|
get virtualMeshnodeIndexOffset(): number;
|
|
@@ -16,7 +16,6 @@ import { Meshnode } from './standard/Meshnode';
|
|
|
16
16
|
import { PartitionProxy } from './streaming/PartitionProxy';
|
|
17
17
|
import { StreamedGeometryFactory } from '../../procoregl/StreamedGeometryFactory';
|
|
18
18
|
import { MeshObject } from './objects/MeshObject';
|
|
19
|
-
import { MeshnodeObject } from './objects/MeshnodeObject';
|
|
20
19
|
import { LRUCache } from '../../utils/LRUCache';
|
|
21
20
|
import { Partition } from './streaming/Partition';
|
|
22
21
|
import { GeometryFactory } from '../../procoregl/GeometryFactory';
|
|
@@ -101,7 +100,6 @@ export declare class PWFV1 implements PWF {
|
|
|
101
100
|
numFirstObjects(): number;
|
|
102
101
|
breadthFirstTraversalNodes(callback: (n: Node | Meshnode) => void): BootstrapperResult;
|
|
103
102
|
getNamedNode(nodeId: number): Node;
|
|
104
|
-
getMeshDataForPartitionedModel(meshnodeIndex: number): Promise<MeshnodeObject>;
|
|
105
103
|
captureModelStats(): number;
|
|
106
104
|
private captureStandardModelStats;
|
|
107
105
|
private capturePartitionedModelStats;
|
|
@@ -5,6 +5,7 @@ import type { StreamedMeshnode } from './StreamedMeshnode';
|
|
|
5
5
|
import { MeshObject } from '../objects/MeshObject';
|
|
6
6
|
import { MeshData } from './MeshData';
|
|
7
7
|
import { Mesh } from '../standard/Mesh';
|
|
8
|
+
import { OPFSFile } from '../../../utils/OPFSFile';
|
|
8
9
|
import type { ValidatedFeatureFlags } from '../../../types/WebviewerOptions';
|
|
9
10
|
import type { ResourceDiscriminator } from '../../../Webviewer';
|
|
10
11
|
export declare class StreamedMeshServices extends MeshServices {
|
|
@@ -20,6 +21,7 @@ export declare class StreamedMeshServices extends MeshServices {
|
|
|
20
21
|
});
|
|
21
22
|
initOPFS(): Promise<void>;
|
|
22
23
|
private deleteOPFSFile;
|
|
24
|
+
getOPFSFile(): OPFSFile | undefined;
|
|
23
25
|
closeOPFS(): Promise<void>;
|
|
24
26
|
writeMeshDataToOPFS(meshData: MeshData): Promise<void>;
|
|
25
27
|
getMeshObject(meshIndex: number): MeshObject;
|
|
@@ -16,16 +16,18 @@ import { Meshnode } from './standard/Meshnode';
|
|
|
16
16
|
import { PartitionProxy } from './streaming/PartitionProxy';
|
|
17
17
|
import { StreamedGeometryFactory } from '../../procoregl/StreamedGeometryFactory';
|
|
18
18
|
import { MeshObject } from './objects/MeshObject';
|
|
19
|
-
import { MeshnodeObject } from './objects/MeshnodeObject';
|
|
20
19
|
import { LRUCache } from '../../utils/LRUCache';
|
|
21
20
|
import { Partition } from './streaming/Partition';
|
|
22
21
|
import { GeometryFactory } from '../../procoregl/GeometryFactory';
|
|
23
22
|
import type { BootstrapperResult } from '../../controllers/Bootstrapper';
|
|
24
23
|
import { Manifest } from './Manifest';
|
|
25
24
|
import { Vector3 } from '../../types/Math';
|
|
25
|
+
import type { ValidatedFeatureFlags } from '../../types/WebviewerOptions';
|
|
26
|
+
import type { ResourceDiscriminator } from '../../Webviewer';
|
|
26
27
|
export declare class PWFV2 implements PWF {
|
|
27
28
|
private readonly downloadMetaData;
|
|
28
29
|
resourceId: number;
|
|
30
|
+
resource: ResourceDiscriminator;
|
|
29
31
|
streaming: boolean;
|
|
30
32
|
nodeAB?: ArrayBuffer;
|
|
31
33
|
meshnodeAB?: ArrayBuffer;
|
|
@@ -48,14 +50,18 @@ export declare class PWFV2 implements PWF {
|
|
|
48
50
|
meshnodeOffPointer: number;
|
|
49
51
|
bvhTree?: BVHTree;
|
|
50
52
|
_virtualMeshnodeIndexOffset: number;
|
|
53
|
+
private readonly featureFlags;
|
|
51
54
|
loadPartitionPromises: Promise<void>[];
|
|
52
55
|
currentIndex: number;
|
|
53
56
|
partitionProxies: PartitionProxy[];
|
|
54
57
|
partitionsCache: LRUCache<string, Partition>;
|
|
58
|
+
private meshServicesOPFSInitialized;
|
|
55
59
|
constructor(params: {
|
|
56
60
|
downloadMetaData: DownloadMetaData;
|
|
57
61
|
resourceId: number;
|
|
62
|
+
resource: ResourceDiscriminator;
|
|
58
63
|
manifest: Manifest;
|
|
64
|
+
featureFlags: ValidatedFeatureFlags;
|
|
59
65
|
});
|
|
60
66
|
setStandardModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, meshAB: ArrayBuffer): void;
|
|
61
67
|
setPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionProxiesAB: ArrayBuffer): void;
|
|
@@ -98,7 +104,6 @@ export declare class PWFV2 implements PWF {
|
|
|
98
104
|
numFirstObjects(): number;
|
|
99
105
|
breadthFirstTraversalNodes(callback: (n: Node | Meshnode) => void): BootstrapperResult;
|
|
100
106
|
getNamedNode(nodeId: number): Node;
|
|
101
|
-
getMeshDataForPartitionedModel(meshnodeIndex: number): Promise<MeshnodeObject>;
|
|
102
107
|
captureModelStats(): number;
|
|
103
108
|
private captureStandardModelStats;
|
|
104
109
|
private capturePartitionedModelStats;
|
|
@@ -14,5 +14,6 @@ export declare class MeshData {
|
|
|
14
14
|
faces(): Uint16Array;
|
|
15
15
|
uploadToGPU(geometryFactory: StreamedGeometryFactory): StreamedMeshGeometry;
|
|
16
16
|
uploadToGPUPreFetching(geometryFactory: StreamedGeometryFactory): StreamedMeshGeometry;
|
|
17
|
+
getCompressedMeshData(): ArrayBuffer;
|
|
17
18
|
getUncompressedMeshData(): ArrayBuffer;
|
|
18
19
|
}
|
|
@@ -2,8 +2,10 @@ import { Partition } from './Partition';
|
|
|
2
2
|
import type { StreamedMeshnode } from './StreamedMeshnode';
|
|
3
3
|
import { PWFPartitionProxy } from '../interface/PWFPartitionProxy';
|
|
4
4
|
import { StreamedGeometryFactory } from '../../../procoregl/StreamedGeometryFactory';
|
|
5
|
+
import { StreamedMeshServices } from './StreamedMeshServices';
|
|
5
6
|
export declare class PartitionProxy {
|
|
6
7
|
private pwfPartitionProxy;
|
|
8
|
+
private meshServices;
|
|
7
9
|
static numberOfPartitions: number;
|
|
8
10
|
static numberOfPartitionsLoaded: number;
|
|
9
11
|
static currentNumberOfDownloading: number;
|
|
@@ -14,7 +16,10 @@ export declare class PartitionProxy {
|
|
|
14
16
|
private _byteLength?;
|
|
15
17
|
private _compressedByteLength?;
|
|
16
18
|
private stats;
|
|
17
|
-
constructor(
|
|
19
|
+
constructor(params: {
|
|
20
|
+
pwfPartitionProxy: PWFPartitionProxy;
|
|
21
|
+
meshServices: StreamedMeshServices;
|
|
22
|
+
});
|
|
18
23
|
meshCount(): number;
|
|
19
24
|
incrementMeshCount(numMeshes: number): void;
|
|
20
25
|
vertexCount(): number;
|
|
@@ -32,7 +37,7 @@ export declare class PartitionProxy {
|
|
|
32
37
|
compressed: number;
|
|
33
38
|
size: number;
|
|
34
39
|
};
|
|
35
|
-
static processPartitionProxiesAB(partitionProxiesAB: ArrayBuffer, callback: (partitionProxy: PartitionProxy) => void): void;
|
|
40
|
+
static processPartitionProxiesAB(partitionProxiesAB: ArrayBuffer, meshServices: StreamedMeshServices, callback: (partitionProxy: PartitionProxy) => void): void;
|
|
36
41
|
static getPartitionProxies(partitionProxiesAB: ArrayBuffer): PWFPartitionProxy[];
|
|
37
42
|
getContentOfPartitionUrl(): string;
|
|
38
43
|
}
|
|
@@ -3,10 +3,31 @@ import type { PWFV2 } from '../PWFV2';
|
|
|
3
3
|
import { MeshServices } from '../standard';
|
|
4
4
|
import type { StreamedMeshnode } from './StreamedMeshnode';
|
|
5
5
|
import { MeshObject } from '../objects/MeshObject';
|
|
6
|
+
import { MeshData } from './MeshData';
|
|
7
|
+
import { Mesh } from '../standard/Mesh';
|
|
8
|
+
import { OPFSFile } from '../../../utils/OPFSFile';
|
|
9
|
+
import type { ValidatedFeatureFlags } from '../../../types/WebviewerOptions';
|
|
10
|
+
import type { ResourceDiscriminator } from '../../../Webviewer';
|
|
6
11
|
export declare class StreamedMeshServices extends MeshServices {
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
private readonly featureFlags;
|
|
13
|
+
private meshIndexToOPFSRecord;
|
|
14
|
+
private opfsFile?;
|
|
15
|
+
private opfsOffset;
|
|
16
|
+
private resource;
|
|
17
|
+
constructor(params: {
|
|
18
|
+
pwf: PWFV2;
|
|
19
|
+
featureFlags: ValidatedFeatureFlags;
|
|
20
|
+
resource: ResourceDiscriminator;
|
|
21
|
+
});
|
|
22
|
+
initOPFS(): Promise<void>;
|
|
23
|
+
private deleteOPFSFile;
|
|
24
|
+
getOPFSFile(): OPFSFile | undefined;
|
|
25
|
+
closeOPFS(): Promise<void>;
|
|
26
|
+
writeMeshDataToOPFS(meshData: MeshData): Promise<void>;
|
|
27
|
+
getMeshObject(meshIndex: number): MeshObject;
|
|
9
28
|
loadPartitionContainingMeshnode(streamedMeshnode: StreamedMeshnode): Promise<void>;
|
|
10
29
|
getMeshGeometryForOffsets(meshOffset: number, meshnodeOffset: number): StreamedMeshGeometry | undefined;
|
|
11
|
-
|
|
30
|
+
meshFromOffset(meshIndex: number): Mesh;
|
|
31
|
+
private getCompressedMeshDataFromOPFS;
|
|
32
|
+
dispose(): Promise<void>;
|
|
12
33
|
}
|
package/dist/types/src/sdk.d.ts
CHANGED
|
@@ -6,10 +6,11 @@ export { Cache };
|
|
|
6
6
|
export { Webviewer } from './Webviewer';
|
|
7
7
|
export { BenchmarkReporter as Benchmark } from './utils/Benchmark';
|
|
8
8
|
export { TestRoutineRecorder } from './utils/Benchmark';
|
|
9
|
-
export type { Options, GeometryBundle, FileExtractionModePwfV1OverrideOptions, FileExtractionModePwfV2OverrideOptions, FileExtractionModeOptions,
|
|
10
|
-
export type {
|
|
9
|
+
export type { Options, GeometryBundle, FileExtractionModePwfV1OverrideOptions, FileExtractionModePwfV2OverrideOptions, FileExtractionModeOptions, ModelRevisionModePwfV2OverrideOptions, ModelRevisionModePwfV1OverrideOptions, ModelRevisionModeOptions, Resource, ResourceOptions, FileExtractionModePwfV1OverrideResource, FileExtractionModePwfV2OverrideResource, FileExtractionModeResource, ModelRevisionModePwfV1OverrideResource, ModelRevisionModePwfV2OverrideResource, ModelRevisionModeResource, PwfV1Bundle, PwfV2Bundle, CommonOptions, FeatureFlags, } from './types/WebviewerOptions';
|
|
10
|
+
export type { FileExtraction, BimFileUpload, FileExtractionItem, WebFormatExtractionItem, PropertiesExtractionItem, FileVersion, Attachment, PropertiesFile, } from './api/types/FileExtraction';
|
|
11
11
|
export type { Model } from './api/types/Model';
|
|
12
12
|
export type { ModelRevision, ModelRevisionViewpoint, } from './api/types/ModelRevision';
|
|
13
|
+
export type { GeometryFileBundle } from './api/types/GeometryFileBundle';
|
|
13
14
|
export type { Viewpoint, Visibility } from './api/types/Viewpoint';
|
|
14
15
|
export type { Project } from './api/types/Project';
|
|
15
16
|
export type { Vector2, Vector3, BoundingBox } from './types/Math';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Project } from '../api/types/Project';
|
|
2
|
-
import { FileExtraction
|
|
2
|
+
import { FileExtraction } from '../api/types/FileExtraction';
|
|
3
3
|
import { Model } from '../api/types/Model';
|
|
4
4
|
import { ModelRevision } from '../api/types/ModelRevision';
|
|
5
5
|
import type { Tool } from '../components/Tool';
|
|
@@ -66,39 +66,33 @@ export type CommonOptions = {
|
|
|
66
66
|
* the valid configurations that we support.
|
|
67
67
|
*/
|
|
68
68
|
export type GeometryBundle = {
|
|
69
|
-
nodeUrl:
|
|
70
|
-
meshnodeUrl:
|
|
71
|
-
meshUrl?:
|
|
72
|
-
manifestUrl?:
|
|
69
|
+
nodeUrl: string;
|
|
70
|
+
meshnodeUrl: string;
|
|
71
|
+
meshUrl?: string;
|
|
72
|
+
manifestUrl?: string;
|
|
73
73
|
};
|
|
74
74
|
export type PwfV2Bundle = {
|
|
75
|
-
nodeUrl:
|
|
76
|
-
meshnodeUrl:
|
|
77
|
-
meshUrl:
|
|
78
|
-
manifestUrl:
|
|
75
|
+
nodeUrl: string;
|
|
76
|
+
meshnodeUrl: string;
|
|
77
|
+
meshUrl: string;
|
|
78
|
+
manifestUrl: string;
|
|
79
79
|
};
|
|
80
80
|
export type PwfV1Bundle = {
|
|
81
|
-
nodeUrl:
|
|
82
|
-
meshnodeUrl:
|
|
83
|
-
meshUrl:
|
|
84
|
-
};
|
|
85
|
-
export type FileExtractionModePwfV1OverrideOptions = CommonOptions & PwfV1Bundle & {
|
|
86
|
-
fileExtractionId: FileExtraction['id'];
|
|
87
|
-
};
|
|
88
|
-
export type FileExtractionModePwfV2OverrideOptions = CommonOptions & PwfV2Bundle & {
|
|
89
|
-
fileExtractionId: FileExtraction['id'];
|
|
81
|
+
nodeUrl: string;
|
|
82
|
+
meshnodeUrl: string;
|
|
83
|
+
meshUrl: string;
|
|
90
84
|
};
|
|
91
85
|
export type FileExtractionModeOptions = CommonOptions & {
|
|
92
86
|
fileExtractionId: FileExtraction['id'];
|
|
93
87
|
};
|
|
94
|
-
export type
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
};
|
|
98
|
-
export type ModelRevisionModePwfV2Options = CommonOptions & PwfV2Bundle & {
|
|
88
|
+
export type FileExtractionModePwfV1OverrideOptions = FileExtractionModeOptions & PwfV1Bundle;
|
|
89
|
+
export type FileExtractionModePwfV2OverrideOptions = FileExtractionModeOptions & PwfV2Bundle;
|
|
90
|
+
export type ModelRevisionModeOptions = CommonOptions & {
|
|
99
91
|
modelId: Model['id'];
|
|
100
92
|
modelRevisionId: ModelRevision['id'];
|
|
101
93
|
};
|
|
94
|
+
export type ModelRevisionModePwfV1OverrideOptions = ModelRevisionModeOptions & PwfV1Bundle;
|
|
95
|
+
export type ModelRevisionModePwfV2OverrideOptions = ModelRevisionModeOptions & PwfV2Bundle;
|
|
102
96
|
export type FileExtractionModePwfV1OverrideResource = PwfV1Bundle & {
|
|
103
97
|
fileExtractionId: FileExtraction['id'];
|
|
104
98
|
};
|
|
@@ -108,29 +102,35 @@ export type FileExtractionModePwfV2OverrideResource = PwfV2Bundle & {
|
|
|
108
102
|
export type FileExtractionModeResource = {
|
|
109
103
|
fileExtractionId: FileExtraction['id'];
|
|
110
104
|
};
|
|
111
|
-
export type
|
|
105
|
+
export type ModelRevisionModePwfV1OverrideResource = PwfV1Bundle & {
|
|
106
|
+
modelId: Model['id'];
|
|
107
|
+
modelRevisionId: ModelRevision['id'];
|
|
108
|
+
};
|
|
109
|
+
export type ModelRevisionModePwfV2OverrideResource = PwfV2Bundle & {
|
|
112
110
|
modelId: Model['id'];
|
|
113
111
|
modelRevisionId: ModelRevision['id'];
|
|
114
112
|
};
|
|
115
|
-
export type
|
|
113
|
+
export type ModelRevisionModeResource = {
|
|
116
114
|
modelId: Model['id'];
|
|
117
115
|
modelRevisionId: ModelRevision['id'];
|
|
118
116
|
};
|
|
119
|
-
export type Resource = FileExtractionModePwfV1OverrideResource | FileExtractionModePwfV2OverrideResource | FileExtractionModeResource |
|
|
117
|
+
export type Resource = FileExtractionModePwfV1OverrideResource | FileExtractionModePwfV2OverrideResource | FileExtractionModeResource | ModelRevisionModePwfV1OverrideResource | ModelRevisionModePwfV2OverrideResource | ModelRevisionModeResource;
|
|
120
118
|
export type ResourceOptions = CommonOptions & {
|
|
121
119
|
resources: Resource[];
|
|
122
120
|
};
|
|
123
|
-
export type Options = FileExtractionModePwfV2OverrideOptions | FileExtractionModePwfV1OverrideOptions | FileExtractionModeOptions |
|
|
124
|
-
export declare const
|
|
125
|
-
export declare const
|
|
121
|
+
export type Options = FileExtractionModePwfV2OverrideOptions | FileExtractionModePwfV1OverrideOptions | FileExtractionModeOptions | ModelRevisionModePwfV2OverrideOptions | ModelRevisionModePwfV1OverrideOptions | ModelRevisionModeOptions | ResourceOptions;
|
|
122
|
+
export declare const isModelRevisionModePwfV1OverrideOptions: (options: Options) => options is ModelRevisionModePwfV1OverrideOptions;
|
|
123
|
+
export declare const isModelRevisionModePwfV2OverrideOptions: (options: Options) => options is ModelRevisionModePwfV2OverrideOptions;
|
|
126
124
|
export declare const isFileExtractionModePwfV1OverrideOptions: (options: Options) => options is FileExtractionModePwfV1OverrideOptions;
|
|
127
125
|
export declare const isFileExtractionModePwfV2OverrideOptions: (options: Options) => options is FileExtractionModePwfV2OverrideOptions;
|
|
128
126
|
export declare const isFileExtractionModeOptions: (options: Options) => options is FileExtractionModeOptions;
|
|
129
127
|
export declare const isFileExtractionModePwfV2OverrideResource: (resource: Resource) => resource is FileExtractionModePwfV2OverrideResource;
|
|
130
128
|
export declare const isFileExtractionModePwfV1OverrideResource: (resource: Resource) => resource is FileExtractionModePwfV1OverrideResource;
|
|
131
129
|
export declare const isFileExtractionModeResource: (resource: Resource) => resource is FileExtractionModeResource;
|
|
132
|
-
export declare const
|
|
133
|
-
export declare const
|
|
130
|
+
export declare const isModelRevisionModePwfV2OverrideResource: (resource: Resource) => resource is ModelRevisionModePwfV2OverrideResource;
|
|
131
|
+
export declare const isModelRevisionModePwfV1OverrideResource: (resource: Resource) => resource is ModelRevisionModePwfV1OverrideResource;
|
|
132
|
+
export declare const isModelRevisionModeOptions: (options: Options) => options is ModelRevisionModeOptions;
|
|
133
|
+
export declare const isModelRevisionModeResource: (resource: Resource) => resource is ModelRevisionModeResource;
|
|
134
134
|
export declare const isResourceOptions: (options: Options) => options is ResourceOptions;
|
|
135
135
|
/**
|
|
136
136
|
* Type Testing
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const setMeasurementSchema: {
|
|
2
|
+
type: string;
|
|
3
|
+
properties: {
|
|
4
|
+
enable: {
|
|
5
|
+
type: string;
|
|
6
|
+
};
|
|
7
|
+
options: {
|
|
8
|
+
type: string;
|
|
9
|
+
properties: {
|
|
10
|
+
measurementMode: {
|
|
11
|
+
type: string;
|
|
12
|
+
enum: string[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
additionalProperties: boolean;
|
|
16
|
+
default: {};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
required: string[];
|
|
20
|
+
additionalProperties: boolean;
|
|
21
|
+
};
|
|
@@ -2,6 +2,7 @@ import { FileExtraction, PropertiesFile, FileVersion, Attachment } from '../../a
|
|
|
2
2
|
import { ModelRevision } from '../../api/types/ModelRevision';
|
|
3
3
|
import * as FileExtractions from '../../api/bim_file_extractions';
|
|
4
4
|
import * as BimModelRevisions from '../../api/bim_model_revisions';
|
|
5
|
+
import * as BimViewpoints from '../../api/bim_viewpoints';
|
|
5
6
|
import { Options, GeometryBundle } from '../../types/WebviewerOptions';
|
|
6
7
|
import { InternalViewpoint } from '../../viewpoint/types';
|
|
7
8
|
import { Model } from '../../api/types/Model';
|
|
@@ -14,6 +15,7 @@ export type ResourceBundle = ({
|
|
|
14
15
|
type Api = {
|
|
15
16
|
getBimFileExtraction: typeof FileExtractions.GetBimFileExtraction;
|
|
16
17
|
getBimModelRevision: typeof BimModelRevisions.GetBimModelRevision;
|
|
18
|
+
getBimViewpoint: typeof BimViewpoints.GetBimViewpoint;
|
|
17
19
|
};
|
|
18
20
|
type ApiOptions = Partial<Api>;
|
|
19
21
|
export declare const API_MODE: {
|
|
@@ -26,6 +28,7 @@ export declare class ApiMetaData {
|
|
|
26
28
|
private api;
|
|
27
29
|
apiMode: ApiMode;
|
|
28
30
|
constructor(options: Options & ApiOptions);
|
|
31
|
+
private getModelRevisionBundle;
|
|
29
32
|
private getFileExtractionBundle;
|
|
30
33
|
get fileVersions(): Promise<FileVersion[]>;
|
|
31
34
|
get attachments(): Promise<Attachment[]>;
|
|
@@ -39,8 +42,10 @@ export declare class ApiMetaData {
|
|
|
39
42
|
get companyId(): Promise<number>;
|
|
40
43
|
get baseUrl(): Promise<string>;
|
|
41
44
|
get fileExtractionIds(): Promise<number[]>;
|
|
45
|
+
get fileExtraction(): Promise<FileExtraction>;
|
|
42
46
|
get modelRevision(): Promise<ModelRevision>;
|
|
43
47
|
get homeViewpoint(): Promise<InternalViewpoint | undefined>;
|
|
44
48
|
private get homeViewpointInModelRevisionMode();
|
|
49
|
+
private get homeViewpointInFileExtractionMode();
|
|
45
50
|
}
|
|
46
51
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { FileExtractionModePwfV2OverrideOptions, FileExtractionModePwfV1OverrideOptions, FileExtractionModeOptions,
|
|
1
|
+
import type { FileExtractionModePwfV2OverrideOptions, FileExtractionModePwfV1OverrideOptions, FileExtractionModeOptions, ModelRevisionModePwfV2OverrideOptions, ModelRevisionModePwfV1OverrideOptions, ModelRevisionModeOptions, FileExtractionModePwfV1OverrideResource, FileExtractionModePwfV2OverrideResource, ModelRevisionModePwfV1OverrideResource, ModelRevisionModePwfV2OverrideResource, ModelRevisionModeResource, ResourceOptions } from '../../../types/WebviewerOptions';
|
|
2
2
|
import { FileExtraction } from '../../../api/types/FileExtraction';
|
|
3
|
-
import { ModelRevision
|
|
3
|
+
import { ModelRevision } from '../../../api/types/ModelRevision';
|
|
4
4
|
import { InternalViewpoint } from '../../../viewpoint/types';
|
|
5
|
+
import type { Viewpoint } from '../../../api/types/Viewpoint';
|
|
5
6
|
export declare const projectId = 4;
|
|
6
7
|
export declare const companyId = 1;
|
|
7
8
|
export declare const fileExtractionId = 1;
|
|
@@ -52,18 +53,21 @@ export declare const pwfV1Bundle: {
|
|
|
52
53
|
export declare const fileExtractionModePwfV1OverrideOptions: FileExtractionModePwfV1OverrideOptions;
|
|
53
54
|
export declare const fileExtractionModePwfV2OverrideOptions: FileExtractionModePwfV2OverrideOptions;
|
|
54
55
|
export declare const fileExtractionModeOptions: FileExtractionModeOptions;
|
|
55
|
-
export declare const
|
|
56
|
-
export declare const
|
|
56
|
+
export declare const modelRevisionModePwfV1OverrideOptions: ModelRevisionModePwfV1OverrideOptions;
|
|
57
|
+
export declare const modelRevisionModePwfV2OverrideOptions: ModelRevisionModePwfV2OverrideOptions;
|
|
58
|
+
export declare const modelRevisionModeOptions: ModelRevisionModeOptions;
|
|
57
59
|
export declare const fileExtractionModeResourceOptions: ResourceOptions;
|
|
58
60
|
export declare const fileExtractionModePwfV1OverrideResource: FileExtractionModePwfV1OverrideResource;
|
|
59
61
|
export declare const fileExtractionModePwfV1OverrideResourceOptions: ResourceOptions;
|
|
60
62
|
export declare const fileExtractionModePwfV2OverrideResource: FileExtractionModePwfV2OverrideResource;
|
|
61
63
|
export declare const fileExtractionModePwfV2OverrideResourceOptions: ResourceOptions;
|
|
62
|
-
export declare const
|
|
63
|
-
export declare const
|
|
64
|
-
export declare const
|
|
65
|
-
export declare const
|
|
64
|
+
export declare const modelRevisionModePwfV1OverrideResource: ModelRevisionModePwfV1OverrideResource;
|
|
65
|
+
export declare const modelRevisionModePwfV1OverrideResourceOptions: ResourceOptions;
|
|
66
|
+
export declare const modelRevisionModePwfV2OverrideResource: ModelRevisionModePwfV2OverrideResource;
|
|
67
|
+
export declare const modelRevisionModePwfV2OverrideResourceOptions: ResourceOptions;
|
|
68
|
+
export declare const modelRevisionModeResource: ModelRevisionModeResource;
|
|
69
|
+
export declare const modelRevisionModeResourceOptions: ResourceOptions;
|
|
66
70
|
export declare const fileExtraction: FileExtraction;
|
|
67
|
-
export declare const
|
|
71
|
+
export declare const viewpoint: Viewpoint;
|
|
68
72
|
export declare const modelRevision: ModelRevision;
|
|
69
73
|
export declare const bimHomeViewpoint: InternalViewpoint;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApiMetaData as _ApiMetaData } from './ApiMetaData';
|
|
2
2
|
import { Options } from '../../types/WebviewerOptions';
|
|
3
3
|
export { API_MODE, ApiMode } from './ApiMetaData';
|
|
4
|
+
export { ApiMetaData as ApiMetaDataInstance } from './ApiMetaData';
|
|
4
5
|
export declare namespace ApiMetaData {
|
|
5
6
|
let store: _ApiMetaData;
|
|
6
7
|
const init: (initOptions: Options) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { isBehindCamera } from './CameraHelper';
|
|
@@ -3,6 +3,7 @@ export declare class MainThreadSyncAccessHandleFallback implements FileSystemSyn
|
|
|
3
3
|
private buffer;
|
|
4
4
|
private path;
|
|
5
5
|
constructor(path: string);
|
|
6
|
+
static clearOpenHandles(): void;
|
|
6
7
|
close(): void;
|
|
7
8
|
read(buffer: ArrayBuffer, options: {
|
|
8
9
|
at: number;
|
|
@@ -10,7 +11,7 @@ export declare class MainThreadSyncAccessHandleFallback implements FileSystemSyn
|
|
|
10
11
|
write(buffer: ArrayBuffer, options: {
|
|
11
12
|
at: number;
|
|
12
13
|
}): number;
|
|
13
|
-
truncate(
|
|
14
|
+
truncate(newSize: number): void;
|
|
14
15
|
flush(): void;
|
|
15
16
|
getSize(): number;
|
|
16
17
|
}
|
|
@@ -2,6 +2,7 @@ export declare const getFileHandleFromPath: (path: string, options?: {
|
|
|
2
2
|
create?: boolean;
|
|
3
3
|
}) => Promise<FileSystemFileHandle>;
|
|
4
4
|
export declare const clearOPFS: () => Promise<void>;
|
|
5
|
+
export declare function nextIndexAvailable(folder: string, baseFileName: string, fileExtension: string): Promise<number>;
|
|
5
6
|
export declare class OPFSFile {
|
|
6
7
|
private path;
|
|
7
8
|
private syncAccessHandle?;
|
|
@@ -13,7 +14,7 @@ export declare class OPFSFile {
|
|
|
13
14
|
delete(): Promise<void>;
|
|
14
15
|
close(): void;
|
|
15
16
|
truncate(offset: number): void;
|
|
16
|
-
write(buffer: ArrayBuffer,
|
|
17
|
-
read(
|
|
17
|
+
write(buffer: ArrayBuffer, byteOffset?: number): number | undefined;
|
|
18
|
+
read(byteOffset?: number, byteLength?: number): ArrayBuffer;
|
|
18
19
|
private updateReadStats;
|
|
19
20
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { OPFSFile, nextIndexAvailable, clearOPFS, getFileHandleFromPath, } from './OPFSFile';
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { OPFSFile } from './OPFSFile';
|
|
File without changes
|