@procore/bim-webviewer-sdk 16.6.0-rc.8 → 17.0.0-rc.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 +14 -4
- package/dist/Procore.Bim.Webviewer.d.ts +156 -2317
- package/dist/Procore.Bim.Webviewer.js +1 -1
- package/dist/types/src/Webviewer.d.ts +4 -3
- package/dist/types/src/api/analytic_events/analyticKeys.d.ts +31 -30
- package/dist/types/src/api/analytic_events/index.d.ts +1 -1
- package/dist/types/src/api/analytic_events/payloadFactories.d.ts +8 -8
- package/dist/types/src/components/ContextMenuComponent/ContextMenuComponent.d.ts +1 -1
- package/dist/types/src/components/RootComponent.d.ts +3 -3
- package/dist/types/src/components/ShortestDistanceComponent.d.ts +1 -1
- package/dist/types/src/components/ToolBarComponent/ToolBarComponent.d.ts +1 -0
- package/dist/types/src/components/ToolBarComponent/ToolbarButton/SplitButton.d.ts +7 -5
- package/dist/types/src/components/WindowModelObjectComponent/VirtualizedList.d.ts +1 -1
- package/dist/types/src/components/WindowModelObjectComponent/WindowModelObjectComponent.d.ts +3 -3
- package/dist/types/src/components/WindowTreeComponent.d.ts +0 -1
- package/dist/types/src/components/WindowTreeViewComponent.d.ts +2 -3
- package/dist/types/src/components/WindowViewPropertiesComponent/WindowViewPropertiesComponent.d.ts +3 -3
- package/dist/types/src/controllers/ApiController/ApiController.d.ts +2 -2
- package/dist/types/src/controllers/CacheController.d.ts +3 -2
- package/dist/types/src/controllers/DatabaseController.d.ts +2 -1
- package/dist/types/src/controllers/DomController/DomController.d.ts +0 -1
- package/dist/types/src/controllers/PubSubController.d.ts +3 -1
- package/dist/types/src/controllers/RenderController.d.ts +18 -17
- package/dist/types/src/controllers/RenderControllerProxy.d.ts +13 -11
- package/dist/types/src/controllers/RenderControllerWorker.d.ts +1 -0
- package/dist/types/src/controllers/RenderStatusType.d.ts +4 -4
- package/dist/types/src/controllers/__tests__/fixtures.d.ts +4 -1
- package/dist/types/src/measuring/MeasurementManager.d.ts +5 -4
- package/dist/types/src/measuring/PointToPointController.d.ts +6 -0
- package/dist/types/src/measuring/PointToPointManager.d.ts +13 -0
- package/dist/types/src/measuring/__tests__/PointToPointFixtures.d.ts +5 -4
- package/dist/types/src/measuring/createPointToPointLineDrawingDebugGui.d.ts +0 -5
- package/dist/types/src/messages.d.ts +7 -7
- package/dist/types/src/navigation/DefaultControl.d.ts +0 -11
- package/dist/types/src/navigation/Orbit/calcNewPosition.d.ts +0 -1
- package/dist/types/src/navigation/Orbit/getQuatToCylinderSpace.d.ts +0 -1
- package/dist/types/src/navigation/__tests__/FixedOrbitControl.test.d.ts +1 -0
- package/dist/types/src/navigation/__tests__/ZoomControl.test.d.ts +1 -0
- package/dist/types/src/procoregl/HiddenNodeServices/HiddenNodeServices.d.ts +1 -1
- package/dist/types/src/procoregl/HiddenNodeServices/rangify.d.ts +2 -8
- package/dist/types/src/procoregl/Models/Models.d.ts +3 -1
- package/dist/types/src/procoregl/PartitionsRenderer.d.ts +3 -3
- package/dist/types/src/procoregl/ProcoreGeometries/ProcoreArrow.d.ts +0 -1
- package/dist/types/src/procoregl/ProcoreGeometries/StubbyArrow.d.ts +0 -1
- package/dist/types/src/procoregl/SectionDisplay/getCursorDirectionFromCameraToPlane.d.ts +1 -2
- 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/sdk.d.ts +1 -0
- package/dist/types/src/sectioning/utils.d.ts +0 -1
- package/dist/types/src/threeShaking.d.ts +47 -47
- package/dist/types/src/types/WebviewerOptions.d.ts +8 -3
- package/dist/types/src/unit_util.d.ts +3 -3
- package/dist/types/src/utils/Benchmark/MainThreadBenchmark.d.ts +2 -2
- package/dist/types/src/utils/DebugGui/MainThreadDebugGui.d.ts +1 -1
- package/dist/types/src/utils/DebugGui/WorkerDebugGui.d.ts +1 -1
- package/dist/types/src/utils/ZoomExtents/__tests__/computePoseToFitBoxFromPosition.test.d.ts +0 -1
- package/dist/types/src/utils/ZoomExtents/computeRefinedBbox.d.ts +2 -3
- package/dist/types/src/utils/ZoomExtents/utils.d.ts +0 -1
- package/dist/types/src/utils/i18n.d.ts +1 -1
- package/dist/types/src/validateOptions/checkTools.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export namespace Messages {
|
|
2
2
|
namespace MessageType {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
let Error: string;
|
|
4
|
+
let Warning: string;
|
|
5
5
|
}
|
|
6
6
|
namespace MessageComponent {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
let Downloading: string;
|
|
8
|
+
let Engine: string;
|
|
9
|
+
let FileReading: string;
|
|
10
|
+
let Cache: string;
|
|
11
|
+
let FloorPlan: string;
|
|
12
12
|
}
|
|
13
13
|
function getMessage(type: any, component: any, message: any): {
|
|
14
14
|
messageType: any;
|
|
@@ -7,10 +7,6 @@ export declare class DefaultControl implements MouseControl {
|
|
|
7
7
|
private isRotating;
|
|
8
8
|
private startMouseDown?;
|
|
9
9
|
private lockRotation;
|
|
10
|
-
private surfaceCursor;
|
|
11
|
-
private edgeCursor;
|
|
12
|
-
private midPointCursor;
|
|
13
|
-
private endPointCursor;
|
|
14
10
|
private static COUNTS_AS_CLICK_THRESHOLD;
|
|
15
11
|
constructor(params: {
|
|
16
12
|
dom: HTMLElement;
|
|
@@ -23,12 +19,5 @@ export declare class DefaultControl implements MouseControl {
|
|
|
23
19
|
dispose(): void;
|
|
24
20
|
private updateSectionHover;
|
|
25
21
|
private onSectionBoxDisplayHoverUpdated;
|
|
26
|
-
private onMeasurementObjectMove;
|
|
27
|
-
private onMeasurementObjectLeave;
|
|
28
|
-
private onMeasurementObjectEnter;
|
|
29
|
-
private updatePointToPointCursor;
|
|
30
22
|
private resetCursor;
|
|
31
|
-
private updateCursorPosition;
|
|
32
|
-
private updatePointToPointCursorSize;
|
|
33
|
-
private addPointToPointCursorToDom;
|
|
34
23
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -23,7 +23,7 @@ export declare class HiddenNodeServices {
|
|
|
23
23
|
hasMeshnodeIndices: (indexes: Array<number>, resourceId: number) => boolean;
|
|
24
24
|
private nodeNeedsUpdating;
|
|
25
25
|
getVisibility: (resourceId: number, options?: {
|
|
26
|
-
defaultVisibilityAlwaysTrue?: boolean
|
|
26
|
+
defaultVisibilityAlwaysTrue?: boolean;
|
|
27
27
|
}) => Visibility;
|
|
28
28
|
setVisibility: (visibility: Visibility, resourceId: number) => void;
|
|
29
29
|
private updateNodeAndChildren;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
export declare const rangify: (numbers: number[]) => {
|
|
2
2
|
numbers: number[];
|
|
3
|
-
ranges: [
|
|
4
|
-
number,
|
|
5
|
-
number
|
|
6
|
-
][];
|
|
3
|
+
ranges: [number, number][];
|
|
7
4
|
};
|
|
8
5
|
export declare const derangify: (rangified: {
|
|
9
6
|
numbers: number[];
|
|
10
|
-
ranges: [
|
|
11
|
-
number,
|
|
12
|
-
number
|
|
13
|
-
][];
|
|
7
|
+
ranges: [number, number][];
|
|
14
8
|
}) => number[];
|
|
@@ -9,6 +9,7 @@ import { MeshObject } from '../../pwfreader/v1/objects/MeshObject';
|
|
|
9
9
|
import type { ViewerRenderer } from '../ViewerRenderer';
|
|
10
10
|
import type { BootstrapperResult } from '../../controllers/Bootstrapper';
|
|
11
11
|
import { Vector3 } from '../../types/Math';
|
|
12
|
+
import type { ValidatedFeatureFlags } from '../../types/WebviewerOptions';
|
|
12
13
|
export declare function computeDetailsParam(totalFaces: number): {
|
|
13
14
|
detailsInMotion: number;
|
|
14
15
|
detailsAtRest: number;
|
|
@@ -47,6 +48,7 @@ export declare class Models {
|
|
|
47
48
|
modelDescriptors: ModelDescriptor[];
|
|
48
49
|
selectionOption: SelectMethod;
|
|
49
50
|
prefetchingPartitions?: boolean;
|
|
51
|
+
featureFlags: ValidatedFeatureFlags;
|
|
50
52
|
});
|
|
51
53
|
private sceneGraphFactory;
|
|
52
54
|
getResourceId: (resource: ResourceDiscriminator) => number;
|
|
@@ -57,7 +59,7 @@ export declare class Models {
|
|
|
57
59
|
parsePwfNodes(): BootstrapperResult;
|
|
58
60
|
parsePwfMeshnodes(): BootstrapperResult;
|
|
59
61
|
parsePwfMeshes(): void;
|
|
60
|
-
initMeshServices():
|
|
62
|
+
initMeshServices(): BootstrapperResult;
|
|
61
63
|
initNodeServices(): void;
|
|
62
64
|
initMeshnodeServices(): void;
|
|
63
65
|
initNodeTree(): BootstrapperResult;
|
|
@@ -91,6 +91,6 @@ export class PartitionsRenderer {
|
|
|
91
91
|
allocTextureUnit: () => number;
|
|
92
92
|
renderBufferDirect: (camera: any, fog: any, geometry: any, material: any, object: any, group: any) => void;
|
|
93
93
|
}
|
|
94
|
-
import { WebXRManager } from
|
|
95
|
-
import { WebVRManager } from
|
|
96
|
-
import { WebGLShadowMap } from
|
|
94
|
+
import { WebXRManager } from 'three/src/renderers/webvr/WebXRManager';
|
|
95
|
+
import { WebVRManager } from 'three/src/renderers/webvr/WebVRManager';
|
|
96
|
+
import { WebGLShadowMap } from 'three/src/renderers/webgl/WebGLShadowMap';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const getCursorDirectionFromCameraToPlane: (camera: THREE.Camera, plane?: THREE.Mesh) => 'ns' | 'ew' | 'nwse' | 'nesw' | null;
|
|
1
|
+
export declare const getCursorDirectionFromCameraToPlane: (camera: THREE.Camera, plane?: THREE.Mesh) => "ns" | "ew" | "nwse" | "nesw" | null;
|
|
@@ -4,12 +4,14 @@ import { GeometryFactory } from '../procoregl/GeometryFactory';
|
|
|
4
4
|
import type { BootstrapperResult } from '../controllers/Bootstrapper';
|
|
5
5
|
import type { DownloadMetaData } from '../procoregl/Models/Models';
|
|
6
6
|
import { PWF } from './PWF';
|
|
7
|
+
import type { ValidatedFeatureFlags } from '../types/WebviewerOptions';
|
|
7
8
|
export declare class PWFProxy implements PWF {
|
|
8
9
|
pwf: PWFVersion;
|
|
9
10
|
constructor(params: {
|
|
10
11
|
manifest: Manifest | undefined;
|
|
11
12
|
downloadMetaData: DownloadMetaData;
|
|
12
13
|
resourceId: number;
|
|
14
|
+
featureFlags: ValidatedFeatureFlags;
|
|
13
15
|
});
|
|
14
16
|
setStandardModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, meshAB: ArrayBuffer): void;
|
|
15
17
|
setPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionAB: ArrayBuffer): void;
|
|
@@ -18,7 +20,7 @@ export declare class PWFProxy implements PWF {
|
|
|
18
20
|
parsePwfNodes(): BootstrapperResult;
|
|
19
21
|
parsePwfMeshnodes(): BootstrapperResult;
|
|
20
22
|
parsePwfMeshes(): void;
|
|
21
|
-
initMeshServices():
|
|
23
|
+
initMeshServices(): BootstrapperResult;
|
|
22
24
|
initNodeServices(): void;
|
|
23
25
|
initMeshnodeServices(): void;
|
|
24
26
|
initNodeTree(): BootstrapperResult;
|
|
@@ -55,4 +57,5 @@ export declare class PWFProxy implements PWF {
|
|
|
55
57
|
get virtualMeshnodeIndexOffset(): number;
|
|
56
58
|
set virtualMeshnodeIndexOffset(offset: number);
|
|
57
59
|
isPartitionedModel(): boolean;
|
|
60
|
+
dispose(): void;
|
|
58
61
|
}
|
|
@@ -22,6 +22,7 @@ import { Partition } from './streaming/Partition';
|
|
|
22
22
|
import { GeometryFactory } from '../../procoregl/GeometryFactory';
|
|
23
23
|
import type { BootstrapperResult } from '../../controllers/Bootstrapper';
|
|
24
24
|
import { Vector3 } from '../../types/Math';
|
|
25
|
+
import type { ValidatedFeatureFlags } from '../../types/WebviewerOptions';
|
|
25
26
|
export declare class PWFV1 implements PWF {
|
|
26
27
|
private readonly downloadMetaData;
|
|
27
28
|
resourceId: number;
|
|
@@ -45,13 +46,16 @@ export declare class PWFV1 implements PWF {
|
|
|
45
46
|
meshnodeServices?: MeshnodeServices | StreamedMeshnodeServices;
|
|
46
47
|
bvhTree?: BVHTree;
|
|
47
48
|
_virtualMeshnodeIndexOffset: number;
|
|
49
|
+
private readonly featureFlags;
|
|
48
50
|
loadPartitionPromises: Promise<void>[];
|
|
49
51
|
currentIndex: number;
|
|
50
52
|
partitionProxies: PartitionProxy[];
|
|
51
53
|
partitionsCache: LRUCache<string, Partition>;
|
|
54
|
+
private meshServicesOPFSInitialized;
|
|
52
55
|
constructor(params: {
|
|
53
56
|
downloadMetaData: DownloadMetaData;
|
|
54
57
|
resourceId: number;
|
|
58
|
+
featureFlags: ValidatedFeatureFlags;
|
|
55
59
|
});
|
|
56
60
|
setStandardModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, meshAB: ArrayBuffer): void;
|
|
57
61
|
setPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionProxiesAB: ArrayBuffer): void;
|
|
@@ -60,7 +64,7 @@ export declare class PWFV1 implements PWF {
|
|
|
60
64
|
parsePwfNodes(): BootstrapperResult;
|
|
61
65
|
parsePwfMeshnodes(): BootstrapperResult;
|
|
62
66
|
parsePwfMeshes(): void;
|
|
63
|
-
initMeshServices():
|
|
67
|
+
initMeshServices(): BootstrapperResult;
|
|
64
68
|
initNodeServices(): void;
|
|
65
69
|
initMeshnodeServices(): void;
|
|
66
70
|
initNodeTree(): BootstrapperResult;
|
|
@@ -101,4 +105,5 @@ export declare class PWFV1 implements PWF {
|
|
|
101
105
|
getModelAnalyticsData(): ModelAnalyticsData;
|
|
102
106
|
get virtualMeshnodeIndexOffset(): number;
|
|
103
107
|
set virtualMeshnodeIndexOffset(value: number);
|
|
108
|
+
dispose(): void;
|
|
104
109
|
}
|
|
@@ -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
|
}
|
package/dist/types/src/pwfreader/v1/streaming/OPFSFile/MainThreadSyncAccessHandleFallback.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class MainThreadSyncAccessHandleFallback implements FileSystemSyncAccessHandle {
|
|
2
|
+
private buffer;
|
|
3
|
+
constructor();
|
|
4
|
+
close(): void;
|
|
5
|
+
read(buffer: ArrayBuffer, options: {
|
|
6
|
+
at: number;
|
|
7
|
+
}): number;
|
|
8
|
+
write(buffer: ArrayBuffer, options: {
|
|
9
|
+
at: number;
|
|
10
|
+
}): number;
|
|
11
|
+
truncate(size: number): void;
|
|
12
|
+
flush(): void;
|
|
13
|
+
getSize(): number;
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class OPFSFile {
|
|
2
|
+
private path;
|
|
3
|
+
private syncAccessHandle?;
|
|
4
|
+
private static stats;
|
|
5
|
+
constructor(path: string);
|
|
6
|
+
open(): Promise<void>;
|
|
7
|
+
close(): void;
|
|
8
|
+
truncate(offset: number): void;
|
|
9
|
+
write(buffer: ArrayBuffer, offset: number): number | undefined;
|
|
10
|
+
read(offset: number, byteLength: number): ArrayBuffer;
|
|
11
|
+
private updateReadStats;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { OPFSFile } from './OPFSFile';
|
|
@@ -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,9 +3,25 @@ import type { PWFV1 } from '../PWFV1';
|
|
|
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 type { ValidatedFeatureFlags } from '../../../types/WebviewerOptions';
|
|
6
9
|
export declare class StreamedMeshServices extends MeshServices {
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
private readonly featureFlags;
|
|
11
|
+
private meshIndexToOPFSRecord;
|
|
12
|
+
private opfsFile?;
|
|
13
|
+
private opfsOffset;
|
|
14
|
+
constructor(params: {
|
|
15
|
+
pwf: PWFV1;
|
|
16
|
+
featureFlags: ValidatedFeatureFlags;
|
|
17
|
+
});
|
|
18
|
+
initOPFS(): Promise<void>;
|
|
19
|
+
closeOPFS(): Promise<void>;
|
|
20
|
+
writeMeshDataToOPFS(meshData: MeshData): Promise<void>;
|
|
21
|
+
getMeshObject(meshIndex: number): MeshObject;
|
|
9
22
|
loadPartitionContainingMeshnode(streamedMeshnode: StreamedMeshnode): Promise<void>;
|
|
10
23
|
getMeshGeometryForOffsets(meshOffset: number, meshnodeOffset: number): StreamedMeshGeometry | undefined;
|
|
24
|
+
meshFromOffset(meshIndex: number): Mesh;
|
|
25
|
+
private getCompressedMeshDataFromOPFS;
|
|
26
|
+
dispose(): void;
|
|
11
27
|
}
|
|
@@ -8,4 +8,5 @@ export declare class StreamedMeshServices extends MeshServices {
|
|
|
8
8
|
getMeshObject(meshOffset: number): MeshObject;
|
|
9
9
|
loadPartitionContainingMeshnode(streamedMeshnode: StreamedMeshnode): Promise<void>;
|
|
10
10
|
getMeshGeometryForOffsets(meshOffset: number, meshnodeOffset: number): StreamedMeshGeometry | undefined;
|
|
11
|
+
dispose(): void;
|
|
11
12
|
}
|
package/dist/types/src/sdk.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export type { PaletteParams } from './types/Palette';
|
|
|
34
34
|
export type { Uom, DisplayUnit } from './unit_util';
|
|
35
35
|
export { UOM, DISPLAY_UNIT_ABBREVIATIONS as DISPLAY_UNIT } from './unit_util';
|
|
36
36
|
export type { ProjectSettings } from './controllers/SettingsController';
|
|
37
|
+
export { MEASURE_MODES, type MeasureMode, } from './measuring/MeasurementManager';
|
|
37
38
|
declare const version: string;
|
|
38
39
|
export { version };
|
|
39
40
|
export { ErrorLogger } from './utils/Error';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { THREE } from '../threeShaking';
|
|
2
1
|
import { Vector3, BoundingBox } from '../types/Math';
|
|
3
2
|
export declare const transformToThreePlane: (distance: number, normal: Vector3, rotation: Vector3 | null, center: THREE.Vector3 | undefined | null, offset: THREE.Vector3) => THREE.Plane;
|
|
4
3
|
export declare const validateBoundary: (min: Vector3 | null, max: Vector3 | null) => boolean;
|
|
@@ -47,50 +47,50 @@ export namespace THREE {
|
|
|
47
47
|
export { WebGLRenderer };
|
|
48
48
|
export { WebGLRenderTarget };
|
|
49
49
|
}
|
|
50
|
-
import { AmbientLight } from
|
|
51
|
-
import { Box3 } from
|
|
52
|
-
import { BoxGeometry } from
|
|
53
|
-
import { BufferAttribute } from
|
|
54
|
-
import { BufferGeometry } from
|
|
55
|
-
import { Clock } from
|
|
56
|
-
import { Color } from
|
|
57
|
-
import { Cylindrical } from
|
|
58
|
-
import { DirectionalLight } from
|
|
59
|
-
import { DoubleSide } from
|
|
60
|
-
import { Euler } from
|
|
61
|
-
import { EdgesGeometry } from
|
|
62
|
-
import { Face3 } from
|
|
63
|
-
import { FaceColors } from
|
|
64
|
-
import { Frustum } from
|
|
65
|
-
import { Geometry } from
|
|
66
|
-
import { LessDepth } from
|
|
67
|
-
import { Line3 } from
|
|
68
|
-
import { LinearFilter } from
|
|
69
|
-
import { LineBasicMaterial } from
|
|
70
|
-
import { LineSegments } from
|
|
71
|
-
import { _Math } from
|
|
72
|
-
import { Matrix3 } from
|
|
73
|
-
import { Matrix4 } from
|
|
74
|
-
import { Mesh } from
|
|
75
|
-
import { MeshBasicMaterial } from
|
|
76
|
-
import { MeshLambertMaterial } from
|
|
77
|
-
import { MOUSE } from
|
|
78
|
-
import { Object3D } from
|
|
79
|
-
import { OrthographicCamera } from
|
|
80
|
-
import { PerspectiveCamera } from
|
|
81
|
-
import { Plane } from
|
|
82
|
-
import { PlaneGeometry } from
|
|
83
|
-
import { Quaternion } from
|
|
84
|
-
import { RawShaderMaterial } from
|
|
85
|
-
import { Ray } from
|
|
86
|
-
import { Raycaster } from
|
|
87
|
-
import { RGBAFormat } from
|
|
88
|
-
import { Scene } from
|
|
89
|
-
import { ShaderMaterial } from
|
|
90
|
-
import { Spherical } from
|
|
91
|
-
import { Triangle } from
|
|
92
|
-
import { Vector2 } from
|
|
93
|
-
import { Vector3 } from
|
|
94
|
-
import { VertexColors } from
|
|
95
|
-
import { WebGLRenderer } from
|
|
96
|
-
import { WebGLRenderTarget } from
|
|
50
|
+
import { AmbientLight } from 'three/src/lights/AmbientLight';
|
|
51
|
+
import { Box3 } from 'three/src/math/Box3';
|
|
52
|
+
import { BoxGeometry } from 'three/src/geometries/BoxGeometry';
|
|
53
|
+
import { BufferAttribute } from 'three/src/core/BufferAttribute';
|
|
54
|
+
import { BufferGeometry } from 'three/src/core/BufferGeometry';
|
|
55
|
+
import { Clock } from 'three/src/core/Clock';
|
|
56
|
+
import { Color } from 'three/src/math/Color';
|
|
57
|
+
import { Cylindrical } from 'three/src/math/Cylindrical';
|
|
58
|
+
import { DirectionalLight } from 'three/src/lights/DirectionalLight';
|
|
59
|
+
import { DoubleSide } from 'three/src/constants';
|
|
60
|
+
import { Euler } from 'three/src/math/Euler';
|
|
61
|
+
import { EdgesGeometry } from 'three/src/geometries/EdgesGeometry';
|
|
62
|
+
import { Face3 } from 'three/src/core/Face3';
|
|
63
|
+
import { FaceColors } from 'three/src/constants';
|
|
64
|
+
import { Frustum } from 'three/src/math/Frustum';
|
|
65
|
+
import { Geometry } from 'three/src/core/Geometry';
|
|
66
|
+
import { LessDepth } from 'three/src/constants';
|
|
67
|
+
import { Line3 } from 'three/src/math/Line3';
|
|
68
|
+
import { LinearFilter } from 'three/src/constants';
|
|
69
|
+
import { LineBasicMaterial } from 'three/src/materials/LineBasicMaterial';
|
|
70
|
+
import { LineSegments } from 'three/src/objects/LineSegments';
|
|
71
|
+
import { _Math } from 'three/src/math/Math';
|
|
72
|
+
import { Matrix3 } from 'three/src/math/Matrix3';
|
|
73
|
+
import { Matrix4 } from 'three/src/math/Matrix4';
|
|
74
|
+
import { Mesh } from 'three/src/objects/Mesh';
|
|
75
|
+
import { MeshBasicMaterial } from 'three/src/materials/MeshBasicMaterial';
|
|
76
|
+
import { MeshLambertMaterial } from 'three/src/materials/MeshLambertMaterial';
|
|
77
|
+
import { MOUSE } from 'three/src/constants';
|
|
78
|
+
import { Object3D } from 'three/src/core/Object3D';
|
|
79
|
+
import { OrthographicCamera } from 'three/src/cameras/OrthographicCamera';
|
|
80
|
+
import { PerspectiveCamera } from 'three/src/cameras/PerspectiveCamera';
|
|
81
|
+
import { Plane } from 'three/src/math/Plane';
|
|
82
|
+
import { PlaneGeometry } from 'three/src/geometries/PlaneGeometry';
|
|
83
|
+
import { Quaternion } from 'three/src/math/Quaternion';
|
|
84
|
+
import { RawShaderMaterial } from 'three/src/materials/RawShaderMaterial';
|
|
85
|
+
import { Ray } from 'three/src/math/Ray';
|
|
86
|
+
import { Raycaster } from 'three/src/core/Raycaster';
|
|
87
|
+
import { RGBAFormat } from 'three/src/constants';
|
|
88
|
+
import { Scene } from 'three/src/scenes/Scene';
|
|
89
|
+
import { ShaderMaterial } from 'three/src/materials/ShaderMaterial';
|
|
90
|
+
import { Spherical } from 'three/src/math/Spherical';
|
|
91
|
+
import { Triangle } from 'three/src/math/Triangle';
|
|
92
|
+
import { Vector2 } from 'three/src/math/Vector2';
|
|
93
|
+
import { Vector3 } from 'three/src/math/Vector3';
|
|
94
|
+
import { VertexColors } from 'three/src/constants';
|
|
95
|
+
import { WebGLRenderer } from 'three/src/renderers/WebGLRenderer';
|
|
96
|
+
import { WebGLRenderTarget } from 'three/src/renderers/WebGLRenderTarget';
|
|
@@ -3,12 +3,17 @@ import { FileExtraction, GeometryFile } 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';
|
|
6
|
-
export type FeatureFlags =
|
|
6
|
+
export type FeatureFlags = {
|
|
7
7
|
/**
|
|
8
8
|
* @beta Enables the new measurement mode Point to Point, which allows users to measure the distance between two points in the model.
|
|
9
9
|
*/
|
|
10
10
|
enablePointToPoint: boolean;
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @beta Enables writing mesh data to OPFS for partitioned models, which allows users to use features that use mesh data, notably Point to Point.
|
|
13
|
+
*/
|
|
14
|
+
enableMeshDataOnOPFS: boolean;
|
|
15
|
+
};
|
|
16
|
+
export type ValidatedFeatureFlags = Readonly<FeatureFlags>;
|
|
12
17
|
export type CommonOptions = {
|
|
13
18
|
/**
|
|
14
19
|
* Always required
|
|
@@ -48,7 +53,7 @@ export type CommonOptions = {
|
|
|
48
53
|
multiselect?: boolean;
|
|
49
54
|
selection?: string;
|
|
50
55
|
enableWebWorker?: boolean;
|
|
51
|
-
featureFlags?: FeatureFlags
|
|
56
|
+
featureFlags?: Partial<FeatureFlags>;
|
|
52
57
|
logInitializationTimes?: boolean;
|
|
53
58
|
sceneGraph?: string;
|
|
54
59
|
bimFileId?: number;
|
|
@@ -89,9 +89,9 @@ export declare const UnitUtil: {
|
|
|
89
89
|
getEquivalentUnitForDisplayUnit: (fromUnit: Uom, displayUnit: DisplayUnit) => Uom;
|
|
90
90
|
convertUnit: (value: number, fromUnit: Uom, toUnit: Uom) => number;
|
|
91
91
|
formatUnit: (value: number, unit: Uom, options?: {
|
|
92
|
-
fixed?: number
|
|
93
|
-
precision?: number
|
|
94
|
-
locale?: string
|
|
92
|
+
fixed?: number;
|
|
93
|
+
precision?: number;
|
|
94
|
+
locale?: string;
|
|
95
95
|
}) => string;
|
|
96
96
|
};
|
|
97
97
|
export {};
|
|
@@ -4,8 +4,8 @@ type OnLogCallback = (result: number) => void;
|
|
|
4
4
|
export declare namespace MainThreadBenchmark {
|
|
5
5
|
const engage: (params: {
|
|
6
6
|
metricId: MetricId;
|
|
7
|
-
onEnd?: OnEndCallback
|
|
8
|
-
onLog?: OnLogCallback
|
|
7
|
+
onEnd?: OnEndCallback;
|
|
8
|
+
onLog?: OnLogCallback;
|
|
9
9
|
}) => void;
|
|
10
10
|
const isRunning: (metricId: MetricId) => boolean;
|
|
11
11
|
const hasStarted: (metricId: MetricId) => boolean;
|
|
@@ -3,7 +3,7 @@ type Target = {
|
|
|
3
3
|
[key: string]: any;
|
|
4
4
|
};
|
|
5
5
|
export declare namespace MainThreadDebugGui {
|
|
6
|
-
const add: <T extends Target>(obj: T, configureStore?: (
|
|
6
|
+
const add: <T extends Target>(obj: T, configureStore?: (store: GuiStore<T>) => void, onChange?: (...args: any[]) => void) => T;
|
|
7
7
|
const destroy: () => void;
|
|
8
8
|
}
|
|
9
9
|
export {};
|
|
@@ -4,7 +4,7 @@ type Target = {
|
|
|
4
4
|
[key: string]: any;
|
|
5
5
|
};
|
|
6
6
|
export declare namespace WorkerDebugGui {
|
|
7
|
-
export const add: <T extends Target>(obj: T, configureStore?: (
|
|
7
|
+
export const add: <T extends Target>(obj: T, configureStore?: (store: GuiStore<T>) => void, onChange?: (...args: any[]) => void) => T;
|
|
8
8
|
type UpdateParams = {
|
|
9
9
|
id: ProxyId;
|
|
10
10
|
keyPath: string[];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { THREE } from '../../threeShaking';
|
|
2
1
|
import type { Meshnode } from '../../pwfreader/PWFTypes';
|
|
3
2
|
export declare const computeRefinedBbox: (params: {
|
|
4
3
|
bbox: THREE.Box3;
|
|
@@ -7,9 +6,9 @@ export declare const computeRefinedBbox: (params: {
|
|
|
7
6
|
}) => THREE.Box3;
|
|
8
7
|
declare const _default: {
|
|
9
8
|
computeRefinedBbox: (params: {
|
|
10
|
-
bbox:
|
|
9
|
+
bbox: THREE.Box3;
|
|
11
10
|
meshnodes: Meshnode[];
|
|
12
11
|
spaceJunkEliminationThreshold: number;
|
|
13
|
-
}) =>
|
|
12
|
+
}) => THREE.Box3;
|
|
14
13
|
};
|
|
15
14
|
export default _default;
|
|
@@ -2,6 +2,6 @@ import { Options } from '../types/WebviewerOptions';
|
|
|
2
2
|
type AllTools = 0;
|
|
3
3
|
type Tools = Required<Options['tools'][]>;
|
|
4
4
|
type CheckToolsParam = Tools | AllTools | undefined;
|
|
5
|
-
export declare const isAllTools: (tools: CheckToolsParam) => tools is
|
|
5
|
+
export declare const isAllTools: (tools: CheckToolsParam) => tools is AllTools;
|
|
6
6
|
export declare const checkTools: (tools: CheckToolsParam) => void;
|
|
7
7
|
export {};
|