sprite sheet maker
Tell a Sample Count from the Last Valid Sprite Index
Sprite export code often passes the same number through a renderer, a packer and a review gallery. Those components can disagree about whether it means how many poses exist, which pose to fetch, or the label on its PNG. Reserve different fields for those meanings.
Test a clip whose ending is visibly unique
Assemble a seven-pose fixture with a bright marker at the left on the first pose and the right on the last. Normalize progress zero and one through the renderer's documented endpoint functions. Check that the selected local indices are 0 and 6 for a contiguous zero-based range, and that the decoded terminal cell contains the right marker. Validate both asset lookup and pixel output.
When product filenames start at one, record the last file label as 7 without sending that value to the renderer. A negative test can swap these fields and assert that your wrapper rejects the invalid local index before rendering. An empty result should be handled before subtracting one.
FrameSprite's technical guide and test fixture provides a measured rlottie fixture for endpoint behavior. Preserve the same contract through naming, packing and gallery labels.
Prepared by the FrameSprite Workflow Team with AI assistance. Examples are illustrative unless attributed to a linked fixture.