getBitmapData method
Get the BitmapData of the frame with the given name
.
The name of a frame is the original file name of the image without it's file extension.
Implementation
BitmapData getBitmapData(String name) {
for (var i = 0; i < frames.length; i++) {
final frame = frames[i];
if (frame.name == name) return frame.bitmapData;
}
throw ArgumentError("TextureAtlasFrame not found: '$name'");
}