@procore/bim-webviewer-sdk 17.6.0-rc.26 → 17.6.0-rc.27
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 +1 -6
- package/dist/Procore.Bim.Webviewer.d.ts +31 -52
- package/dist/Procore.Bim.Webviewer.js +1 -1
- package/dist/types/src/components/RootComponent.d.ts +1 -1
- package/dist/types/src/components/StatsJS.d.ts +3 -8
- package/dist/types/src/controllers/Bootstrapper.d.ts +1 -4
- package/dist/types/src/controllers/RenderController.d.ts +2 -3
- package/dist/types/src/controllers/RenderControllerProxy.d.ts +0 -2
- package/dist/types/src/controllers/RenderControllerWorker.d.ts +0 -1
- package/dist/types/src/controllers/RendererFactory.d.ts +1 -2
- package/dist/types/src/procoregl/Models/Models.d.ts +2 -2
- package/dist/types/src/procoregl/PartitionsRenderer.d.ts +0 -3
- package/dist/types/src/procoregl/PartitionsRendererImpl.d.ts +0 -4
- package/dist/types/src/procoregl/SceneGraph/utils.d.ts +2 -0
- package/dist/types/src/procoregl/StreamedGeometryFactory.d.ts +1 -0
- package/dist/types/src/procoregl/ViewerRenderer.d.ts +0 -2
- package/dist/types/src/pwfreader/PWF.d.ts +2 -3
- package/dist/types/src/pwfreader/PWFProxy.d.ts +2 -3
- package/dist/types/src/pwfreader/Utils.d.ts +2 -6
- package/dist/types/src/pwfreader/v1/PWFV1.d.ts +1 -3
- package/dist/types/src/pwfreader/v1/impl/bufferReader/PartitionProxyBufferReader.d.ts +3 -1
- package/dist/types/src/pwfreader/v1/standard/MeshServices.d.ts +0 -1
- package/dist/types/src/pwfreader/v1/standard/Meshnode.d.ts +1 -7
- package/dist/types/src/pwfreader/v1/standard/MeshnodeServices.d.ts +1 -3
- package/dist/types/src/pwfreader/v1/streaming/MeshData.d.ts +3 -2
- package/dist/types/src/pwfreader/v1/streaming/Partition.d.ts +1 -1
- package/dist/types/src/pwfreader/v1/streaming/PartitionProxy.d.ts +7 -13
- package/dist/types/src/pwfreader/v1/streaming/StreamedMeshServices.d.ts +2 -3
- package/dist/types/src/pwfreader/v1/streaming/StreamedMeshnode.d.ts +2 -10
- package/dist/types/src/pwfreader/v1/streaming/StreamedMeshnodeServices.d.ts +1 -1
- package/dist/types/src/pwfreader/v2/PWFV2.d.ts +1 -2
- package/dist/types/src/pwfreader/v2/impl/bufferReader/PartitionProxyBufferReader.d.ts +3 -0
- package/dist/types/src/pwfreader/v2/standard/Meshnode.d.ts +0 -1
- package/dist/types/src/pwfreader/v2/streaming/MeshData.d.ts +3 -2
- package/dist/types/src/pwfreader/v2/streaming/Partition.d.ts +1 -1
- package/dist/types/src/pwfreader/v2/streaming/PartitionProxy.d.ts +3 -1
- package/dist/types/src/pwfreader/v2/streaming/StreamedMeshServices.d.ts +2 -1
- package/dist/types/src/pwfreader/v2/streaming/StreamedMeshnode.d.ts +3 -1
- package/dist/types/src/threeShaking.d.ts +0 -2
- package/dist/types/src/types/WebviewerOptions.d.ts +0 -1
- package/dist/types/src/utils/constants.d.ts +0 -1
- package/package.json +1 -1
- package/dist/types/src/pwfreader/v1/impl/bufferReader/HPartitionProxyBufferReader.d.ts +0 -8
- package/dist/types/src/pwfreader/v1/impl/bufferReader/__tests__/HPartitionProxyBufferReader.test.d.ts +0 -1
- package/dist/types/src/pwfreader/v1/impl/pwfNoCache/PWFHPartitionProxyNoCache.d.ts +0 -14
- package/dist/types/src/pwfreader/v1/impl/recordReader/PWFHPartitionProxyReader.d.ts +0 -19
- package/dist/types/src/pwfreader/v1/interface/PWFHPartitionProxy.d.ts +0 -7
- package/dist/types/src/pwfreader/v1/streaming/HPartitionProxy.d.ts +0 -20
- package/dist/types/src/pwfreader/v1/streaming/PartitionDownloadManager.d.ts +0 -7
- package/dist/types/src/pwfreader/v1/streaming/__tests__/HPartitionProxy.test.d.ts +0 -1
- package/dist/types/src/pwfreader/v1/streaming/__tests__/PartitionDownloadManager.test.d.ts +0 -1
- package/dist/types/src/workers/PartitionDownload.worker.d.ts +0 -1
|
@@ -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 | undefined;
|
|
17
17
|
tooltipManager: TooltipManager;
|
|
18
18
|
init(): void;
|
|
19
19
|
addComponent(ComponentType: any): void;
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import { RenderControllerProxy } from '../controllers/RenderControllerProxy';
|
|
2
1
|
export declare class StatsJS {
|
|
3
2
|
private attached;
|
|
4
3
|
private statsFPS;
|
|
5
4
|
private statsTime;
|
|
6
|
-
private
|
|
7
|
-
private renderControllerProxy;
|
|
8
|
-
private detailsInMotionPanel;
|
|
5
|
+
private statsMemory;
|
|
9
6
|
private static FpsCss;
|
|
10
7
|
private static TimeCss;
|
|
11
|
-
private static
|
|
12
|
-
constructor(renderControllerProxy: RenderControllerProxy);
|
|
8
|
+
private static MemCss;
|
|
13
9
|
attach(document: Document): void;
|
|
14
|
-
update():
|
|
10
|
+
update(): void;
|
|
15
11
|
dispose(): void;
|
|
16
|
-
private isChrome;
|
|
17
12
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { RenderController } from './RenderController';
|
|
2
|
-
import { ValidatedFeatureFlags } from '../types/WebviewerOptions';
|
|
3
2
|
export type BootstrapperResult = {
|
|
4
3
|
isComplete: boolean;
|
|
5
4
|
};
|
|
@@ -19,15 +18,13 @@ export declare class Bootstrapper {
|
|
|
19
18
|
static estimatedInitializationSteps: number;
|
|
20
19
|
static numPartitions: number;
|
|
21
20
|
static launchAnimationLoopExecuted: boolean;
|
|
22
|
-
static modelType: string;
|
|
23
|
-
static enableProgressiveLoading: boolean;
|
|
24
21
|
static summary: Map<string, {
|
|
25
22
|
numCalls: number;
|
|
26
23
|
totalTime: number;
|
|
27
24
|
}>;
|
|
28
25
|
static STEPS_PLANNER: Record<string, number>;
|
|
29
26
|
static initBootstrappingSummary(): void;
|
|
30
|
-
static bootstrap(renderController: RenderController
|
|
27
|
+
static bootstrap(renderController: RenderController): Promise<void>;
|
|
31
28
|
static recordStep(step: string, duration: number): void;
|
|
32
29
|
static summarizeStepsAsText(): void;
|
|
33
30
|
static summarizeStepsAsCSV(): void;
|
|
@@ -24,6 +24,7 @@ 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;
|
|
27
28
|
projectId: any;
|
|
28
29
|
baseUrl: any;
|
|
29
30
|
meshnodeABCached: boolean;
|
|
@@ -377,12 +378,10 @@ export class RenderController {
|
|
|
377
378
|
nodeABCached: boolean;
|
|
378
379
|
meshABCached: boolean;
|
|
379
380
|
};
|
|
380
|
-
getPwfPartitionContentUrls(params?: {}):
|
|
381
|
+
getPwfPartitionContentUrls(params?: {}): string[];
|
|
381
382
|
getNumMeshes(params?: {}): number;
|
|
382
383
|
getNumMeshnodes(params?: {}): number;
|
|
383
384
|
getNumNodes(params?: {}): number;
|
|
384
|
-
isPartitionedModel(): boolean;
|
|
385
|
-
getDetailsInMotion(): number;
|
|
386
385
|
}
|
|
387
386
|
export namespace RenderController {
|
|
388
387
|
namespace NullSelectedSubtree {
|
|
@@ -44,7 +44,6 @@ export class RenderControllerProxy {
|
|
|
44
44
|
'Error: File size exception.': "fileTooBigError";
|
|
45
45
|
};
|
|
46
46
|
handleDownloadError: (message: any) => void;
|
|
47
|
-
modelType: "standard" | "partitioned-flat" | "partitioned-tree";
|
|
48
47
|
downloadMetaData: {
|
|
49
48
|
timeToDownload: number;
|
|
50
49
|
modelCached: boolean;
|
|
@@ -279,7 +278,6 @@ export class RenderControllerProxy {
|
|
|
279
278
|
faceNormal: import("../sdk").Vector3 | null;
|
|
280
279
|
nearestMeshnodeIndex?: number;
|
|
281
280
|
};
|
|
282
|
-
getDetailsInMotion(...params: any[]): number | Promise<any>;
|
|
283
281
|
}
|
|
284
282
|
export namespace RenderControllerProxy {
|
|
285
283
|
namespace NAVIGATION_MODE {
|
|
@@ -120,5 +120,4 @@ 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>;
|
|
124
123
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ViewerRenderer } from '../procoregl/ViewerRenderer';
|
|
2
|
-
import { ValidatedFeatureFlags } from '../types/WebviewerOptions';
|
|
3
2
|
export declare class RendererFactory {
|
|
4
|
-
static createViewerRenderer(canvas: HTMLCanvasElement, offsetWidth: number, offsetHeight: number
|
|
3
|
+
static createViewerRenderer(canvas: HTMLCanvasElement, offsetWidth: number, offsetHeight: number): ViewerRenderer;
|
|
5
4
|
}
|
|
@@ -31,6 +31,7 @@ export declare class Models {
|
|
|
31
31
|
private pwfs;
|
|
32
32
|
private currentParsingPwfIndex;
|
|
33
33
|
private streaming;
|
|
34
|
+
private prefetchingPartitions;
|
|
34
35
|
private geometryFactory?;
|
|
35
36
|
private objectTrees;
|
|
36
37
|
private readonly selectionOption;
|
|
@@ -39,8 +40,6 @@ export declare class Models {
|
|
|
39
40
|
private tempVirtualizedMeshnodes;
|
|
40
41
|
private detailsParams?;
|
|
41
42
|
private readonly isLogging;
|
|
42
|
-
private readonly featureFlags;
|
|
43
|
-
private modelType;
|
|
44
43
|
constructor(params: {
|
|
45
44
|
sceneGraphName: SceneGraphName;
|
|
46
45
|
isLogging: boolean;
|
|
@@ -48,6 +47,7 @@ export declare class Models {
|
|
|
48
47
|
downloadMetaData: DownloadMetaData;
|
|
49
48
|
modelDescriptors: ModelDescriptor[];
|
|
50
49
|
selectionOption: SelectMethod;
|
|
50
|
+
prefetchingPartitions?: boolean;
|
|
51
51
|
featureFlags: ValidatedFeatureFlags;
|
|
52
52
|
});
|
|
53
53
|
private sceneGraphFactory;
|
|
@@ -50,7 +50,6 @@ export class PartitionsRenderer {
|
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
52
|
renderingAtRest: boolean;
|
|
53
|
-
numMeshnodesLoadedToGPU: () => any;
|
|
54
53
|
initialize: (measureSet: any, models: any, colorServices: any) => void;
|
|
55
54
|
render: (scene: any, camera: any) => void;
|
|
56
55
|
cleanBuffer: () => void;
|
|
@@ -62,8 +61,6 @@ export class PartitionsRenderer {
|
|
|
62
61
|
loadMeshShader: () => void;
|
|
63
62
|
setDetailsParams: (detailsParams: any) => void;
|
|
64
63
|
setGeometryFactory: (geometryFactory: any) => void;
|
|
65
|
-
setDelta: (delta: any) => void;
|
|
66
|
-
getDetailsInMotion: () => any;
|
|
67
64
|
renderMeshnode: (meshnode: any, scene: any, camera: any, renderStage: any) => void;
|
|
68
65
|
renderMesh: (scene: any, camera: any, meshGeometry: any, nodedata: any, renderStage: any, isPicked: any, overrideMaterial: any) => void;
|
|
69
66
|
vr: WebXRManager | WebVRManager | null;
|
|
@@ -3,13 +3,11 @@ 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';
|
|
7
6
|
type PartitionedModelRendererArgs = {
|
|
8
7
|
antialias: boolean;
|
|
9
8
|
preserveDrawingBuffer: boolean;
|
|
10
9
|
alpha: boolean;
|
|
11
10
|
canvas: HTMLCanvasElement;
|
|
12
|
-
featureFlags: ValidatedFeatureFlags;
|
|
13
11
|
};
|
|
14
12
|
export declare class PartitionsRendererImpl implements ViewerRenderer {
|
|
15
13
|
private readonly renderer;
|
|
@@ -55,7 +53,5 @@ export declare class PartitionsRendererImpl implements ViewerRenderer {
|
|
|
55
53
|
renderSection(scene: THREE.Scene, camera: THREE.Camera): void;
|
|
56
54
|
getWebGLRenderer(): THREE.WebGLRenderer;
|
|
57
55
|
setGeometryFactory(geometryFactory: GeometryFactory): void;
|
|
58
|
-
setDelta(delta: number): void;
|
|
59
|
-
getDetailsInMotion(): number;
|
|
60
56
|
}
|
|
61
57
|
export {};
|
|
@@ -2,6 +2,7 @@ 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;
|
|
5
6
|
createCylinderGeometry(vertexArray: Float32Array, indexArray: Uint16Array, color: number, opacity: number, drawType: number): StreamedMeshGeometry;
|
|
6
7
|
protected newVertexBufferStream(size: number): WebGLBuffer;
|
|
7
8
|
protected newIndexBufferStream(size: number): WebGLBuffer;
|
|
@@ -36,8 +36,6 @@ 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;
|
|
41
39
|
getWebGLRenderer(): THREE.WebGLRenderer;
|
|
42
40
|
setGeometryFactory(geometryFactory: GeometryFactory): void;
|
|
43
41
|
}
|
|
@@ -5,8 +5,7 @@ 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,
|
|
9
|
-
setHPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionProxiesAB: ArrayBuffer): void;
|
|
8
|
+
setPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionAB: ArrayBuffer): void;
|
|
10
9
|
initPwfParser(): void;
|
|
11
10
|
parsePwfNodes(): BootstrapperResult;
|
|
12
11
|
parsePwfMeshnodes(): BootstrapperResult;
|
|
@@ -24,7 +23,7 @@ export interface PWF {
|
|
|
24
23
|
getVirtualMeshnodeIndexesByNodeId(nodeId: number): number[];
|
|
25
24
|
getNamedNode(nodeId: number): Node;
|
|
26
25
|
globalOffset(): Vector3;
|
|
27
|
-
getPwfPartitionContentUrls():
|
|
26
|
+
getPwfPartitionContentUrls(): string[];
|
|
28
27
|
numNodes(): number;
|
|
29
28
|
numMeshnodes(): number;
|
|
30
29
|
numMeshes(): number;
|
|
@@ -16,9 +16,8 @@ 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
|
-
|
|
21
|
-
getPwfPartitionContentUrls(): Promise<string[]>;
|
|
19
|
+
setPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionAB: ArrayBuffer): void;
|
|
20
|
+
getPwfPartitionContentUrls(): string[];
|
|
22
21
|
initPwfParser(): void;
|
|
23
22
|
parsePwfNodes(): BootstrapperResult;
|
|
24
23
|
parsePwfMeshnodes(): BootstrapperResult;
|
|
@@ -2,12 +2,8 @@ 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
|
|
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;
|
|
5
|
+
export declare const MESH_BUFFER_MAX_CHUNK_SIZE = 3000;
|
|
6
|
+
export declare function isPartitionProxiesAB(buffer: ArrayBuffer): boolean;
|
|
11
7
|
export declare function constructPartitionFASUrl(partitionUrl: string, baseUrl: string, projectId: number): string;
|
|
12
8
|
export declare function trackDownloadComplete(params: {
|
|
13
9
|
totalPartitionsSize?: number;
|
|
@@ -33,7 +33,6 @@ 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';
|
|
37
36
|
private _numMeshnodes;
|
|
38
37
|
private _numMeshes;
|
|
39
38
|
private _numNodes;
|
|
@@ -62,8 +61,7 @@ export declare class PWFV1 implements PWF {
|
|
|
62
61
|
});
|
|
63
62
|
setStandardModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, meshAB: ArrayBuffer): void;
|
|
64
63
|
setPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionProxiesAB: ArrayBuffer): void;
|
|
65
|
-
|
|
66
|
-
getPwfPartitionContentUrls(): Promise<string[]>;
|
|
64
|
+
getPwfPartitionContentUrls(): string[];
|
|
67
65
|
initPwfParser(): void;
|
|
68
66
|
parsePwfNodes(): BootstrapperResult;
|
|
69
67
|
parsePwfMeshnodes(): BootstrapperResult;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { PWFPartitionProxy } from '../../interface/PWFPartitionProxy';
|
|
2
2
|
export declare class PartitionProxyBufferReader {
|
|
3
|
-
private
|
|
3
|
+
private buffer;
|
|
4
|
+
private numPartitionProxies;
|
|
4
5
|
constructor(buffer: ArrayBuffer);
|
|
6
|
+
getNumPartitionProxies(): number;
|
|
5
7
|
parse(): PWFPartitionProxy[];
|
|
6
8
|
private forEach;
|
|
7
9
|
static numProxies(partitionProxiesAB: ArrayBuffer): number;
|
|
@@ -13,7 +13,6 @@ export declare class MeshServices {
|
|
|
13
13
|
private readonly meshCount;
|
|
14
14
|
private currentIndex;
|
|
15
15
|
constructor(pwfMeshes: PWFMesh[], pwf: PWFV1);
|
|
16
|
-
getGeometryFactory(): GeometryFactory;
|
|
17
16
|
setGeometryFactory(geometryFactory: GeometryFactory): void;
|
|
18
17
|
getMeshGeometryForOffsets(meshOffset: number, _meshnodeOffset: number | undefined): MeshGeometry | undefined;
|
|
19
18
|
meshFromOffset(offset: number): Mesh;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { PerspectiveCamera } from 'three/src/cameras/PerspectiveCamera';
|
|
2
1
|
import type { Node } from './Node';
|
|
3
2
|
import { MeshGeometry } from '../../../procoregl/MeshGeometry';
|
|
4
3
|
import { PWFMeshnode } from '../interface/PWFMeshnode';
|
|
5
4
|
import type { PWFV1 } from '../PWFV1';
|
|
6
5
|
import { MeshnodeObject } from '../objects/MeshnodeObject';
|
|
7
6
|
export declare class Meshnode {
|
|
8
|
-
uploadedToGPU: boolean;
|
|
9
7
|
protected pwfMeshnode: PWFMeshnode;
|
|
10
8
|
private hiddenValue;
|
|
11
9
|
private box3Value?;
|
|
12
10
|
private centerValue?;
|
|
13
11
|
private meshDataValue?;
|
|
14
|
-
|
|
12
|
+
private meshGeometriesValue?;
|
|
15
13
|
private matrixWorldValue?;
|
|
16
14
|
protected pwf: PWFV1;
|
|
17
15
|
selected: boolean;
|
|
@@ -42,9 +40,5 @@ export declare class Meshnode {
|
|
|
42
40
|
hidden(): Meshnode['hiddenValue'];
|
|
43
41
|
setHidden(hidden: boolean): void;
|
|
44
42
|
setParent(node: Node): void;
|
|
45
|
-
isProjectionAtLeastNPixelsRadius(camera: PerspectiveCamera, canvasSize: {
|
|
46
|
-
height: number;
|
|
47
|
-
width: number;
|
|
48
|
-
}, radiusPixels: number): boolean;
|
|
49
43
|
asObject(): MeshnodeObject;
|
|
50
44
|
}
|
|
@@ -1,14 +1,12 @@
|
|
|
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';
|
|
5
4
|
export declare class MeshnodeServices {
|
|
6
5
|
private meshnodeCount;
|
|
7
6
|
private meshnodes;
|
|
8
7
|
protected pwf: PWFV1;
|
|
9
8
|
protected cachedMeshnodes: Map<number, Meshnode>;
|
|
10
|
-
|
|
11
|
-
constructor(pwfMeshnodes: PWFMeshnode[], pwf: PWFV1, featureFlags: ValidatedFeatureFlags);
|
|
9
|
+
constructor(pwfMeshnodes: PWFMeshnode[], pwf: PWFV1);
|
|
12
10
|
getMeshnodeFromIndex(index: number): Meshnode;
|
|
13
11
|
getMeshnode(offset: number): Meshnode;
|
|
14
12
|
numMeshnodes(): number;
|
|
@@ -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
|
|
5
|
-
private
|
|
4
|
+
private _meshIndex;
|
|
5
|
+
private compressedMeshData;
|
|
6
6
|
private uncompressedMeshData?;
|
|
7
7
|
private meshGeometry?;
|
|
8
8
|
constructor(meshIndex: number, compressedMeshData: ArrayBuffer);
|
|
@@ -13,6 +13,7 @@ export declare class MeshData {
|
|
|
13
13
|
vertices(): Float32Array;
|
|
14
14
|
faces(): Uint16Array;
|
|
15
15
|
uploadToGPU(geometryFactory: StreamedGeometryFactory): StreamedMeshGeometry;
|
|
16
|
+
uploadToGPUPreFetching(geometryFactory: StreamedGeometryFactory): StreamedMeshGeometry;
|
|
16
17
|
getCompressedMeshData(): ArrayBuffer;
|
|
17
18
|
getUncompressedMeshData(): ArrayBuffer;
|
|
18
19
|
}
|
|
@@ -2,26 +2,24 @@ 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
|
|
5
|
+
import { StreamedMeshServices } from './StreamedMeshServices';
|
|
6
6
|
export declare class PartitionProxy {
|
|
7
7
|
private pwfPartitionProxy;
|
|
8
|
-
meshServices
|
|
8
|
+
private meshServices;
|
|
9
9
|
static numberOfPartitions: number;
|
|
10
10
|
static numberOfPartitionsLoaded: number;
|
|
11
11
|
static currentNumberOfDownloading: number;
|
|
12
|
+
static prefetchingPartitions: boolean;
|
|
13
|
+
loadedToGPU: boolean;
|
|
12
14
|
isLoading: boolean;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
protected _byteLength?: number;
|
|
17
|
-
protected _compressedByteLength: number;
|
|
15
|
+
private _meshnodes;
|
|
16
|
+
private _byteLength?;
|
|
17
|
+
private _compressedByteLength?;
|
|
18
18
|
private stats;
|
|
19
|
-
private static partitionDownloadManager;
|
|
20
19
|
constructor(params: {
|
|
21
20
|
pwfPartitionProxy: PWFPartitionProxy;
|
|
22
21
|
meshServices: StreamedMeshServices;
|
|
23
22
|
});
|
|
24
|
-
getMeshServices(): StreamedMeshServices;
|
|
25
23
|
meshCount(): number;
|
|
26
24
|
incrementMeshCount(numMeshes: number): void;
|
|
27
25
|
vertexCount(): number;
|
|
@@ -34,8 +32,6 @@ export declare class PartitionProxy {
|
|
|
34
32
|
meshnodes(): StreamedMeshnode[];
|
|
35
33
|
setMeshnodes(meshnodes: StreamedMeshnode[]): void;
|
|
36
34
|
loadPartitionData(callbackFn: (partition: Partition) => void): Promise<void>;
|
|
37
|
-
private loadPartitionMeshesToOPFS;
|
|
38
|
-
private parsePartition;
|
|
39
35
|
loadPartition(factory: StreamedGeometryFactory): Promise<void>;
|
|
40
36
|
size(): {
|
|
41
37
|
compressed: number;
|
|
@@ -44,6 +40,4 @@ export declare class PartitionProxy {
|
|
|
44
40
|
static processPartitionProxiesAB(partitionProxiesAB: ArrayBuffer, meshServices: StreamedMeshServices, callback: (partitionProxy: PartitionProxy) => void): void;
|
|
45
41
|
static getPartitionProxies(partitionProxiesAB: ArrayBuffer): PWFPartitionProxy[];
|
|
46
42
|
getContentOfPartitionUrl(): string;
|
|
47
|
-
static loadPartitions(partitionsSet: Set<PartitionProxy>): Promise<void>;
|
|
48
|
-
private loadPartitionWithManager;
|
|
49
43
|
}
|
|
@@ -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';
|
|
4
5
|
import { MeshObject } from '../objects/MeshObject';
|
|
5
6
|
import { MeshData } from './MeshData';
|
|
6
7
|
import { Mesh } from '../standard/Mesh';
|
|
7
8
|
import { OPFSFile } from '../../../utils/OPFSFile';
|
|
8
9
|
import type { ValidatedFeatureFlags } from '../../../types/WebviewerOptions';
|
|
9
10
|
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,10 +25,9 @@ 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
|
+
loadPartitionContainingMeshnode(streamedMeshnode: StreamedMeshnode): Promise<void>;
|
|
29
29
|
getMeshGeometryForOffsets(meshOffset: number, meshnodeOffset: number): StreamedMeshGeometry | undefined;
|
|
30
30
|
meshFromOffset(meshIndex: number): Mesh;
|
|
31
|
-
readMeshDataFromOPFS(meshIndex: number): MeshData;
|
|
32
31
|
private getCompressedMeshDataFromOPFS;
|
|
33
32
|
dispose(): Promise<void>;
|
|
34
33
|
}
|
|
@@ -3,20 +3,12 @@ import { Meshnode } from '../standard/Meshnode';
|
|
|
3
3
|
import { MeshnodeObject } from '../objects/MeshnodeObject';
|
|
4
4
|
import { PartitionProxy } from './PartitionProxy';
|
|
5
5
|
import { StreamedMeshGeometry } from '../../../procoregl/StreamedMeshGeometry';
|
|
6
|
-
import { PWFMeshnode } from '../interface/PWFMeshnode';
|
|
7
|
-
import type { PWFV1 } from '../PWFV1';
|
|
8
6
|
export declare class StreamedMeshnode extends Meshnode {
|
|
9
|
-
_partitionProxy
|
|
10
|
-
_meshGeometries
|
|
11
|
-
protected meshGeometriesValue: MeshGeometry[];
|
|
12
|
-
uploadedToGPU: boolean;
|
|
13
|
-
prefetching: boolean;
|
|
14
|
-
constructor(pwfMeshnode: PWFMeshnode, pwf: PWFV1, prefetching: boolean);
|
|
15
|
-
isPrefetching(): boolean;
|
|
7
|
+
private _partitionProxy?;
|
|
8
|
+
private _meshGeometries;
|
|
16
9
|
setPartitionProxy(partitionProxy: PartitionProxy): void;
|
|
17
10
|
partitionProxy(): PartitionProxy;
|
|
18
11
|
meshGeometries(): MeshGeometry[];
|
|
19
|
-
uploadMeshDataToGPU(): Promise<void>;
|
|
20
12
|
setMeshGeometry(meshIndex: number, meshGeometry: StreamedMeshGeometry): void;
|
|
21
13
|
getMeshGeometry(meshIndex: number): StreamedMeshGeometry | undefined;
|
|
22
14
|
asObject(): MeshnodeObject;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MeshnodeServices } from '../standard';
|
|
1
|
+
import { MeshnodeServices } from '../standard/MeshnodeServices';
|
|
2
2
|
import { Meshnode } from '../standard/Meshnode';
|
|
3
3
|
import { PWFMeshnode } from '../interface/PWFMeshnode';
|
|
4
4
|
export declare class StreamedMeshnodeServices extends MeshnodeServices {
|
|
@@ -65,8 +65,7 @@ export declare class PWFV2 implements PWF {
|
|
|
65
65
|
});
|
|
66
66
|
setStandardModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, meshAB: ArrayBuffer): void;
|
|
67
67
|
setPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionProxiesAB: ArrayBuffer): void;
|
|
68
|
-
|
|
69
|
-
getPwfPartitionContentUrls(): Promise<string[]>;
|
|
68
|
+
getPwfPartitionContentUrls(): string[];
|
|
70
69
|
initPwfParser(): void;
|
|
71
70
|
parsePwfNodes(): BootstrapperResult;
|
|
72
71
|
parsePwfMeshnodes(): BootstrapperResult;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { PWFPartitionProxy } from '../../interface/PWFPartitionProxy';
|
|
2
2
|
export declare class PartitionProxyBufferReader {
|
|
3
3
|
private buffer;
|
|
4
|
+
private numPartitionProxies;
|
|
4
5
|
constructor(buffer: ArrayBuffer);
|
|
6
|
+
getNumPartitionProxies(): number;
|
|
5
7
|
parse(): PWFPartitionProxy[];
|
|
6
8
|
private forEach;
|
|
9
|
+
static numProxies(partitionProxiesAB: ArrayBuffer): number;
|
|
7
10
|
}
|
|
@@ -4,7 +4,6 @@ import { PWFMeshnode } from '../interface/PWFMeshnode';
|
|
|
4
4
|
import type { PWFV2 } from '../PWFV2';
|
|
5
5
|
import { MeshnodeObject } from '../objects/MeshnodeObject';
|
|
6
6
|
export declare class Meshnode {
|
|
7
|
-
uploadedToGPU: boolean;
|
|
8
7
|
protected pwfMeshnode: PWFMeshnode;
|
|
9
8
|
private hiddenValue;
|
|
10
9
|
private box3Value?;
|
|
@@ -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
|
|
5
|
-
private
|
|
4
|
+
private _meshIndex;
|
|
5
|
+
private compressedMeshData;
|
|
6
6
|
private uncompressedMeshData?;
|
|
7
7
|
private meshGeometry?;
|
|
8
8
|
constructor(meshIndex: number, compressedMeshData: ArrayBuffer);
|
|
@@ -13,6 +13,7 @@ export declare class MeshData {
|
|
|
13
13
|
vertices(): Float32Array;
|
|
14
14
|
faces(): Uint16Array;
|
|
15
15
|
uploadToGPU(geometryFactory: StreamedGeometryFactory): StreamedMeshGeometry;
|
|
16
|
+
uploadToGPUPreFetching(geometryFactory: StreamedGeometryFactory): StreamedMeshGeometry;
|
|
16
17
|
getCompressedMeshData(): ArrayBuffer;
|
|
17
18
|
getUncompressedMeshData(): ArrayBuffer;
|
|
18
19
|
}
|
|
@@ -5,9 +5,11 @@ import { StreamedGeometryFactory } from '../../../procoregl/StreamedGeometryFact
|
|
|
5
5
|
import { StreamedMeshServices } from './StreamedMeshServices';
|
|
6
6
|
export declare class PartitionProxy {
|
|
7
7
|
private pwfPartitionProxy;
|
|
8
|
+
private meshServices;
|
|
8
9
|
static numberOfPartitions: number;
|
|
9
10
|
static numberOfPartitionsLoaded: number;
|
|
10
11
|
static currentNumberOfDownloading: number;
|
|
12
|
+
static prefetchingPartitions: boolean;
|
|
11
13
|
loadedToGPU: boolean;
|
|
12
14
|
isLoading: boolean;
|
|
13
15
|
private _meshnodes;
|
|
@@ -30,7 +32,7 @@ export declare class PartitionProxy {
|
|
|
30
32
|
meshnodes(): StreamedMeshnode[];
|
|
31
33
|
setMeshnodes(meshnodes: StreamedMeshnode[]): void;
|
|
32
34
|
loadPartitionData(callbackFn: (partition: Partition) => void): Promise<void>;
|
|
33
|
-
loadPartition(
|
|
35
|
+
loadPartition(factory: StreamedGeometryFactory): Promise<void>;
|
|
34
36
|
size(): {
|
|
35
37
|
compressed: number;
|
|
36
38
|
size: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { StreamedMeshGeometry } from '../../../procoregl/StreamedMeshGeometry';
|
|
2
2
|
import type { PWFV2 } from '../PWFV2';
|
|
3
3
|
import { MeshServices } from '../standard';
|
|
4
|
+
import type { StreamedMeshnode } from './StreamedMeshnode';
|
|
4
5
|
import { MeshObject } from '../objects/MeshObject';
|
|
5
6
|
import { MeshData } from './MeshData';
|
|
6
7
|
import { Mesh } from '../standard/Mesh';
|
|
@@ -24,7 +25,7 @@ export declare class StreamedMeshServices extends MeshServices {
|
|
|
24
25
|
closeOPFS(): Promise<void>;
|
|
25
26
|
writeMeshDataToOPFS(meshData: MeshData): Promise<void>;
|
|
26
27
|
getMeshObject(meshIndex: number): MeshObject;
|
|
27
|
-
loadPartitionContainingMeshnode(): void
|
|
28
|
+
loadPartitionContainingMeshnode(streamedMeshnode: StreamedMeshnode): Promise<void>;
|
|
28
29
|
getMeshGeometryForOffsets(meshOffset: number, meshnodeOffset: number): StreamedMeshGeometry | undefined;
|
|
29
30
|
meshFromOffset(meshIndex: number): Mesh;
|
|
30
31
|
private getCompressedMeshDataFromOPFS;
|
|
@@ -5,10 +5,12 @@ import { PartitionProxy } from './PartitionProxy';
|
|
|
5
5
|
import { StreamedMeshGeometry } from '../../../procoregl/StreamedMeshGeometry';
|
|
6
6
|
export declare class StreamedMeshnode extends Meshnode {
|
|
7
7
|
private _partitionProxy?;
|
|
8
|
+
private _meshGeometries;
|
|
8
9
|
setPartitionProxy(partitionProxy: PartitionProxy): void;
|
|
9
10
|
partitionProxy(): PartitionProxy;
|
|
10
11
|
meshGeometries(): MeshGeometry[];
|
|
11
|
-
|
|
12
|
+
setMeshGeometry(meshIndex: number, meshGeometry: StreamedMeshGeometry): void;
|
|
13
|
+
getMeshGeometry(meshIndex: number): StreamedMeshGeometry | undefined;
|
|
12
14
|
asObject(): MeshnodeObject;
|
|
13
15
|
private getMeshObject;
|
|
14
16
|
}
|
|
@@ -39,7 +39,6 @@ export namespace THREE {
|
|
|
39
39
|
export { RGBAFormat };
|
|
40
40
|
export { Scene };
|
|
41
41
|
export { ShaderMaterial };
|
|
42
|
-
export { Sphere };
|
|
43
42
|
export { Spherical };
|
|
44
43
|
export { Triangle };
|
|
45
44
|
export { Vector2 };
|
|
@@ -88,7 +87,6 @@ import { Raycaster } from 'three/src/core/Raycaster';
|
|
|
88
87
|
import { RGBAFormat } from 'three/src/constants';
|
|
89
88
|
import { Scene } from 'three/src/scenes/Scene';
|
|
90
89
|
import { ShaderMaterial } from 'three/src/materials/ShaderMaterial';
|
|
91
|
-
import { Sphere } from 'three/src/math/Sphere';
|
|
92
90
|
import { Spherical } from 'three/src/math/Spherical';
|
|
93
91
|
import { Triangle } from 'three/src/math/Triangle';
|
|
94
92
|
import { Vector2 } from 'three/src/math/Vector2';
|
|
@@ -8,7 +8,6 @@ export type FeatureFlags = {
|
|
|
8
8
|
* @beta Enables writing mesh data to OPFS for partitioned models, which allows users to use features that use mesh data, notably Point to Point.
|
|
9
9
|
*/
|
|
10
10
|
enableMeshDataOnOPFS: boolean;
|
|
11
|
-
enableProgressiveLoading: boolean;
|
|
12
11
|
};
|
|
13
12
|
export type ValidatedFeatureFlags = Readonly<FeatureFlags>;
|
|
14
13
|
export type CommonOptions = {
|
package/package.json
CHANGED