Appearance
MonoGame.Extended
This export writes TexturePacker JSON for the TexturePackerProcessor content pipeline. Each atlas page has its own JSON file and image. An atlas with several pages uses numbered filenames.
Add descriptors and images to your Content project, then load the descriptor asset:
csharp
using MonoGame.Extended.Graphics;
Texture2DAtlas atlas = Content.Load<Texture2DAtlas>("atlas");
Sprite sprite = atlas.CreateSprite("run_side_0000");
sprite.Effect = SpriteEffects.None;
spriteBatch.Begin(samplerState: SamplerState.PointClamp);
spriteBatch.Draw(sprite, new Vector2(400, 300), 0f, Vector2.One * 2f);
spriteBatch.End();The loader reads the frame rectangles and trim offsets. To animate, retrieve the sprite for each frame index as playback advances. Load every numbered JSON file to use all pages.
Use sprite.Effect for mirroring. Color, Alpha, Depth, and IsVisible control how the sprite is drawn.
See Sources and outputs for frame names, trimming, and effect maps.