/** * {@link computeSplatSkinWeights}: gives a static splat the skin of a rigged * proxy mesh, so a captured scan can be animated by a skeleton made for that * proxy (a glTF character, creature or vehicle). */ import * as THREE from 'three/webgpu'; import type { SplatData } from '../core/splat-data'; import type { SplatSkinData } from './skinned-splat-mesh'; /** * Options of {@link computeSplatSkinWeights}. * * @experimental */ export interface SplatSkinWeightOptions { /** * Bones kept per splat: the heaviest of the vertex's four, renormalized. * Default 4; 2 halves the per-splat cost and suits most creatures. */ bonesPerSplat?: 1 | 2 | 4; /** * Carries splat centers into the proxy geometry's frame, when the two were * not made in the same one (a scan aligned to its rig by hand, a capture in * 3DGS axes against a Y-up character). Default: the frames coincide. */ splatToProxy?: THREE.Matrix4; } /** * Transfers a rigged proxy's skin to a splat: each splat takes the bone * indices and weights of the proxy vertex nearest its center. The proxy is * any `THREE.SkinnedMesh` (a glTF character's mesh, a low-poly cage drawn * around a scan). Its geometry is matched in the splat's local frame unless * `options.splatToProxy` says how to carry splat centers into the proxy's. Pass the result to `SkinnedSplatMesh`, then bind the proxy's * skeleton. * * Nearest-vertex transfer is coarse where the proxy is: splats between two * limbs follow whichever vertex is nearer. A denser proxy, or weights made * for the splats themselves, gives cleaner joints. * * @throws {Error} when the proxy has no `skinIndex` / `skinWeight` attributes. * @experimental The API may change in a minor release. */ export declare function computeSplatSkinWeights(data: Pick, proxy: THREE.SkinnedMesh, options?: SplatSkinWeightOptions): SplatSkinData;