/** * A custom melonJS WebGPU batcher rendering Spine skeletons with full * two-color tinting — the WebGPU counterpart of the WebGL `SpineBatcher`. * * Geometry comes from spine-core's backend-neutral `SkeletonRendererCore`: * one linked list of render commands per skeleton (positions, UVs, packed * light/dark colors, indices, blend mode, texture — clipping already * applied, compatible slots already merged). Each command records as one * indexed draw: vertices into the frame's vertex arena, indices into the * index arena, the texture resolved through the renderer's texture store * from the image-backed atlas the canvas asset path already loads. * @augments WebGPUBatcher * @category Rendering */ export default class WebGPUSpineBatcher extends WebGPUBatcher { /** * Initialize (or re-initialize after a device loss) the batcher — * settings are rebuilt here so the renderer's device-restore recovery * can re-create every GPU-facing registration with a bare * `batcher.init(renderer)` call, matching the engine's built-ins. * @param {object} renderer - the current WebGPU renderer * @param {object} [settings] - batcher settings override * @ignore */ init(renderer: object, settings?: object): void; indexData: Uint32Array | undefined; indexCount: any; currentMaterial: any; overflowWarned: boolean | undefined; /** * Resolve a spine page texture to the engine texture-store material * bind group, creating the stable atlas-shaped wrapper on first use. * @param {object} texture - a spine `Texture` (image-backed) * @param {boolean} premultipliedAlpha - the atlas page's pma flag * @returns {GPUBindGroup} the material bind group * @ignore */ materialFor(texture: object, premultipliedAlpha: boolean): GPUBindGroup; /** * Render a skeleton: run the neutral geometry pass and record its * command list — one indexed draw per texture/blend-compatible batch. * @param {object} skeleton - the spine Skeleton (posed for this frame) * @param {boolean} premultipliedAlpha - whether the atlas pages are premultiplied */ drawSkeleton(skeleton: object, premultipliedAlpha: boolean): void; /** * Append one render command's geometry to the staging buffers, * rebasing its indices onto the pending vertex count. * @param {object} command - a SkeletonRendererCore render command * @ignore */ appendCommand(command: object): void; /** * Record the pending spine vertices as one indexed draw. * @override */ override flush(): void; } import { WebGPUBatcher } from "melonjs"; //# sourceMappingURL=WebGPUSpineBatcher.d.ts.map