import type { EntityConstruction } from '@flighthq/entity/contract'; import type { Skeleton2D } from '@flighthq/skeleton2d/contract'; import type { RiveArtboardGraph, RiveImportRegistry, RiveSkeleton2DImport } from './contract.scene2d-formats-types.ts'; /** * Flattens an artboard's bones into a `Skeleton2D`. * * Rive keeps bones in the artboard's own component tree as `TransformComponent`s — siblings of `Node` * rather than nodes themselves — while `Skeleton2D` owns a flat, **parent-before-child** array and * propagates world transforms itself. The bridge is a topological sort, and it is well-founded rather * than a graph problem: every stated parent resolves and the tree holds no cycle, so ordering bones by * their depth in that tree already guarantees a parent precedes its children. Ties keep stream order, * so the result is stable for a given file. * * Returns `null` when the artboard has no bones, which is most of them — a caller pays for a skeleton * only when the file actually rigs something. */ export declare function createRiveSkeleton2D(artboard: Readonly): RiveSkeleton2DImport | null; export declare function initializeRiveSkeleton2DImport(out: EntityConstruction, boneIndices: number[], skeleton: Skeleton2D): void; /** * Registers the bone rig: `SkeletalComponent` and everything derived from it, together with the skin, * tendons and weights that bind a path's vertices to it. * * None of these is a display object — a bone is a transform, not a node — so they contribute no * display nodes and the rig is flattened as a pass. Registering the family is what makes an artboard * carry a skeleton at all, and animation channels bind against its setup pose. */ export declare function registerRiveSkeletonHandlers(registry: RiveImportRegistry): void; //# sourceMappingURL=riveSkeleton.d.ts.map