TextureLoader typedef

TextureLoader = Future<TextureHandle> Function(String path, int width, int height)

Callback for loading textures.

Platform-specific implementations should handle image loading and return a TextureHandle with the appropriate ID and dimensions.

Parameters:

  • path: Path to the image file (relative or absolute depending on loader)
  • width: Expected width in pixels (from tileset metadata)
  • height: Expected height in pixels (from tileset metadata)

Implementation

typedef TextureLoader =
    Future<TextureHandle> Function(String path, int width, int height);