@procore/bim-webviewer-sdk 16.6.0-rc.1 → 16.6.0-rc.11
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 +20 -0
- package/dist/Procore.Bim.Webviewer.d.ts +90 -81
- package/dist/Procore.Bim.Webviewer.js +1 -1
- package/dist/types/src/Webviewer.d.ts +1 -5
- package/dist/types/src/api/analytic_events/analyticKeys.d.ts +51 -29
- package/dist/types/src/api/analytic_events/index.d.ts +1 -1
- package/dist/types/src/api/analytic_events/payloadFactories.d.ts +10 -9
- 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 +9 -10
- 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/components/__tests__/ShortestDisanceFixtures.d.ts +21 -0
- 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 +2 -1
- package/dist/types/src/controllers/RenderController.d.ts +19 -27
- package/dist/types/src/controllers/RenderControllerProxy.d.ts +13 -16
- 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/MeasurementInterface.d.ts +10 -5
- package/dist/types/src/measuring/MeasurementManager.d.ts +4 -5
- package/dist/types/src/measuring/MeasurementRenderer.d.ts +1 -5
- package/dist/types/src/measuring/PointToPointManager.d.ts +6 -8
- package/dist/types/src/messages.d.ts +7 -7
- 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/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 +5 -6
- 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 +4 -2
- package/dist/types/src/pwfreader/PWFCache.d.ts +1 -1
- package/dist/types/src/pwfreader/PWFProxy.d.ts +5 -2
- package/dist/types/src/pwfreader/PWFTypes.d.ts +0 -5
- package/dist/types/src/pwfreader/v1/PWFModelParser.d.ts +2 -5
- package/dist/types/src/pwfreader/v1/PWFV1.d.ts +9 -3
- package/dist/types/src/pwfreader/v1/impl/bufferReader/MeshnodeBufferReader.d.ts +2 -5
- 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/Manifest.d.ts +3 -3
- package/dist/types/src/pwfreader/v2/PWFV2.d.ts +4 -2
- 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/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 +5 -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;
|
|
@@ -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[];
|
|
@@ -8,6 +8,8 @@ import { Meshnode, Manifest } from '../../pwfreader/PWFTypes';
|
|
|
8
8
|
import { MeshObject } from '../../pwfreader/v1/objects/MeshObject';
|
|
9
9
|
import type { ViewerRenderer } from '../ViewerRenderer';
|
|
10
10
|
import type { BootstrapperResult } from '../../controllers/Bootstrapper';
|
|
11
|
+
import { Vector3 } from '../../types/Math';
|
|
12
|
+
import type { ValidatedFeatureFlags } from '../../types/WebviewerOptions';
|
|
11
13
|
export declare function computeDetailsParam(totalFaces: number): {
|
|
12
14
|
detailsInMotion: number;
|
|
13
15
|
detailsAtRest: number;
|
|
@@ -46,6 +48,7 @@ export declare class Models {
|
|
|
46
48
|
modelDescriptors: ModelDescriptor[];
|
|
47
49
|
selectionOption: SelectMethod;
|
|
48
50
|
prefetchingPartitions?: boolean;
|
|
51
|
+
featureFlags: ValidatedFeatureFlags;
|
|
49
52
|
});
|
|
50
53
|
private sceneGraphFactory;
|
|
51
54
|
getResourceId: (resource: ResourceDiscriminator) => number;
|
|
@@ -56,7 +59,7 @@ export declare class Models {
|
|
|
56
59
|
parsePwfNodes(): BootstrapperResult;
|
|
57
60
|
parsePwfMeshnodes(): BootstrapperResult;
|
|
58
61
|
parsePwfMeshes(): void;
|
|
59
|
-
initMeshServices():
|
|
62
|
+
initMeshServices(): BootstrapperResult;
|
|
60
63
|
initNodeServices(): void;
|
|
61
64
|
initMeshnodeServices(): void;
|
|
62
65
|
initNodeTree(): BootstrapperResult;
|
|
@@ -80,11 +83,7 @@ export declare class Models {
|
|
|
80
83
|
resourceId: number;
|
|
81
84
|
meshRef: number;
|
|
82
85
|
}): MeshObject;
|
|
83
|
-
globalOffset(resourceId: number):
|
|
84
|
-
offsetX: number;
|
|
85
|
-
offsetY: number;
|
|
86
|
-
offsetZ: number;
|
|
87
|
-
};
|
|
86
|
+
globalOffset(resourceId: number): Vector3;
|
|
88
87
|
initGeometryFactory(params: {
|
|
89
88
|
viewerRenderer: ViewerRenderer;
|
|
90
89
|
}): void;
|
|
@@ -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;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { StreamedGeometryFactory } from '../procoregl/StreamedGeometryFactory';
|
|
2
2
|
import type { GeometryFactory } from '../procoregl/GeometryFactory';
|
|
3
|
-
import type {
|
|
3
|
+
import type { Node, Meshnode, MeshnodeObject, MeshObject, ModelAnalyticsData } from './PWFTypes';
|
|
4
4
|
import type { BootstrapperResult } from '../controllers/Bootstrapper';
|
|
5
|
+
import { Vector3 } from '../types/Math';
|
|
5
6
|
export interface PWF {
|
|
6
7
|
setStandardModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, meshAB: ArrayBuffer): void;
|
|
7
8
|
setPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionAB: ArrayBuffer): void;
|
|
@@ -21,7 +22,7 @@ export interface PWF {
|
|
|
21
22
|
getSubtreeNodeIds(nodeId: number): number[];
|
|
22
23
|
getVirtualMeshnodeIndexesByNodeId(nodeId: number): number[];
|
|
23
24
|
getNamedNode(nodeId: number): Node;
|
|
24
|
-
globalOffset():
|
|
25
|
+
globalOffset(): Vector3;
|
|
25
26
|
getPwfPartitionContentUrls(): string[];
|
|
26
27
|
numNodes(): number;
|
|
27
28
|
numMeshnodes(): number;
|
|
@@ -46,4 +47,5 @@ export interface PWF {
|
|
|
46
47
|
getModelAnalyticsData(): ModelAnalyticsData;
|
|
47
48
|
get virtualMeshnodeIndexOffset(): number;
|
|
48
49
|
set virtualMeshnodeIndexOffset(offset: number);
|
|
50
|
+
dispose(): void;
|
|
49
51
|
}
|
|
@@ -3,7 +3,7 @@ export declare class PWFCache {
|
|
|
3
3
|
private abortController;
|
|
4
4
|
private abortSignal;
|
|
5
5
|
constructor();
|
|
6
|
-
|
|
6
|
+
fetchData(url: string, dataType?: 'arrayBuffer' | 'json'): Promise<ArrayBuffer>;
|
|
7
7
|
fetchArrayBuffers(urls: string[]): Promise<ArrayBuffer[]>;
|
|
8
8
|
dispose(): void;
|
|
9
9
|
}
|
|
@@ -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;
|
|
@@ -40,7 +42,7 @@ export declare class PWFProxy implements PWF {
|
|
|
40
42
|
loadAllPartitionProxies(): void;
|
|
41
43
|
prefetchPartitions(geometryFactory: StreamedGeometryFactory): BootstrapperResult;
|
|
42
44
|
setGeometryFactory(geometryFactory: GeometryFactory): void;
|
|
43
|
-
globalOffset(): import("
|
|
45
|
+
globalOffset(): import("../sdk").Vector3;
|
|
44
46
|
root(): Node;
|
|
45
47
|
forEachNode(callback: (node: Node) => void): void;
|
|
46
48
|
forEachMeshnode(callback: (meshnode: Meshnode) => void): void;
|
|
@@ -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
|
}
|
|
@@ -28,11 +28,6 @@ export type BoundingBox = {
|
|
|
28
28
|
min: number[];
|
|
29
29
|
max: number[];
|
|
30
30
|
};
|
|
31
|
-
export type GlobalOffset = {
|
|
32
|
-
offsetX: number;
|
|
33
|
-
offsetY: number;
|
|
34
|
-
offsetZ: number;
|
|
35
|
-
};
|
|
36
31
|
export type ModelAnalyticsData = {
|
|
37
32
|
node_size: number;
|
|
38
33
|
meshnode_size: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PWFNode } from './interface/PWFNode';
|
|
2
2
|
import { PWFMeshnode } from './interface/PWFMeshnode';
|
|
3
3
|
import { PWFMesh } from './interface/PWFMesh';
|
|
4
|
+
import { Vector3 } from '../../types/Math';
|
|
4
5
|
export declare class PWFModelParser {
|
|
5
6
|
private nodeAB;
|
|
6
7
|
private nodeBufferReader;
|
|
@@ -9,11 +10,7 @@ export declare class PWFModelParser {
|
|
|
9
10
|
private meshAB;
|
|
10
11
|
private meshBufferReader?;
|
|
11
12
|
constructor(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, meshAB: ArrayBuffer);
|
|
12
|
-
getGlobalOffset():
|
|
13
|
-
offsetX: number;
|
|
14
|
-
offsetY: number;
|
|
15
|
-
offsetZ: number;
|
|
16
|
-
};
|
|
13
|
+
getGlobalOffset(): Vector3;
|
|
17
14
|
getMeshnodeOffPointer(): number;
|
|
18
15
|
parseNodes(): {
|
|
19
16
|
nodes: PWFNode[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PWF } from '../PWF';
|
|
2
|
-
import {
|
|
2
|
+
import { ModelAnalyticsData } from '../PWFTypes';
|
|
3
3
|
import type { DownloadMetaData } from '../../procoregl/Models/Models';
|
|
4
4
|
import { PWFModelParser } from './PWFModelParser';
|
|
5
5
|
import { PWFNode } from './interface/PWFNode';
|
|
@@ -21,6 +21,8 @@ import { LRUCache } from '../../utils/LRUCache';
|
|
|
21
21
|
import { Partition } from './streaming/Partition';
|
|
22
22
|
import { GeometryFactory } from '../../procoregl/GeometryFactory';
|
|
23
23
|
import type { BootstrapperResult } from '../../controllers/Bootstrapper';
|
|
24
|
+
import { Vector3 } from '../../types/Math';
|
|
25
|
+
import type { ValidatedFeatureFlags } from '../../types/WebviewerOptions';
|
|
24
26
|
export declare class PWFV1 implements PWF {
|
|
25
27
|
private readonly downloadMetaData;
|
|
26
28
|
resourceId: number;
|
|
@@ -44,13 +46,16 @@ export declare class PWFV1 implements PWF {
|
|
|
44
46
|
meshnodeServices?: MeshnodeServices | StreamedMeshnodeServices;
|
|
45
47
|
bvhTree?: BVHTree;
|
|
46
48
|
_virtualMeshnodeIndexOffset: number;
|
|
49
|
+
private readonly featureFlags;
|
|
47
50
|
loadPartitionPromises: Promise<void>[];
|
|
48
51
|
currentIndex: number;
|
|
49
52
|
partitionProxies: PartitionProxy[];
|
|
50
53
|
partitionsCache: LRUCache<string, Partition>;
|
|
54
|
+
private meshServicesOPFSInitialized;
|
|
51
55
|
constructor(params: {
|
|
52
56
|
downloadMetaData: DownloadMetaData;
|
|
53
57
|
resourceId: number;
|
|
58
|
+
featureFlags: ValidatedFeatureFlags;
|
|
54
59
|
});
|
|
55
60
|
setStandardModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, meshAB: ArrayBuffer): void;
|
|
56
61
|
setPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionProxiesAB: ArrayBuffer): void;
|
|
@@ -59,7 +64,7 @@ export declare class PWFV1 implements PWF {
|
|
|
59
64
|
parsePwfNodes(): BootstrapperResult;
|
|
60
65
|
parsePwfMeshnodes(): BootstrapperResult;
|
|
61
66
|
parsePwfMeshes(): void;
|
|
62
|
-
initMeshServices():
|
|
67
|
+
initMeshServices(): BootstrapperResult;
|
|
63
68
|
initNodeServices(): void;
|
|
64
69
|
initMeshnodeServices(): void;
|
|
65
70
|
initNodeTree(): BootstrapperResult;
|
|
@@ -84,7 +89,7 @@ export declare class PWFV1 implements PWF {
|
|
|
84
89
|
loadAllPartitionProxies(): void;
|
|
85
90
|
prefetchPartitions(geometryFactory: StreamedGeometryFactory): BootstrapperResult;
|
|
86
91
|
setGeometryFactory(geometryFactory: GeometryFactory): void;
|
|
87
|
-
globalOffset():
|
|
92
|
+
globalOffset(): Vector3;
|
|
88
93
|
root(): Node;
|
|
89
94
|
forEachMeshnode(callback: (meshnode: Meshnode) => void): void;
|
|
90
95
|
forEachNode(callback: (node: Node) => void): void;
|
|
@@ -100,4 +105,5 @@ export declare class PWFV1 implements PWF {
|
|
|
100
105
|
getModelAnalyticsData(): ModelAnalyticsData;
|
|
101
106
|
get virtualMeshnodeIndexOffset(): number;
|
|
102
107
|
set virtualMeshnodeIndexOffset(value: number);
|
|
108
|
+
dispose(): void;
|
|
103
109
|
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { PWFMeshnode } from '../../interface/PWFMeshnode';
|
|
2
|
+
import { Vector3 } from '../../../../types/Math';
|
|
2
3
|
export declare class MeshnodeBufferReader {
|
|
3
4
|
private readonly buffer;
|
|
4
|
-
globalOffset:
|
|
5
|
-
offsetX: number;
|
|
6
|
-
offsetY: number;
|
|
7
|
-
offsetZ: number;
|
|
8
|
-
};
|
|
5
|
+
globalOffset: Vector3;
|
|
9
6
|
numMeshnodes: number;
|
|
10
7
|
constructor(buffer: ArrayBuffer);
|
|
11
8
|
parse(): {
|
|
@@ -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
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BoundingBox } from '../../types/Math';
|
|
2
|
-
import {
|
|
1
|
+
import { BoundingBox, Vector3 } from '../../types/Math';
|
|
2
|
+
import { PWFVersion } from '../PWFTypes';
|
|
3
3
|
export type Manifest = {
|
|
4
4
|
version: PWFVersion;
|
|
5
5
|
globalAABB: BoundingBox;
|
|
@@ -8,7 +8,7 @@ export type Manifest = {
|
|
|
8
8
|
numMeshnodes: number;
|
|
9
9
|
numMeshes: number;
|
|
10
10
|
numNodes: number;
|
|
11
|
-
globalOffset:
|
|
11
|
+
globalOffset: Vector3;
|
|
12
12
|
numFaces: number;
|
|
13
13
|
numVertices: number;
|
|
14
14
|
isPartitioned: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PWF } from '../PWF';
|
|
2
|
-
import {
|
|
2
|
+
import { ModelAnalyticsData } from '../PWFTypes';
|
|
3
3
|
import type { DownloadMetaData } from '../../procoregl/Models/Models';
|
|
4
4
|
import { PWFModelParser } from './PWFModelParser';
|
|
5
5
|
import { PWFNode } from './interface/PWFNode';
|
|
@@ -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 { Manifest } from './Manifest';
|
|
25
|
+
import { Vector3 } from '../../types/Math';
|
|
25
26
|
export declare class PWFV2 implements PWF {
|
|
26
27
|
private readonly downloadMetaData;
|
|
27
28
|
resourceId: number;
|
|
@@ -88,7 +89,7 @@ export declare class PWFV2 implements PWF {
|
|
|
88
89
|
loadAllPartitionProxies(): void;
|
|
89
90
|
prefetchPartitions(geometryFactory: StreamedGeometryFactory): BootstrapperResult;
|
|
90
91
|
setGeometryFactory(geometryFactory: GeometryFactory): void;
|
|
91
|
-
globalOffset():
|
|
92
|
+
globalOffset(): Vector3;
|
|
92
93
|
root(): Node;
|
|
93
94
|
forEachMeshnode(callback: (meshnode: Meshnode) => void): void;
|
|
94
95
|
forEachNode(callback: (node: Node) => void): void;
|
|
@@ -104,4 +105,5 @@ export declare class PWFV2 implements PWF {
|
|
|
104
105
|
getModelAnalyticsData(): ModelAnalyticsData;
|
|
105
106
|
get virtualMeshnodeIndexOffset(): number;
|
|
106
107
|
set virtualMeshnodeIndexOffset(value: number);
|
|
108
|
+
dispose(): void;
|
|
107
109
|
}
|
|
@@ -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
|
}
|
|
@@ -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;
|
|
@@ -14,6 +14,8 @@ declare const UOM_METRIC_LENGTH: {
|
|
|
14
14
|
readonly km: "km";
|
|
15
15
|
};
|
|
16
16
|
export declare const UOM: {
|
|
17
|
+
readonly rad: "rad";
|
|
18
|
+
readonly deg: "°";
|
|
17
19
|
readonly cdsqm: "cd/m²";
|
|
18
20
|
readonly cuum: "um³";
|
|
19
21
|
readonly cumm: "mm³";
|
|
@@ -87,9 +89,9 @@ export declare const UnitUtil: {
|
|
|
87
89
|
getEquivalentUnitForDisplayUnit: (fromUnit: Uom, displayUnit: DisplayUnit) => Uom;
|
|
88
90
|
convertUnit: (value: number, fromUnit: Uom, toUnit: Uom) => number;
|
|
89
91
|
formatUnit: (value: number, unit: Uom, options?: {
|
|
90
|
-
fixed?: number
|
|
91
|
-
precision?: number
|
|
92
|
-
locale?: string
|
|
92
|
+
fixed?: number;
|
|
93
|
+
precision?: number;
|
|
94
|
+
locale?: string;
|
|
93
95
|
}) => string;
|
|
94
96
|
};
|
|
95
97
|
export {};
|