@speridlabs/visus 1.0.4 → 2.0.1
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/dist/main.d.ts +25 -6
- package/dist/main.es.js +615 -525
- package/dist/main.umd.js +6 -6
- package/dist/react.es.js +757 -667
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -49,6 +49,15 @@ export declare class BoundingBox {
|
|
|
49
49
|
* Class for loading PLY files with Gaussian Splat data
|
|
50
50
|
*/
|
|
51
51
|
export declare class PlyLoader extends THREE.Loader {
|
|
52
|
+
private requestId;
|
|
53
|
+
private worker;
|
|
54
|
+
private pendingCallbacks;
|
|
55
|
+
constructor(manager?: THREE.LoadingManager);
|
|
56
|
+
/**
|
|
57
|
+
* Handles messages received from the parsing worker
|
|
58
|
+
* @param event The message event from the worker
|
|
59
|
+
*/
|
|
60
|
+
private onWorkerMessage;
|
|
52
61
|
/**
|
|
53
62
|
* Load a PLY file with Gaussian Splat data
|
|
54
63
|
* @param url URL of the PLY file
|
|
@@ -65,11 +74,20 @@ export declare class PlyLoader extends THREE.Loader {
|
|
|
65
74
|
*/
|
|
66
75
|
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<SplatData>;
|
|
67
76
|
/**
|
|
68
|
-
* Parse PLY buffer data
|
|
77
|
+
* Parse PLY buffer data asynchronously using Web Worker
|
|
69
78
|
* @param buffer ArrayBuffer containing PLY data
|
|
70
|
-
* @returns
|
|
79
|
+
* @returns Promise that resolves with parsed SplatData
|
|
80
|
+
*/
|
|
81
|
+
private parseAsync;
|
|
82
|
+
/**
|
|
83
|
+
* Terminate the Web Worker and clean up resources
|
|
71
84
|
*/
|
|
72
|
-
|
|
85
|
+
dispose(): void;
|
|
86
|
+
/**
|
|
87
|
+
* Creates the self-contained code for the parsing Web Worker
|
|
88
|
+
* @returns A string containing the JavaScript code for the worker
|
|
89
|
+
*/
|
|
90
|
+
private createWorkerCode;
|
|
73
91
|
}
|
|
74
92
|
|
|
75
93
|
export declare class SplatData {
|
|
@@ -79,7 +97,6 @@ export declare class SplatData {
|
|
|
79
97
|
scales: Float32Array;
|
|
80
98
|
colors: Float32Array;
|
|
81
99
|
opacities: Float32Array;
|
|
82
|
-
centers: Float32Array;
|
|
83
100
|
boundingBox: BoundingBox;
|
|
84
101
|
constructor(numSplats?: number);
|
|
85
102
|
private allocateBuffers;
|
|
@@ -164,7 +181,7 @@ export declare interface SplatMaterialOptions {
|
|
|
164
181
|
*/
|
|
165
182
|
export declare class SplatMesh extends THREE.Mesh {
|
|
166
183
|
sorter: SplatSorter;
|
|
167
|
-
splatData: SplatData;
|
|
184
|
+
splatData: SplatData | null;
|
|
168
185
|
options: SplatMeshOptions;
|
|
169
186
|
textureManager: TextureManager;
|
|
170
187
|
material: SplatMaterial;
|
|
@@ -227,6 +244,7 @@ export declare class SplatMesh extends THREE.Mesh {
|
|
|
227
244
|
|
|
228
245
|
export declare interface SplatMeshOptions extends SplatMaterialOptions {
|
|
229
246
|
autoSort?: boolean;
|
|
247
|
+
keepSplatData?: boolean;
|
|
230
248
|
}
|
|
231
249
|
|
|
232
250
|
/**
|
|
@@ -253,8 +271,9 @@ export declare class SplatSorter extends THREE.EventDispatcher<{
|
|
|
253
271
|
* @param orderTexture The THREE.DataTexture (R32UI) to store the sorted splat indices.
|
|
254
272
|
* @param centers A Float32Array containing the center position (x, y, z) for each splat.
|
|
255
273
|
* @param chunks Optional: A Float32Array containing bounding box chunk data [minX, minY, minZ, maxX, maxY, maxZ, ...] for optimization.
|
|
274
|
+
* @param transferOwnership Optional: If true, transfers ownership of centers buffer to worker (saves memory, main thread loses access). Default: false.
|
|
256
275
|
*/
|
|
257
|
-
init(orderTexture: THREE.DataTexture, centers: Float32Array, chunks?: Float32Array): void;
|
|
276
|
+
init(orderTexture: THREE.DataTexture, centers: Float32Array, chunks?: Float32Array, transferOwnership?: boolean): void;
|
|
258
277
|
/**
|
|
259
278
|
* Applies an optional mapping to filter or reorder splats before sorting.
|
|
260
279
|
* The sorter will only consider splats whose original indices are present in the mapping.
|