@d5techs/3dgs-lib 1.4.16 → 1.4.17
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 +786 -11
- package/dist/3dgs-lib.cjs.map +1 -1
- package/dist/3dgs-lib.js +786 -11
- package/dist/3dgs-lib.js.map +1 -1
- package/dist/editor/SplatEditor.d.ts +2 -0
- package/dist/gs/SOGEncoder.d.ts +12 -0
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -64,6 +64,8 @@ export declare class SplatEditor {
|
|
|
64
64
|
undo(): void;
|
|
65
65
|
redo(): void;
|
|
66
66
|
exportPLY(): ArrayBuffer | null;
|
|
67
|
+
exportSOG(): Promise<ArrayBuffer | null>;
|
|
68
|
+
private getFilteredCompactData;
|
|
67
69
|
downloadPLY(filename?: string): void;
|
|
68
70
|
private selectByRect;
|
|
69
71
|
private selectByMask;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SOGEncoder - 将 CompactSplatData 编码为 SOG v2 格式
|
|
3
|
+
*
|
|
4
|
+
* SOG 是 PlayCanvas 的压缩容器格式,本质是 ZIP 包含 meta.json + WebP 图像
|
|
5
|
+
* 编码步骤:
|
|
6
|
+
* 1. 位置:对称对数变换 → 16-bit 量化 → 拆分为 lower/upper 两张 WebP
|
|
7
|
+
* 2. 缩放:k-means 构建 256 codebook → 量化 → WebP
|
|
8
|
+
* 3. 四元数:smallest-three 编码 → WebP
|
|
9
|
+
* 4. DC 颜色 + 不透明度:codebook 量化 → WebP
|
|
10
|
+
*/
|
|
11
|
+
import type { CompactSplatData } from './PLYLoaderMobile';
|
|
12
|
+
export declare function serializeSOG(data: CompactSplatData): Promise<ArrayBuffer>;
|
package/dist/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export type { MobileLoadOptions, CompactSplatData, CoordinateSystem } from './gs
|
|
|
28
28
|
export { loadSplat, deserializeSplat } from './gs/SplatLoader';
|
|
29
29
|
export { loadSOG, deserializeSOG } from './gs/SOGLoader';
|
|
30
30
|
export type { SOGProgressCallback } from './gs/SOGLoader';
|
|
31
|
+
export { serializeSOG } from './gs/SOGEncoder';
|
|
31
32
|
export { GSSplatRenderer } from './gs/GSSplatRenderer';
|
|
32
33
|
export { GSSplatSorter } from './gs/GSSplatSorter';
|
|
33
34
|
export type { SorterOptions, CullingOptions, ScreenInfo } from './gs/GSSplatSorter';
|