Package | com.mousman.as3.agal.parser.objs |
Class | public class MTextureManager |
Inheritance | MTextureManager ![]() |
Implements | IDestroyable |
Property | Defined By | ||
---|---|---|---|
textures : Vector.<MTexture> [read-only]
return all the Textures contained in the MTextureManager instance
| MTextureManager |
Method | Defined By | ||
---|---|---|---|
MTextureManager(context:Context3D)
Constructor. | MTextureManager | ||
addTexture(id:String, textureClass:Class, withMip:Boolean = false):void
add a texture to a MTextureManager instance
| MTextureManager | ||
addTextureFromATF(id:String, textureATF:ByteArray, width:int, height:int):void
add a texture to a MTextureManager instance
| MTextureManager | ||
addTextureFromBitmap(id:String, textureBitmap:Bitmap, withMip:Boolean = false):void
add a texture to a MTextureManager instance
| MTextureManager | ||
destroy():void | MTextureManager | ||
getTextureById(id:String):Texture
return a Texture
| MTextureManager |
textures | property |
textures:Vector.<MTexture>
[read-only] return all the Textures contained in the MTextureManager instance
public function get textures():Vector.<MTexture>
MTextureManager | () | Constructor |
public function MTextureManager(context:Context3D)
Constructor. Creates a new MTextureManager instance.
Parameterscontext:Context3D — : Context3D.Used to create a Texture |
addTexture | () | method |
public function addTexture(id:String, textureClass:Class, withMip:Boolean = false):void
add a texture to a MTextureManager instance
Parameters
id:String — : String.Id associated to the texture to add | |
textureClass:Class — : Class.Class of the texture (the texture class is embed earlier, IE :Embed(source = "../lib/imgs/texture1.jpg")] | |
withMip:Boolean (default = false ) — : Booleanindicates if mipmapping has to be done. |
addTextureFromATF | () | method |
public function addTextureFromATF(id:String, textureATF:ByteArray, width:int, height:int):void
add a texture to a MTextureManager instance
Parameters
id:String — : String.Id associated to the texture to add | |
textureATF:ByteArray — : Class.BtyeArray of the ATF texture | |
width:int — : intwidth of the texture | |
height:int — : intheight of the texture |
addTextureFromBitmap | () | method |
public function addTextureFromBitmap(id:String, textureBitmap:Bitmap, withMip:Boolean = false):void
add a texture to a MTextureManager instance
Parameters
id:String — : String.Id associated to the texture to add | |
textureBitmap:Bitmap — : Class.Bitmap of the texture | |
withMip:Boolean (default = false ) — : Booleanindicates if mipmapping has to be done. |
destroy | () | method |
public function destroy():void
getTextureById | () | method |
public function getTextureById(id:String):Texture
return a Texture
Parameters
id:String — StringId of the Texture. |
Texture — the Texture associated to the id
|