@d5techs/3dgs-lib 1.4.22 → 1.4.24
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/3dgs-lib.cjs +261 -84
- package/dist/3dgs-lib.cjs.map +1 -1
- package/dist/3dgs-lib.js +261 -84
- package/dist/3dgs-lib.js.map +1 -1
- package/dist/gs/SOGEncoder.d.ts +13 -4
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/gs/SOGEncoder.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* 3. 缩放:DP 最优 256-codebook → 量化 → WebP
|
|
9
9
|
* 4. 四元数:smallest-three 编码 → WebP
|
|
10
10
|
* 5. DC 颜色 + 不透明度:DP codebook 量化 → WebP
|
|
11
|
-
* 6. 高阶 SH (L1-L3):k-means palette + DP codebook → centroids/labels WebP
|
|
11
|
+
* 6. 高阶 SH (L1-L3):GPU k-means palette + DP codebook → centroids/labels WebP
|
|
12
12
|
*/
|
|
13
13
|
import type { CompactSplatData, CoordinateSystem } from './PLYLoaderMobile';
|
|
14
14
|
export interface SOGEncodeOptions {
|
|
@@ -17,7 +17,16 @@ export interface SOGEncodeOptions {
|
|
|
17
17
|
paletteSize?: number;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
* @param
|
|
21
|
-
*
|
|
20
|
+
* @param step - step identifier:
|
|
21
|
+
* 'coord_transform' | 'morton_sort' | 'encode_position' |
|
|
22
|
+
* 'encode_scale' | 'encode_quaternion' | 'encode_color' |
|
|
23
|
+
* 'sh_compress' | 'sh_cluster' | 'sh_quantize' |
|
|
24
|
+
* 'encode_webp' | 'pack_zip' | 'done'
|
|
25
|
+
* @param progress - 0..1
|
|
26
|
+
* @param detail - optional extra info, e.g. { iter: 3, total: 10 }
|
|
22
27
|
*/
|
|
23
|
-
export
|
|
28
|
+
export type SOGEncodeProgressCallback = (step: string, progress: number, detail?: {
|
|
29
|
+
iter?: number;
|
|
30
|
+
total?: number;
|
|
31
|
+
}) => void;
|
|
32
|
+
export declare function serializeSOG(data: CompactSplatData, coordinateSystem?: CoordinateSystem, options?: SOGEncodeOptions, onProgress?: SOGEncodeProgressCallback): Promise<ArrayBuffer>;
|
package/dist/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export { loadSplat, deserializeSplat } from './gs/SplatLoader';
|
|
|
29
29
|
export { loadSOG, deserializeSOG } from './gs/SOGLoader';
|
|
30
30
|
export type { SOGProgressCallback } from './gs/SOGLoader';
|
|
31
31
|
export { serializeSOG } from './gs/SOGEncoder';
|
|
32
|
-
export type { SOGEncodeOptions } from './gs/SOGEncoder';
|
|
32
|
+
export type { SOGEncodeOptions, SOGEncodeProgressCallback } from './gs/SOGEncoder';
|
|
33
33
|
export { GSSplatRenderer } from './gs/GSSplatRenderer';
|
|
34
34
|
export { GSSplatSorter } from './gs/GSSplatSorter';
|
|
35
35
|
export type { SorterOptions, CullingOptions, ScreenInfo } from './gs/GSSplatSorter';
|