(0, 0) is the top-left corner, (0.5, 0.5) is the centre, (1, 1) is the bottom-right.
FastPack stores pivot metadata in the atlas data file per sprite. The packer itself does not use the pivot — it is purely informational for your runtime.
Usage
CLI flags
Set a default pivot for every sprite in the pack:Both
--pivot-x and --pivot-y must be provided together.Project file configuration
Example output
JSON Hash output:The
pivot field is omitted when the default pivot is { x: 0, y: 0 } and no override is set.Technical details
Pivot coordinates relative to source size
Pivot coordinates relative to source size
Pivot values are normalized relative to
sourceSize (the original image dimensions before trimming), not the packed frame. A pivot of (0.5, 1.0) on a 64×96 sprite always refers to the horizontal centre of the original at its bottom edge, regardless of trim.Scale variants
Scale variants
Pivot values are scale-independent normalized coordinates. They are copied to each scale variant unchanged.
TexturePacker compatibility
TexturePacker writes pivot coordinates under thepivot key with the same { x, y } float structure. Output from FastPack is compatible with engines that already read TexturePacker pivot data.