@procore/bim-webviewer-sdk 17.6.0-rc.2 → 17.6.0-rc.20
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 +7 -2
- package/dist/Procore.Bim.Webviewer.d.ts +52 -31
- package/dist/Procore.Bim.Webviewer.js +1 -1
- package/dist/types/src/api/analytic_events/payloadFactories.d.ts +3 -1
- package/dist/types/src/components/LoadingComponent/LoadingComponent.d.ts +8 -6
- package/dist/types/src/components/RootComponent.d.ts +1 -1
- package/dist/types/src/components/StatsJS.d.ts +8 -3
- package/dist/types/src/controllers/Bootstrapper.d.ts +18 -9
- package/dist/types/src/controllers/PubSubController.d.ts +2 -1
- package/dist/types/src/controllers/RenderController.d.ts +3 -2
- package/dist/types/src/controllers/RenderControllerProxy.d.ts +2 -2
- package/dist/types/src/controllers/RenderControllerWorker.d.ts +1 -0
- package/dist/types/src/controllers/RendererFactory.d.ts +2 -1
- package/dist/types/src/procoregl/Models/Models.d.ts +2 -2
- package/dist/types/src/procoregl/PartitionsRenderer.d.ts +3 -0
- package/dist/types/src/procoregl/PartitionsRendererImpl.d.ts +4 -0
- package/dist/types/src/procoregl/StreamedGeometryFactory.d.ts +0 -1
- package/dist/types/src/procoregl/ViewerRenderer.d.ts +2 -0
- package/dist/types/src/pwfreader/PWF.d.ts +3 -2
- package/dist/types/src/pwfreader/PWFProxy.d.ts +3 -2
- package/dist/types/src/pwfreader/Utils.d.ts +6 -2
- package/dist/types/src/pwfreader/v1/PWFV1.d.ts +3 -1
- package/dist/types/src/pwfreader/v1/impl/bufferReader/HPartitionProxyBufferReader.d.ts +8 -0
- package/dist/types/src/pwfreader/v1/impl/bufferReader/PartitionProxyBufferReader.d.ts +1 -3
- package/dist/types/src/pwfreader/v1/impl/bufferReader/__tests__/HPartitionProxyBufferReader.test.d.ts +1 -0
- package/dist/types/src/pwfreader/v1/impl/pwfNoCache/PWFHPartitionProxyNoCache.d.ts +14 -0
- package/dist/types/src/pwfreader/v1/impl/recordReader/PWFHPartitionProxyReader.d.ts +19 -0
- package/dist/types/src/pwfreader/v1/interface/PWFHPartitionProxy.d.ts +7 -0
- package/dist/types/src/pwfreader/v1/standard/MeshServices.d.ts +1 -0
- package/dist/types/src/pwfreader/v1/standard/Meshnode.d.ts +7 -1
- package/dist/types/src/pwfreader/v1/standard/MeshnodeServices.d.ts +3 -1
- package/dist/types/src/pwfreader/v1/streaming/HPartitionProxy.d.ts +20 -0
- package/dist/types/src/pwfreader/v1/streaming/MeshData.d.ts +2 -3
- package/dist/types/src/pwfreader/v1/streaming/Partition.d.ts +1 -1
- package/dist/types/src/pwfreader/v1/streaming/PartitionDownloadManager.d.ts +7 -0
- package/dist/types/src/pwfreader/v1/streaming/PartitionProxy.d.ts +13 -7
- package/dist/types/src/pwfreader/v1/streaming/StreamedMeshServices.d.ts +3 -2
- package/dist/types/src/pwfreader/v1/streaming/StreamedMeshnode.d.ts +10 -2
- package/dist/types/src/pwfreader/v1/streaming/StreamedMeshnodeServices.d.ts +1 -1
- package/dist/types/src/pwfreader/v1/streaming/__tests__/HPartitionProxy.test.d.ts +1 -0
- package/dist/types/src/pwfreader/v1/streaming/__tests__/PartitionDownloadManager.test.d.ts +1 -0
- package/dist/types/src/pwfreader/v2/PWFV2.d.ts +2 -1
- package/dist/types/src/pwfreader/v2/impl/bufferReader/PartitionProxyBufferReader.d.ts +0 -3
- package/dist/types/src/pwfreader/v2/standard/Meshnode.d.ts +1 -0
- package/dist/types/src/pwfreader/v2/streaming/MeshData.d.ts +2 -3
- package/dist/types/src/pwfreader/v2/streaming/Partition.d.ts +1 -1
- package/dist/types/src/pwfreader/v2/streaming/PartitionProxy.d.ts +1 -3
- package/dist/types/src/pwfreader/v2/streaming/StreamedMeshServices.d.ts +1 -2
- package/dist/types/src/pwfreader/v2/streaming/StreamedMeshnode.d.ts +1 -3
- package/dist/types/src/threeShaking.d.ts +2 -0
- package/dist/types/src/types/WebviewerOptions.d.ts +1 -0
- package/dist/types/src/utils/constants.d.ts +1 -0
- package/dist/types/src/utils/requestPersistentStorage/__tests__/requestPersistentStorage.test.d.ts +1 -0
- package/dist/types/src/utils/requestPersistentStorage/index.d.ts +1 -0
- package/dist/types/src/utils/requestPersistentStorage/requestPersistentStorage.d.ts +1 -0
- package/dist/types/src/workers/PartitionDownload.worker.d.ts +1 -0
- package/package.json +1 -1
- package/dist/types/src/procoregl/SceneGraph/utils.d.ts +0 -2
|
@@ -24,4 +24,6 @@ export declare const getDownloadCompletedTrackEventPayload: (params: {
|
|
|
24
24
|
totalPartitionsSizeCompressed?: number;
|
|
25
25
|
numPartitions?: number;
|
|
26
26
|
}) => Promise<BimModelsDownloadCompletedPayload>;
|
|
27
|
-
export declare const getEnvironmentTrackEventPayload: (
|
|
27
|
+
export declare const getEnvironmentTrackEventPayload: (params: {
|
|
28
|
+
persisted: boolean;
|
|
29
|
+
}) => Promise<EnvironmentTrackEventPayload>;
|
|
@@ -12,13 +12,13 @@ export declare class LoadingComponent {
|
|
|
12
12
|
private startTime;
|
|
13
13
|
private readonly containerElement;
|
|
14
14
|
private readonly modelInitializationElement;
|
|
15
|
-
private
|
|
16
|
-
private
|
|
17
|
-
private
|
|
18
|
-
private
|
|
19
|
-
private
|
|
15
|
+
private readonly allowPersistentStorageElement;
|
|
16
|
+
private readonly propertyLoadingElement;
|
|
17
|
+
private readonly modelOpeningElement;
|
|
18
|
+
private readonly modelDownloadErrorElement;
|
|
19
|
+
private readonly modelInitializationFailedElement;
|
|
20
|
+
private readonly fileTooBigErrorElement;
|
|
20
21
|
constructor(props: LoadingComponentProps);
|
|
21
|
-
private onAppStart;
|
|
22
22
|
private onInitializationProgress;
|
|
23
23
|
private getTimeEstimateMessage;
|
|
24
24
|
private getEstimatedTimeLeft;
|
|
@@ -31,6 +31,8 @@ export declare class LoadingComponent {
|
|
|
31
31
|
private onFileTooBigError;
|
|
32
32
|
private onPropertyServiceCheck;
|
|
33
33
|
private onModelTypeDetermined;
|
|
34
|
+
private onPersistentStorageRequestPending;
|
|
35
|
+
private onPersistentStorageRequestResolved;
|
|
34
36
|
private updateModelOpening;
|
|
35
37
|
private updateInitProgressBar;
|
|
36
38
|
}
|
|
@@ -13,7 +13,7 @@ export class RootComponent {
|
|
|
13
13
|
sectionToolDropdown: SectionToolDropdown | null;
|
|
14
14
|
window_components: any[];
|
|
15
15
|
disabled: any[];
|
|
16
|
-
statsJS: StatsJS
|
|
16
|
+
statsJS: StatsJS;
|
|
17
17
|
tooltipManager: TooltipManager;
|
|
18
18
|
init(): void;
|
|
19
19
|
addComponent(ComponentType: any): void;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
import { RenderControllerProxy } from '../controllers/RenderControllerProxy';
|
|
1
2
|
export declare class StatsJS {
|
|
2
3
|
private attached;
|
|
3
4
|
private statsFPS;
|
|
4
5
|
private statsTime;
|
|
5
|
-
private
|
|
6
|
+
private statsDetailsInMotion;
|
|
7
|
+
private renderControllerProxy;
|
|
8
|
+
private detailsInMotionPanel;
|
|
6
9
|
private static FpsCss;
|
|
7
10
|
private static TimeCss;
|
|
8
|
-
private static
|
|
11
|
+
private static DetailsCss;
|
|
12
|
+
constructor(renderControllerProxy: RenderControllerProxy);
|
|
9
13
|
attach(document: Document): void;
|
|
10
|
-
update(): void
|
|
14
|
+
update(): Promise<void>;
|
|
11
15
|
dispose(): void;
|
|
16
|
+
private isChrome;
|
|
12
17
|
}
|
|
@@ -1,33 +1,42 @@
|
|
|
1
1
|
import type { RenderController } from './RenderController';
|
|
2
|
+
import { ValidatedFeatureFlags } from '../types/WebviewerOptions';
|
|
2
3
|
export type BootstrapperResult = {
|
|
3
4
|
isComplete: boolean;
|
|
4
5
|
};
|
|
5
6
|
export declare class Bootstrapper {
|
|
6
7
|
static partitionedMode: boolean;
|
|
7
8
|
static logInitializationTimes: boolean;
|
|
9
|
+
static allStepsCompleted: boolean;
|
|
10
|
+
static startTime: number;
|
|
8
11
|
static renderController: RenderController;
|
|
9
12
|
static resolveFn: () => void;
|
|
10
13
|
static stepsCompleted: number;
|
|
11
14
|
static singleStepsCount: number;
|
|
12
|
-
static parsePwfNodesCount: number;
|
|
13
|
-
static parsePwfMeshnodesCount: number;
|
|
14
|
-
static initNodeTreeCount: number;
|
|
15
|
-
static initNodeTreeBoundingBoxesCount: number;
|
|
16
|
-
static initSceneGraphCount: number;
|
|
17
|
-
static initTreeServicesCount: number;
|
|
18
|
-
static initGeometryCount: number;
|
|
19
15
|
static initDownloadCount: number;
|
|
20
16
|
static partitionStepsCount: number;
|
|
21
17
|
static maxStepsPerPartition: number;
|
|
22
18
|
static partitionUrlsToDownload: Set<string>;
|
|
23
19
|
static estimatedInitializationSteps: number;
|
|
24
20
|
static numPartitions: number;
|
|
25
|
-
static
|
|
21
|
+
static launchAnimationLoopExecuted: boolean;
|
|
22
|
+
static modelType: string;
|
|
23
|
+
static enableProgressiveLoading: boolean;
|
|
24
|
+
static summary: Map<string, {
|
|
25
|
+
numCalls: number;
|
|
26
|
+
totalTime: number;
|
|
27
|
+
}>;
|
|
28
|
+
static STEPS_PLANNER: Record<string, number>;
|
|
29
|
+
static initBootstrappingSummary(): void;
|
|
30
|
+
static bootstrap(renderController: RenderController, featureFlags: ValidatedFeatureFlags): Promise<void>;
|
|
31
|
+
static recordStep(step: string, duration: number): void;
|
|
32
|
+
static summarizeStepsAsText(): void;
|
|
33
|
+
static summarizeStepsAsCSV(): void;
|
|
34
|
+
static printBootstrappingSummary(): void;
|
|
26
35
|
static totalStepsCount(): number;
|
|
27
36
|
static addDownloadSteps(count: number): void;
|
|
28
37
|
static recordCompleteDownload(url: string, duration: number): void;
|
|
38
|
+
static handleIfLastStep(): void;
|
|
29
39
|
static recordPartialDownload(url: string): void;
|
|
30
40
|
static determineTotalStepsCount(): Promise<void>;
|
|
31
41
|
private static measureDownloadSteps;
|
|
32
42
|
}
|
|
33
|
-
export declare function recordInitializationProgress(message: string): void;
|
|
@@ -42,7 +42,6 @@ export namespace PubSubController {
|
|
|
42
42
|
initializationStart: "initializationStart";
|
|
43
43
|
intersectPointClick: "intersectPointClick";
|
|
44
44
|
isolateCompleted: "isolateCompleted";
|
|
45
|
-
launchedAnimationLoop: "launchedAnimationLoop";
|
|
46
45
|
mainThreadDebugGuiAdd: "mainThreadDebugGuiAdd";
|
|
47
46
|
mainThreadDebugGuiDestroy: "mainThreadDebugGuiDestroy";
|
|
48
47
|
markupDismissed: "markupDismissed";
|
|
@@ -72,6 +71,8 @@ export namespace PubSubController {
|
|
|
72
71
|
objectUnhide: "objectUnhide";
|
|
73
72
|
optionsChanged: "optionsChanged";
|
|
74
73
|
allPartitionsDownloadComplete: "allPartitionsDownloadComplete";
|
|
74
|
+
persistentStorageRequestPending: "persistentStorageRequestPending";
|
|
75
|
+
persistentStorageRequestResolved: "persistentStorageRequestResolved";
|
|
75
76
|
projectSettingsLoaded: "projectSettingsLoaded";
|
|
76
77
|
projectSettingsUpdated: "projectSettingsUpdated";
|
|
77
78
|
propertiesReady: "propertiesReady";
|
|
@@ -24,7 +24,6 @@ export class RenderController {
|
|
|
24
24
|
webengine: import("../../webassembly/webengine/dist/webengine").InitOutput | null;
|
|
25
25
|
webenginePromise: Promise<import("../../webassembly/webengine/dist/webengine").InitOutput>;
|
|
26
26
|
enableWebWorker: any;
|
|
27
|
-
prefetchingPartitions: boolean;
|
|
28
27
|
projectId: any;
|
|
29
28
|
baseUrl: any;
|
|
30
29
|
meshnodeABCached: boolean;
|
|
@@ -378,10 +377,12 @@ export class RenderController {
|
|
|
378
377
|
nodeABCached: boolean;
|
|
379
378
|
meshABCached: boolean;
|
|
380
379
|
};
|
|
381
|
-
getPwfPartitionContentUrls(params?: {}): string[]
|
|
380
|
+
getPwfPartitionContentUrls(params?: {}): Promise<string[]>;
|
|
382
381
|
getNumMeshes(params?: {}): number;
|
|
383
382
|
getNumMeshnodes(params?: {}): number;
|
|
384
383
|
getNumNodes(params?: {}): number;
|
|
384
|
+
isPartitionedModel(): boolean;
|
|
385
|
+
getDetailsInMotion(): number;
|
|
385
386
|
}
|
|
386
387
|
export namespace RenderController {
|
|
387
388
|
namespace NullSelectedSubtree {
|
|
@@ -2,7 +2,6 @@ export function RenderControllerProxy(options: any): void;
|
|
|
2
2
|
export class RenderControllerProxy {
|
|
3
3
|
constructor(options: any);
|
|
4
4
|
cache: Promise<Cache>;
|
|
5
|
-
pubsub: PubSubController;
|
|
6
5
|
options: any;
|
|
7
6
|
worker: any;
|
|
8
7
|
enableWebWorker: any;
|
|
@@ -45,6 +44,7 @@ export class RenderControllerProxy {
|
|
|
45
44
|
'Error: File size exception.': "fileTooBigError";
|
|
46
45
|
};
|
|
47
46
|
handleDownloadError: (message: any) => void;
|
|
47
|
+
modelType: "standard" | "partitioned-flat" | "partitioned-tree";
|
|
48
48
|
downloadMetaData: {
|
|
49
49
|
timeToDownload: number;
|
|
50
50
|
modelCached: boolean;
|
|
@@ -279,6 +279,7 @@ export class RenderControllerProxy {
|
|
|
279
279
|
faceNormal: import("../sdk").Vector3 | null;
|
|
280
280
|
nearestMeshnodeIndex?: number;
|
|
281
281
|
};
|
|
282
|
+
getDetailsInMotion(...params: any[]): number | Promise<any>;
|
|
282
283
|
}
|
|
283
284
|
export namespace RenderControllerProxy {
|
|
284
285
|
namespace NAVIGATION_MODE {
|
|
@@ -289,7 +290,6 @@ export namespace RenderControllerProxy {
|
|
|
289
290
|
let MEASURE: number;
|
|
290
291
|
}
|
|
291
292
|
}
|
|
292
|
-
import { PubSubController } from './PubSubController';
|
|
293
293
|
import { NavigationManager } from '../navigation/NavigationManager';
|
|
294
294
|
import { RenderController } from './RenderController';
|
|
295
295
|
import { RenderControllerWorker } from './RenderControllerWorker';
|
|
@@ -120,4 +120,5 @@ export class RenderControllerWorker {
|
|
|
120
120
|
setPwfFileCacheState(...params: any[]): Promise<any>;
|
|
121
121
|
partitionUrlsFromMeshnodeIndices(...params: any[]): Promise<any>;
|
|
122
122
|
getRayIntersectPoint(evt: any, returnOnEdgeHitFailure: any): Promise<any>;
|
|
123
|
+
getDetailsInMotion(...params: any[]): Promise<any>;
|
|
123
124
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ViewerRenderer } from '../procoregl/ViewerRenderer';
|
|
2
|
+
import { ValidatedFeatureFlags } from '../types/WebviewerOptions';
|
|
2
3
|
export declare class RendererFactory {
|
|
3
|
-
static createViewerRenderer(canvas: HTMLCanvasElement, offsetWidth: number, offsetHeight: number): ViewerRenderer;
|
|
4
|
+
static createViewerRenderer(canvas: HTMLCanvasElement, offsetWidth: number, offsetHeight: number, featureFlags: ValidatedFeatureFlags): ViewerRenderer;
|
|
4
5
|
}
|
|
@@ -31,7 +31,6 @@ export declare class Models {
|
|
|
31
31
|
private pwfs;
|
|
32
32
|
private currentParsingPwfIndex;
|
|
33
33
|
private streaming;
|
|
34
|
-
private prefetchingPartitions;
|
|
35
34
|
private geometryFactory?;
|
|
36
35
|
private objectTrees;
|
|
37
36
|
private readonly selectionOption;
|
|
@@ -40,6 +39,8 @@ export declare class Models {
|
|
|
40
39
|
private tempVirtualizedMeshnodes;
|
|
41
40
|
private detailsParams?;
|
|
42
41
|
private readonly isLogging;
|
|
42
|
+
private readonly featureFlags;
|
|
43
|
+
private modelType;
|
|
43
44
|
constructor(params: {
|
|
44
45
|
sceneGraphName: SceneGraphName;
|
|
45
46
|
isLogging: boolean;
|
|
@@ -47,7 +48,6 @@ export declare class Models {
|
|
|
47
48
|
downloadMetaData: DownloadMetaData;
|
|
48
49
|
modelDescriptors: ModelDescriptor[];
|
|
49
50
|
selectionOption: SelectMethod;
|
|
50
|
-
prefetchingPartitions?: boolean;
|
|
51
51
|
featureFlags: ValidatedFeatureFlags;
|
|
52
52
|
});
|
|
53
53
|
private sceneGraphFactory;
|
|
@@ -50,6 +50,7 @@ export class PartitionsRenderer {
|
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
52
|
renderingAtRest: boolean;
|
|
53
|
+
numMeshnodesLoadedToGPU: () => any;
|
|
53
54
|
initialize: (measureSet: any, models: any, colorServices: any) => void;
|
|
54
55
|
render: (scene: any, camera: any) => void;
|
|
55
56
|
cleanBuffer: () => void;
|
|
@@ -61,6 +62,8 @@ export class PartitionsRenderer {
|
|
|
61
62
|
loadMeshShader: () => void;
|
|
62
63
|
setDetailsParams: (detailsParams: any) => void;
|
|
63
64
|
setGeometryFactory: (geometryFactory: any) => void;
|
|
65
|
+
setDelta: (delta: any) => void;
|
|
66
|
+
getDetailsInMotion: () => any;
|
|
64
67
|
renderMeshnode: (meshnode: any, scene: any, camera: any, renderStage: any) => void;
|
|
65
68
|
renderMesh: (scene: any, camera: any, meshGeometry: any, nodedata: any, renderStage: any, isPicked: any, overrideMaterial: any) => void;
|
|
66
69
|
vr: WebXRManager | WebVRManager | null;
|
|
@@ -3,11 +3,13 @@ import type { RenderMode } from '../utils/constants';
|
|
|
3
3
|
import type { Models } from './Models';
|
|
4
4
|
import { ColorServices } from './ColorServices';
|
|
5
5
|
import { GeometryFactory } from './GeometryFactory';
|
|
6
|
+
import { ValidatedFeatureFlags } from '../types/WebviewerOptions';
|
|
6
7
|
type PartitionedModelRendererArgs = {
|
|
7
8
|
antialias: boolean;
|
|
8
9
|
preserveDrawingBuffer: boolean;
|
|
9
10
|
alpha: boolean;
|
|
10
11
|
canvas: HTMLCanvasElement;
|
|
12
|
+
featureFlags: ValidatedFeatureFlags;
|
|
11
13
|
};
|
|
12
14
|
export declare class PartitionsRendererImpl implements ViewerRenderer {
|
|
13
15
|
private readonly renderer;
|
|
@@ -53,5 +55,7 @@ export declare class PartitionsRendererImpl implements ViewerRenderer {
|
|
|
53
55
|
renderSection(scene: THREE.Scene, camera: THREE.Camera): void;
|
|
54
56
|
getWebGLRenderer(): THREE.WebGLRenderer;
|
|
55
57
|
setGeometryFactory(geometryFactory: GeometryFactory): void;
|
|
58
|
+
setDelta(delta: number): void;
|
|
59
|
+
getDetailsInMotion(): number;
|
|
56
60
|
}
|
|
57
61
|
export {};
|
|
@@ -2,7 +2,6 @@ import { GeometryFactory } from './GeometryFactory';
|
|
|
2
2
|
import { StreamedMeshGeometry } from './StreamedMeshGeometry';
|
|
3
3
|
export declare class StreamedGeometryFactory extends GeometryFactory {
|
|
4
4
|
createMeshGeometry(vertexArray: Float32Array, indexArray: Uint16Array, color: number, opacity: number, drawType: number): StreamedMeshGeometry;
|
|
5
|
-
createMeshGeometryPrefetching(vertexArray: Float32Array, indexArray: Uint16Array, color: number, opacity: number, drawType: number): StreamedMeshGeometry;
|
|
6
5
|
createCylinderGeometry(vertexArray: Float32Array, indexArray: Uint16Array, color: number, opacity: number, drawType: number): StreamedMeshGeometry;
|
|
7
6
|
protected newVertexBufferStream(size: number): WebGLBuffer;
|
|
8
7
|
protected newIndexBufferStream(size: number): WebGLBuffer;
|
|
@@ -36,6 +36,8 @@ export interface ViewerRenderer {
|
|
|
36
36
|
enableBackFaceFillColor(state: boolean): void;
|
|
37
37
|
loadMeshShader(): void;
|
|
38
38
|
renderSection(scene: THREE.Scene, camera: THREE.Camera): void;
|
|
39
|
+
setDelta(delta: number): void;
|
|
40
|
+
getDetailsInMotion(): number;
|
|
39
41
|
getWebGLRenderer(): THREE.WebGLRenderer;
|
|
40
42
|
setGeometryFactory(geometryFactory: GeometryFactory): void;
|
|
41
43
|
}
|
|
@@ -5,7 +5,8 @@ import type { BootstrapperResult } from '../controllers/Bootstrapper';
|
|
|
5
5
|
import { Vector3 } from '../types/Math';
|
|
6
6
|
export interface PWF {
|
|
7
7
|
setStandardModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, meshAB: ArrayBuffer): void;
|
|
8
|
-
setPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer,
|
|
8
|
+
setPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionProxiesAB: ArrayBuffer): void;
|
|
9
|
+
setHPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionProxiesAB: ArrayBuffer): void;
|
|
9
10
|
initPwfParser(): void;
|
|
10
11
|
parsePwfNodes(): BootstrapperResult;
|
|
11
12
|
parsePwfMeshnodes(): BootstrapperResult;
|
|
@@ -23,7 +24,7 @@ export interface PWF {
|
|
|
23
24
|
getVirtualMeshnodeIndexesByNodeId(nodeId: number): number[];
|
|
24
25
|
getNamedNode(nodeId: number): Node;
|
|
25
26
|
globalOffset(): Vector3;
|
|
26
|
-
getPwfPartitionContentUrls(): string[]
|
|
27
|
+
getPwfPartitionContentUrls(): Promise<string[]>;
|
|
27
28
|
numNodes(): number;
|
|
28
29
|
numMeshnodes(): number;
|
|
29
30
|
numMeshes(): number;
|
|
@@ -16,8 +16,9 @@ export declare class PWFProxy implements PWF {
|
|
|
16
16
|
featureFlags: ValidatedFeatureFlags;
|
|
17
17
|
});
|
|
18
18
|
setStandardModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, meshAB: ArrayBuffer): void;
|
|
19
|
-
setPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer,
|
|
20
|
-
|
|
19
|
+
setPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionProxiesAB: ArrayBuffer): void;
|
|
20
|
+
setHPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionProxiesAB: ArrayBuffer): void;
|
|
21
|
+
getPwfPartitionContentUrls(): Promise<string[]>;
|
|
21
22
|
initPwfParser(): void;
|
|
22
23
|
parsePwfNodes(): BootstrapperResult;
|
|
23
24
|
parsePwfMeshnodes(): BootstrapperResult;
|
|
@@ -2,8 +2,12 @@ import type { DownloadMetaData } from '../procoregl/Models/Models';
|
|
|
2
2
|
import type { PWF, PWFVersion } from './PWFTypes';
|
|
3
3
|
export declare const MESHNODE_BUFFER_MAX_CHUNK_SIZE = 100000;
|
|
4
4
|
export declare const NODE_BUFFER_MAX_CHUNK_SIZE = 100000;
|
|
5
|
-
export declare const MESH_BUFFER_MAX_CHUNK_SIZE =
|
|
6
|
-
export
|
|
5
|
+
export declare const MESH_BUFFER_MAX_CHUNK_SIZE = 2500;
|
|
6
|
+
export type STANDARD_MODEL = 'standard';
|
|
7
|
+
export type PARTITIONED_FLAT_MODEL = 'partitioned-flat';
|
|
8
|
+
export type PARTITIONED_TREE_MODEL = 'partitioned-tree';
|
|
9
|
+
export declare function inferModelTypeFromMeshAB(meshAB: ArrayBuffer): STANDARD_MODEL | PARTITIONED_FLAT_MODEL | PARTITIONED_TREE_MODEL;
|
|
10
|
+
export declare function extractDataFromPartitionProxiesAB(buffer: ArrayBuffer): ArrayBuffer;
|
|
7
11
|
export declare function constructPartitionFASUrl(partitionUrl: string, baseUrl: string, projectId: number): string;
|
|
8
12
|
export declare function trackDownloadComplete(params: {
|
|
9
13
|
totalPartitionsSize?: number;
|
|
@@ -33,6 +33,7 @@ export declare class PWFV1 implements PWF {
|
|
|
33
33
|
meshAB?: ArrayBuffer;
|
|
34
34
|
partitionProxiesAB?: ArrayBuffer;
|
|
35
35
|
pwfModelParser?: PWFModelParser;
|
|
36
|
+
modelType: 'standard' | 'partitioned-flat' | 'partitioned-tree';
|
|
36
37
|
private _numMeshnodes;
|
|
37
38
|
private _numMeshes;
|
|
38
39
|
private _numNodes;
|
|
@@ -61,7 +62,8 @@ export declare class PWFV1 implements PWF {
|
|
|
61
62
|
});
|
|
62
63
|
setStandardModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, meshAB: ArrayBuffer): void;
|
|
63
64
|
setPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionProxiesAB: ArrayBuffer): void;
|
|
64
|
-
|
|
65
|
+
setHPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionProxiesAB: ArrayBuffer): void;
|
|
66
|
+
getPwfPartitionContentUrls(): Promise<string[]>;
|
|
65
67
|
initPwfParser(): void;
|
|
66
68
|
parsePwfNodes(): BootstrapperResult;
|
|
67
69
|
parsePwfMeshnodes(): BootstrapperResult;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { PWFPartitionProxy } from '../../interface/PWFPartitionProxy';
|
|
2
2
|
export declare class PartitionProxyBufferReader {
|
|
3
|
-
private buffer;
|
|
4
|
-
private numPartitionProxies;
|
|
3
|
+
private readonly buffer;
|
|
5
4
|
constructor(buffer: ArrayBuffer);
|
|
6
|
-
getNumPartitionProxies(): number;
|
|
7
5
|
parse(): PWFPartitionProxy[];
|
|
8
6
|
private forEach;
|
|
9
7
|
static numProxies(partitionProxiesAB: ArrayBuffer): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PWFHPartitionProxy } from '../../interface/PWFHPartitionProxy';
|
|
2
|
+
export declare class PWFHPartitionProxyNoCache implements PWFHPartitionProxy {
|
|
3
|
+
private readonly _buffer;
|
|
4
|
+
private readonly _offset;
|
|
5
|
+
constructor(buffer: ArrayBuffer, offset: number);
|
|
6
|
+
offset(): number;
|
|
7
|
+
partitionId(): number;
|
|
8
|
+
partitionUrl(): string;
|
|
9
|
+
meshnodeOffsets(): Uint32Array;
|
|
10
|
+
bbox(): Float32Array;
|
|
11
|
+
childrenIds(): Uint32Array;
|
|
12
|
+
size(): number;
|
|
13
|
+
token(): string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare class PWFHPartitionProxyReader {
|
|
2
|
+
static recordByteSize(buffer: ArrayBuffer, offset: number): number;
|
|
3
|
+
static partitionId(buffer: ArrayBuffer, offset: number): number;
|
|
4
|
+
private static partitionIdAttribute;
|
|
5
|
+
static numChildren(buffer: ArrayBuffer, offset: number): number;
|
|
6
|
+
private static numChildrenAttribute;
|
|
7
|
+
static childrenIds(buffer: ArrayBuffer, offset: number): Uint32Array;
|
|
8
|
+
private static childrenIdsAttribute;
|
|
9
|
+
static bbox(buffer: ArrayBuffer, offset: number): Float32Array;
|
|
10
|
+
private static bboxAttribute;
|
|
11
|
+
static numMeshnodes(buffer: ArrayBuffer, offset: number): number;
|
|
12
|
+
private static numMeshnodesAttribute;
|
|
13
|
+
static meshnodeOffsets(buffer: ArrayBuffer, offset: number): Uint32Array;
|
|
14
|
+
private static meshnodeOffsetsAttribute;
|
|
15
|
+
static tokenSize(buffer: ArrayBuffer, offset: number): number;
|
|
16
|
+
private static tokenSizeAttribute;
|
|
17
|
+
static token(buffer: ArrayBuffer, offset: number): string;
|
|
18
|
+
private static tokenAttribute;
|
|
19
|
+
}
|
|
@@ -13,6 +13,7 @@ export declare class MeshServices {
|
|
|
13
13
|
private readonly meshCount;
|
|
14
14
|
private currentIndex;
|
|
15
15
|
constructor(pwfMeshes: PWFMesh[], pwf: PWFV1);
|
|
16
|
+
getGeometryFactory(): GeometryFactory;
|
|
16
17
|
setGeometryFactory(geometryFactory: GeometryFactory): void;
|
|
17
18
|
getMeshGeometryForOffsets(meshOffset: number, _meshnodeOffset: number | undefined): MeshGeometry | undefined;
|
|
18
19
|
meshFromOffset(offset: number): Mesh;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
import { PerspectiveCamera } from 'three/src/cameras/PerspectiveCamera';
|
|
1
2
|
import type { Node } from './Node';
|
|
2
3
|
import { MeshGeometry } from '../../../procoregl/MeshGeometry';
|
|
3
4
|
import { PWFMeshnode } from '../interface/PWFMeshnode';
|
|
4
5
|
import type { PWFV1 } from '../PWFV1';
|
|
5
6
|
import { MeshnodeObject } from '../objects/MeshnodeObject';
|
|
6
7
|
export declare class Meshnode {
|
|
8
|
+
uploadedToGPU: boolean;
|
|
7
9
|
protected pwfMeshnode: PWFMeshnode;
|
|
8
10
|
private hiddenValue;
|
|
9
11
|
private box3Value?;
|
|
10
12
|
private centerValue?;
|
|
11
13
|
private meshDataValue?;
|
|
12
|
-
|
|
14
|
+
protected meshGeometriesValue?: MeshGeometry[];
|
|
13
15
|
private matrixWorldValue?;
|
|
14
16
|
protected pwf: PWFV1;
|
|
15
17
|
selected: boolean;
|
|
@@ -40,5 +42,9 @@ export declare class Meshnode {
|
|
|
40
42
|
hidden(): Meshnode['hiddenValue'];
|
|
41
43
|
setHidden(hidden: boolean): void;
|
|
42
44
|
setParent(node: Node): void;
|
|
45
|
+
isProjectionAtLeastNPixelsRadius(camera: PerspectiveCamera, canvasSize: {
|
|
46
|
+
height: number;
|
|
47
|
+
width: number;
|
|
48
|
+
}, radiusPixels: number): boolean;
|
|
43
49
|
asObject(): MeshnodeObject;
|
|
44
50
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { PWFV1 } from '../PWFV1';
|
|
2
2
|
import { Meshnode } from './Meshnode';
|
|
3
3
|
import { PWFMeshnode } from '../interface/PWFMeshnode';
|
|
4
|
+
import type { ValidatedFeatureFlags } from '../../../types/WebviewerOptions';
|
|
4
5
|
export declare class MeshnodeServices {
|
|
5
6
|
private meshnodeCount;
|
|
6
7
|
private meshnodes;
|
|
7
8
|
protected pwf: PWFV1;
|
|
8
9
|
protected cachedMeshnodes: Map<number, Meshnode>;
|
|
9
|
-
|
|
10
|
+
protected readonly featureFlags: ValidatedFeatureFlags;
|
|
11
|
+
constructor(pwfMeshnodes: PWFMeshnode[], pwf: PWFV1, featureFlags: ValidatedFeatureFlags);
|
|
10
12
|
getMeshnodeFromIndex(index: number): Meshnode;
|
|
11
13
|
getMeshnode(offset: number): Meshnode;
|
|
12
14
|
numMeshnodes(): number;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { StreamedMeshServices } from './StreamedMeshServices';
|
|
2
|
+
import { PWFHPartitionProxy } from '../interface/PWFHPartitionProxy';
|
|
3
|
+
import { PartitionProxy } from './PartitionProxy';
|
|
4
|
+
export declare class HPartitionProxy extends PartitionProxy {
|
|
5
|
+
static devModelName: string;
|
|
6
|
+
private pwfHPartitionProxy;
|
|
7
|
+
constructor(params: {
|
|
8
|
+
pwfHPartitionProxy: PWFHPartitionProxy;
|
|
9
|
+
meshServices: StreamedMeshServices;
|
|
10
|
+
});
|
|
11
|
+
partitionId(): number;
|
|
12
|
+
partitionUrl(): Promise<string>;
|
|
13
|
+
meshnodeOffsets(): Uint32Array;
|
|
14
|
+
size(): {
|
|
15
|
+
compressed: number;
|
|
16
|
+
size: number;
|
|
17
|
+
};
|
|
18
|
+
static processPartitionProxiesAB(partitionProxiesAB: ArrayBuffer, meshServices: StreamedMeshServices, callback: (partitionProxy: HPartitionProxy) => void): void;
|
|
19
|
+
static getPartitionProxies(partitionProxiesAB: ArrayBuffer): PWFHPartitionProxy[];
|
|
20
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { StreamedMeshGeometry } from '../../../procoregl/StreamedMeshGeometry';
|
|
2
2
|
import { StreamedGeometryFactory } from '../../../procoregl/StreamedGeometryFactory';
|
|
3
3
|
export declare class MeshData {
|
|
4
|
-
private _meshIndex;
|
|
5
|
-
private compressedMeshData;
|
|
4
|
+
private readonly _meshIndex;
|
|
5
|
+
private readonly compressedMeshData;
|
|
6
6
|
private uncompressedMeshData?;
|
|
7
7
|
private meshGeometry?;
|
|
8
8
|
constructor(meshIndex: number, compressedMeshData: ArrayBuffer);
|
|
@@ -13,7 +13,6 @@ export declare class MeshData {
|
|
|
13
13
|
vertices(): Float32Array;
|
|
14
14
|
faces(): Uint16Array;
|
|
15
15
|
uploadToGPU(geometryFactory: StreamedGeometryFactory): StreamedMeshGeometry;
|
|
16
|
-
uploadToGPUPreFetching(geometryFactory: StreamedGeometryFactory): StreamedMeshGeometry;
|
|
17
16
|
getCompressedMeshData(): ArrayBuffer;
|
|
18
17
|
getUncompressedMeshData(): ArrayBuffer;
|
|
19
18
|
}
|
|
@@ -2,24 +2,26 @@ 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
|
+
import type { StreamedMeshServices } from './StreamedMeshServices';
|
|
6
6
|
export declare class PartitionProxy {
|
|
7
7
|
private pwfPartitionProxy;
|
|
8
|
-
|
|
8
|
+
meshServices: StreamedMeshServices;
|
|
9
9
|
static numberOfPartitions: number;
|
|
10
10
|
static numberOfPartitionsLoaded: number;
|
|
11
11
|
static currentNumberOfDownloading: number;
|
|
12
|
-
static prefetchingPartitions: boolean;
|
|
13
|
-
loadedToGPU: boolean;
|
|
14
12
|
isLoading: boolean;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
isLoaded: boolean;
|
|
14
|
+
meshRef2Meshnodes: Map<number, StreamedMeshnode[]>;
|
|
15
|
+
protected _meshnodes: StreamedMeshnode[];
|
|
16
|
+
protected _byteLength?: number;
|
|
17
|
+
protected _compressedByteLength: number;
|
|
18
18
|
private stats;
|
|
19
|
+
private static partitionDownloadManager;
|
|
19
20
|
constructor(params: {
|
|
20
21
|
pwfPartitionProxy: PWFPartitionProxy;
|
|
21
22
|
meshServices: StreamedMeshServices;
|
|
22
23
|
});
|
|
24
|
+
getMeshServices(): StreamedMeshServices;
|
|
23
25
|
meshCount(): number;
|
|
24
26
|
incrementMeshCount(numMeshes: number): void;
|
|
25
27
|
vertexCount(): number;
|
|
@@ -32,6 +34,8 @@ export declare class PartitionProxy {
|
|
|
32
34
|
meshnodes(): StreamedMeshnode[];
|
|
33
35
|
setMeshnodes(meshnodes: StreamedMeshnode[]): void;
|
|
34
36
|
loadPartitionData(callbackFn: (partition: Partition) => void): Promise<void>;
|
|
37
|
+
private loadPartitionMeshesToOPFS;
|
|
38
|
+
private parsePartition;
|
|
35
39
|
loadPartition(factory: StreamedGeometryFactory): Promise<void>;
|
|
36
40
|
size(): {
|
|
37
41
|
compressed: number;
|
|
@@ -40,4 +44,6 @@ export declare class PartitionProxy {
|
|
|
40
44
|
static processPartitionProxiesAB(partitionProxiesAB: ArrayBuffer, meshServices: StreamedMeshServices, callback: (partitionProxy: PartitionProxy) => void): void;
|
|
41
45
|
static getPartitionProxies(partitionProxiesAB: ArrayBuffer): PWFPartitionProxy[];
|
|
42
46
|
getContentOfPartitionUrl(): string;
|
|
47
|
+
static loadPartitions(partitionsSet: Set<PartitionProxy>): Promise<void>;
|
|
48
|
+
private loadPartitionWithManager;
|
|
43
49
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { StreamedMeshGeometry } from '../../../procoregl/StreamedMeshGeometry';
|
|
2
2
|
import type { PWFV1 } from '../PWFV1';
|
|
3
3
|
import { MeshServices } from '../standard';
|
|
4
|
-
import type { StreamedMeshnode } from './StreamedMeshnode';
|
|
5
4
|
import { MeshObject } from '../objects/MeshObject';
|
|
6
5
|
import { MeshData } from './MeshData';
|
|
7
6
|
import { Mesh } from '../standard/Mesh';
|
|
8
7
|
import { OPFSFile } from '../../../utils/OPFSFile';
|
|
9
8
|
import type { ValidatedFeatureFlags } from '../../../types/WebviewerOptions';
|
|
10
9
|
import type { ResourceDiscriminator } from '../../../Webviewer';
|
|
10
|
+
import type { PartitionProxy } from './PartitionProxy';
|
|
11
11
|
export declare class StreamedMeshServices extends MeshServices {
|
|
12
12
|
private readonly featureFlags;
|
|
13
13
|
private meshIndexToOPFSRecord;
|
|
@@ -25,9 +25,10 @@ export declare class StreamedMeshServices extends MeshServices {
|
|
|
25
25
|
closeOPFS(): Promise<void>;
|
|
26
26
|
writeMeshDataToOPFS(meshData: MeshData): Promise<void>;
|
|
27
27
|
getMeshObject(meshIndex: number): MeshObject;
|
|
28
|
-
|
|
28
|
+
loadPartitionProxy(partitionProxy: PartitionProxy): Promise<boolean>;
|
|
29
29
|
getMeshGeometryForOffsets(meshOffset: number, meshnodeOffset: number): StreamedMeshGeometry | undefined;
|
|
30
30
|
meshFromOffset(meshIndex: number): Mesh;
|
|
31
|
+
readMeshDataFromOPFS(meshIndex: number): MeshData;
|
|
31
32
|
private getCompressedMeshDataFromOPFS;
|
|
32
33
|
dispose(): Promise<void>;
|
|
33
34
|
}
|