Packagecom.mousman.as3.agal.parser.objs
Classpublic class MTextureManager
InheritanceMTextureManager Inheritance Object
Implements IDestroyable

used to generate and store texutres



Public Properties
 PropertyDefined By
  textures : Vector.<MTexture>
[read-only] return all the Textures contained in the MTextureManager instance
MTextureManager
Public Methods
 MethodDefined 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
Property Detail
texturesproperty
textures:Vector.<MTexture>  [read-only]

return all the Textures contained in the MTextureManager instance


Implementation
    public function get textures():Vector.<MTexture>
Constructor Detail
MTextureManager()Constructor
public function MTextureManager(context:Context3D)

Constructor. Creates a new MTextureManager instance.

Parameters
context:Context3D — : Context3D.

Used to create a Texture

Method Detail
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) — : Boolean

indicates 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 — : int

width of the texture

 
height:int — : int

height 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) — : Boolean

indicates 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 — String

Id of the Texture.

Returns
Texture — the Texture associated to the id