API

Interface MorphTargetData

Morph target GPU data — delta storage buffer + weights storage buffer. Created by createMorphTargets() in morph/create-morph-targets.ts. Attached to mesh.morphTargets.

interface MorphTargetData {
    count: number;
    deltasBuffer: GPUBuffer;
    targets: readonly {
        normals: Float32Array<ArrayBufferLike> | null;
        positions: Float32Array;
    }[];
    weights: Float32Array<ArrayBuffer>;
    weightsBuffer: GPUBuffer;
}
Index
count: number
deltasBuffer: GPUBuffer

Read-only storage buffer: 6 f32 per (target, vertex) — position xyz then normal xyz.

targets: readonly {
    normals: Float32Array<ArrayBufferLike> | null;
    positions: Float32Array;
}[]
weights: Float32Array<ArrayBuffer>
weightsBuffer: GPUBuffer

Read-only storage buffer: 16-byte header (count, vertexCount) + one f32 weight per target.