@d5techs/3dgs-lib 1.4.17 → 1.4.19
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 +156 -31
- package/dist/3dgs-lib.cjs.map +1 -1
- package/dist/3dgs-lib.js +156 -31
- package/dist/3dgs-lib.js.map +1 -1
- package/dist/gs/SOGEncoder.d.ts +12 -6
- package/package.json +1 -1
package/dist/gs/SOGEncoder.d.ts
CHANGED
|
@@ -3,10 +3,16 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SOG 是 PlayCanvas 的压缩容器格式,本质是 ZIP 包含 meta.json + WebP 图像
|
|
5
5
|
* 编码步骤:
|
|
6
|
-
* 1.
|
|
7
|
-
* 2.
|
|
8
|
-
* 3.
|
|
9
|
-
* 4.
|
|
6
|
+
* 1. Morton 空间排序(提升渲染时缓存命中率)
|
|
7
|
+
* 2. 位置:对称对数变换 → 16-bit 量化 → 拆分为 lower/upper 两张 WebP
|
|
8
|
+
* 3. 缩放:k-means++ 构建 256 codebook → 量化 → WebP
|
|
9
|
+
* 4. 四元数:smallest-three 编码 → WebP
|
|
10
|
+
* 5. DC 颜色 + 不透明度:codebook 量化 → WebP
|
|
10
11
|
*/
|
|
11
|
-
import type { CompactSplatData } from './PLYLoaderMobile';
|
|
12
|
-
|
|
12
|
+
import type { CompactSplatData, CoordinateSystem } from './PLYLoaderMobile';
|
|
13
|
+
/**
|
|
14
|
+
* @param coordinateSystem 内部数据的坐标系来源。
|
|
15
|
+
* 'blender' 表示数据在加载时做过 Blender→WebGPU 变换,需要先做逆变换再编码。
|
|
16
|
+
* 'webgpu' 表示数据已在 SOG 原生坐标系,直接编码。
|
|
17
|
+
*/
|
|
18
|
+
export declare function serializeSOG(data: CompactSplatData, coordinateSystem?: CoordinateSystem): Promise<ArrayBuffer>;
|