Files
flame/packages/flame_texturepacker/lib/flame_texturepacker.dart
Matthias Nehlsen 892052b99a feat(flame_texturepacker): Expose TexturePackerAtlas (#3047)
Closes #3046

---------

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
2024-02-20 09:35:06 +01:00

18 lines
602 B
Dart

library flame_texturepacker;
import 'package:flame/game.dart';
import 'package:flame_texturepacker/src/texture_packer_atlas.dart';
export 'package:flame_texturepacker/src/texture_packer_atlas.dart';
export 'package:flame_texturepacker/src/texture_packer_sprite.dart';
extension TexturepackerLoader on Game {
/// Loads the specified pack file.
/// Uses the parent directory of the pack file to find the page images.
Future<TexturePackerAtlas> fromAtlas(
String assetsPath, {
bool fromStorage = false,
}) async =>
TexturePackerAtlas.load(assetsPath, fromStorage: fromStorage);
}