Overview
A.fpsheet file is a TOML document that stores all packer settings for a project. Instead of passing flags on every run, write them once to an .fpsheet and reference it with --project.
Creating a project file
Generate a default.fpsheet in the current directory:
Full example
atlas.fpsheet
Field reference
[meta]
Project file format version. Current version is
"1".[[sources]]
Multiple[[sources]] blocks are allowed. Each adds a set of sprites to the pack.
Root directory to search for sprite files. Relative to the project file location.
Glob pattern relative to
path. Matches files to include as sprites.Examples:**/*.png- All PNG files recursively (default)*.png- PNG files in root onlycharacters/**/*.png- PNG files in characters subdirectory
Example: Multiple sources
[layout]
Controls atlas dimensions and packing algorithm.Maximum atlas width in pixels. The packer will try to fit sprites within this constraint.
Maximum atlas height in pixels. The packer will try to fit sprites within this constraint.
Force an exact width, overriding
max_width. Sprites that don’t fit are dropped (or overflow if multipack is enabled).Force an exact height, overriding
max_height. Sprites that don’t fit are dropped (or overflow if multipack is enabled).Pixels of empty space around the atlas edge. Helps prevent texture bleeding at atlas boundaries.
Pixels of empty space between sprites. Helps prevent texture bleeding between adjacent sprites.
Allow 90° sprite rotation to improve packing density. Rotation data is included in output metadata.
Packing algorithm quality level.Values:
"fast"- Basic strip packer; fastest, largest atlas"good"- MaxRects single-pass; good density, moderate speed"best"- MaxRects width search; densest atlas, slowest (default)
Constrain atlas to square dimensions (width == height). Useful for engines that require square textures.
Valid atlas dimension modes.Values:
"any_size"- No constraint; smallest rectangle that fits (default)"pot"- Width and height must be powers of two (e.g., 512, 1024, 2048)"multiple_of_4"- Width and height must each be divisible by 4"word_aligned"- Width and height must each be divisible by 2
Example: Power-of-two square atlas
[sprites]
Controls sprite pre-processing and trimming.How to strip transparent borders from sprites.Values:
"none"- Pack the full image including transparent borders"trim"- Strip transparent borders; store offset for reconstruction (default)"crop"- Crop tightly to the opaque region"crop_keep_pos"- Like crop but offsets may be negative to preserve registration"polygon"- Build convex hull polygon; pack its bounding box
Alpha threshold: pixels at or below this value (0-255) are considered transparent during trimming.
Transparent pixels kept around the trim edge. Useful for effects that need some transparency.
Edge pixels to repeat outward before packing. Helps prevent texture bleeding during filtering.
Deduplicate pixel-identical sprites. Aliases reference the same atlas region, saving space.
Fallback pivot point for all sprites. Format:
{ x = float, y = float } where 0.0 is top/left and 1.0 is bottom/right.Round trimmed width up to the nearest multiple.
0 disables. Useful for alignment requirements.Round trimmed height up to the nearest multiple.
0 disables. Useful for alignment requirements.Example: Aggressive trimming
[output]
Controls output files and formats.Base filename without extension. Produces files like
atlas.png and atlas.json.Output directory path. Relative to the project file location or absolute.
Output texture format.Values:
"png"- Lossless PNG (default)"jpg"or"jpeg"- Lossy JPEG; no alpha channel"webp"- WebP (lossless or lossy depending on pack mode)
Pixel encoding. Floyd-Steinberg dithering is applied when not RGBA8888.Values:
"RGBA8888"- 32-bit RGBA (8 bits per channel); no dithering (default)"RGB888"- 24-bit RGB (8 bits per channel, alpha forced to 255)"RGB565"- 16-bit RGB (5-6-5); dithered"RGBA4444"- 16-bit RGBA (4 bits per channel); dithered"RGBA5551"- 16-bit RGBA (5-5-5-1); dithered, alpha thresholded at 128"ALPHA8"- 8-bit alpha only
Output data format for sprite metadata.Values:
"json_hash"- Generic JSON object keyed by sprite name (default)"json_array"- JSON array of frame objects"phaser3"- Phaser 3 multi-atlas format"pixijs"- PixiJS sprite sheet format
Lossy encoding quality, 0-100. Applies to JPEG and WebP. Higher values mean better quality and larger files.
Multiply RGB channels by alpha before encoding. Improves blending quality in some engines.
String prepended to texture filenames in data files. Useful for CDN URLs or relative paths.Example:
"assets/" produces "assets/atlas.png" in the JSON.Example: Optimized mobile output
[algorithm]
Controls the core packing algorithm.MaxRects (default)
Set to
"max_rects" for the MaxRects algorithm.MaxRects heuristic to use.Values:
"best_short_side_fit"- Minimize leftover short side (default)"best_long_side_fit"- Minimize leftover long side"best_area_fit"- Minimize leftover area"bottom_left_rule"- Pack from bottom-left corner"contact_point_rule"- Maximize edge contact
Grid
Set to
"grid" for the grid algorithm.Width of each grid cell.
0 auto-sizes to the largest sprite width.Height of each grid cell.
0 auto-sizes to the largest sprite height.Basic
Set to
"basic" for the basic strip packer.[[variants]]
Each[[variants]] block produces an independent set of output files at the specified scale. This enables multi-resolution atlases for different display densities.
Scale factor.
0.5 halves all sprite dimensions; 2.0 doubles them.Appended to output filenames before the extension. For example,
"@2x" produces [email protected].Resampling filter used when scaling sprites.Values:
"smooth"- Lanczos3 resampling; high quality (default)"fast"- Nearest-neighbor; crisp pixel art, no blurring
Example: Multi-resolution output
[email protected]and[email protected](2048×2048)[email protected]and[email protected](1024×1024)[email protected]and[email protected](512×512)
[[sprite_overrides]]
Per-sprite metadata overrides. Each[[sprite_overrides]] block customizes settings for a specific sprite.
Sprite ID: relative path without extension, forward-slash separated.Example: For file
sprites/characters/player.png, the ID is "characters/player".Custom pivot point for this sprite. Format:
{ x = float, y = float } where 0.0 is top/left and 1.0 is bottom/right.Nine-patch border widths in source pixels. Format:
{ top = int, right = int, bottom = int, left = int }.Defines stretchable regions for UI elements like buttons and panels.Example: Sprite overrides
excludes
Array of glob patterns to exclude from packing. Matches against sprite IDs.Example:
Complete example
Here’s a production-ready configuration with all major features:game-atlas.fpsheet
TexturePacker compatibility
The.fpsheet format is FastPack-specific TOML. TexturePacker uses its own .tps XML format. Settings map closely between the two tools but the file formats are not interchangeable.
Migration from TexturePacker
When migrating from TexturePacker:- Run
fastpack initto create a starting.fpsheet - Map your TexturePacker settings:
- Algorithm →
pack_modeand[algorithm] - Size Constraints →
size_constraint - Trim Mode →
trim_mode - Extrude →
extrude
- Algorithm →
- Test the output and iterate on settings
See also
- fastpack init - Generate a project file
- fastpack pack - Use project files with pack command
- fastpack watch - Use project files with watch mode