/** * @classdesc * A Canvas-based Spine skeleton renderer that draws through melonJS's * canvas renderer API (drawImage, transform, setTint, setMask, etc.). * This provides proper integration with melonJS's canvas rendering pipeline * including tinting, blend modes, and clipping support. */ export default class SkeletonRenderer { /** * Whether to enable triangle rendering for mesh attachments. * When false, only region (image) attachments are rendered using the * fast bone-transform path. Automatically enabled by Spine when the * skeleton contains mesh attachments. * @type {boolean} * @default false */ triangleRendering: boolean; /** * Whether to render debug outlines for regions, meshes, and clips * @type {boolean} * @default false */ debugRendering: boolean; /** * Whether textures use premultiplied alpha * @type {boolean} * @default false */ premultipliedAlpha: boolean; tintColor: MColor; clipper: SkeletonClipping; clippingVertices: any[]; clippingMask: Polygon; /** * Draw the given skeleton using the melonJS canvas renderer. * @param {CanvasRenderer} renderer - the melonJS canvas renderer * @param {Skeleton} skeleton - the Spine skeleton to draw */ draw(renderer: CanvasRenderer, skeleton: Skeleton): void; /** * Draw a region attachment (single quad image). * @param {CanvasRenderer} renderer * @param {HTMLImageElement} image * @param {Bone} bone * @param {RegionAttachment} attachment * @param {SlotPose} slotPose - the slot's applied pose (resolves sequence offsets) * @param {TextureRegion} region * @param {Polygon|null} mask - clipping mask if active * @param {boolean} debug - whether to draw debug outline * @ignore */ drawRegion(renderer: CanvasRenderer, image: HTMLImageElement, bone: Bone, attachment: RegionAttachment, slotPose: SlotPose, region: TextureRegion, mask: Polygon | null, debug: boolean): void; /** * Draw a mesh attachment as a series of textured triangles. * @param {CanvasRenderer} renderer * @param {HTMLImageElement} image * @param {Float32Array} vertices - world positions, stride 2 (x, y per vertex) * @param {NumberArrayLike} uvs - atlas UVs from `sequence.getUVs(index)`, stride 2 * @param {number[]} triangles - triangle indices * @ignore */ drawMesh(renderer: CanvasRenderer, image: HTMLImageElement, vertices: Float32Array, uvs: NumberArrayLike, triangles: number[]): void; /** * Draw a single textured triangle using affine transform. * @ignore */ drawTriangle(renderer: any, img: any, x0: any, y0: any, u0: any, v0: any, x1: any, y1: any, u1: any, v1: any, x2: any, y2: any, u2: any, v2: any): void; } import { Color as MColor } from "melonjs"; import { SkeletonClipping } from "@esotericsoftware/spine-core"; import { Polygon } from "melonjs"; import { RegionAttachment } from "@esotericsoftware/spine-core"; //# sourceMappingURL=SkeletonRenderer.d.ts.map