AS3ATF is a library to read, write and inspect Adobe’s Texture Format (ATF) files. It has methods to load an ATF file from a ByteArray
or to serialize an already loaded file using a custom serializer. The ByteArray
serializer is already implemented, so it’s possible to export the ATF file content as a set of raw bytes.
The library also has some helper classes, such as ATFContainer used to encapsulate the ATF data. It provides a set of properties and methods to inspect the file, e.g. minimum player version, is cubic, texture count, etc.
Sample
var data :ByteArray; // TODO: load ATF file to "data" var container :ATFContainer = ATFContainer.readFromByteArray(data); String s = ""; s+= "length : "+container.length+"\n"; s+= "format : "+ATFFormat.nameFor(container.format)+"\n"; s+= "can be loaded using loader : "+ATFFormat.canBeLoadedUsingLoader(container.format)+"\n"; s+= "minimum player version : "+ATFFormat.minimumPlayerVersionFor(container.format)+"\n"; s+= "isCube : "+container.isCube+"\n"; s+= "width,height : "+container.width+","+container.height+"\n"; s+= "textureCount : "+container.textureCount+"\n"; s+= "\n"; s+= "Textures:"; if(container.textures) { s+=container.textures.toString(); }
RT @as3gamegears: New: AS3ATF (lib to read, write and inspect Adobe’s Texture Format – ATF files) http://t.co/Uk0AUCqJ5m #as3 #flash #gamed…