Documentation
    Preparing search index...

    Interface SkinnedPrograms

    One device's compiled skinned colour pair — created lazily on the first skinned draw, dropped on device loss, disposed with the renderer.

    The palette is a separate bind group: 48 × 64-byte matrices are 3072 bytes, which will not fit in the 256-byte DrawUniforms stride, and widening that block would move every landed unskinned transcript.

    interface SkinnedPrograms {
        lit: SkinnedLitPipeline;
        unlit: SkinnedUnlitPipeline;
        acquireShadow(descriptor: WgpuSkinnedShadowDescriptor): object;
        dispose(): void;
        forget(): void;
        packPalette(palette: Float32Array): number;
        paletteBindGroup(): object | null;
        paletteGroup(lit: boolean, map: boolean): number;
        prepare(device: GpuDevice, draws: number): void;
        upload(device: GpuDevice): void;
    }
    Index
    • Packs palette into the next slot of the frame's palette buffer and returns the dynamic offset the draw binds at. The skeleton's own Float32Array is copied — no scratch beyond the slot — and a short palette leaves the slot's dead tail zeroed.

      Parameters

      • palette: Float32Array

      Returns number

    • Bind-group index the palette occupies for this variant: group 1 on untextured unlit, group 2 on textured unlit and untextured lit, group 3 on textured lit — always the slot after the family's existing groups.

      Parameters

      • lit: boolean
      • map: boolean

      Returns number

    • Grows the palette buffer to hold draws palettes. Call before the pass is recorded (sized-before-recording); a mid-pass grow would orphan the bound group. 0 is a no-op.

      Parameters

      Returns void