@d5techs/3dgs-lib 1.4.5 → 1.4.7
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 +80 -30
- package/dist/3dgs-lib.cjs.map +1 -1
- package/dist/3dgs-lib.js +80 -30
- package/dist/3dgs-lib.js.map +1 -1
- package/dist/App.d.ts +4 -0
- package/dist/gs/PLYLoaderMobile.d.ts +4 -3
- package/package.json +1 -1
package/dist/App.d.ts
CHANGED
|
@@ -77,6 +77,10 @@ export declare class App {
|
|
|
77
77
|
* @param coordinateSystem 源数据坐标系,默认 'blender'(Z-up → Y-up 自动转换)
|
|
78
78
|
*/
|
|
79
79
|
addSplat(urlOrBuffer: string | ArrayBuffer, onProgress?: ProgressCallback, isLocalFile?: boolean, coordinateSystem?: CoordinateSystem): Promise<number>;
|
|
80
|
+
/**
|
|
81
|
+
* 将 SplatCPU[] 转换为 CompactSplatData(用于移动端渲染器)
|
|
82
|
+
*/
|
|
83
|
+
private static splatCpuToCompactData;
|
|
80
84
|
/**
|
|
81
85
|
* 加载 SOG 文件 (Spatially Ordered Gaussians)
|
|
82
86
|
* @param coordinateSystem 源数据坐标系,默认 'blender'(Z-up → Y-up 自动转换)
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
13
|
* 坐标系类型
|
|
14
|
-
* - 'blender': Blender 坐标系 (Z-up, 右手系)
|
|
14
|
+
* - 'blender': Blender 坐标系 (Z-up, 右手系),加载时通过 Rx(-90°) 旋转转换为 WebGPU 的 Y-up 坐标系
|
|
15
|
+
* 变换: (x,y,z)→(x,z,-y),保持右手系手性不变
|
|
15
16
|
* - 'webgpu': WebGPU 坐标系 (Y-up),数据已经是 Y-up 格式,不做转换
|
|
16
17
|
*/
|
|
17
18
|
export type CoordinateSystem = 'blender' | 'webgpu';
|
|
@@ -51,8 +52,8 @@ export interface CompactSplatData {
|
|
|
51
52
|
shCoeffs?: Float32Array;
|
|
52
53
|
}
|
|
53
54
|
/**
|
|
54
|
-
*
|
|
55
|
-
* 对 L1/L2/L3
|
|
55
|
+
* Blender→WebGPU 坐标变换 Rx(-90°) 对 SH 系数的基函数变换(interleaved 格式)。
|
|
56
|
+
* 对 L1/L2/L3 三个波段分别施加 Wigner D-矩阵,使 SH 视角相关颜色在坐标变换后保持正确。
|
|
56
57
|
*/
|
|
57
58
|
export declare function transformSHCoeffsYZSwap(sh: Float32Array, base: number, perChannel: number): void;
|
|
58
59
|
/**
|