Packageaway3d.loaders.utils
Classpublic dynamic class CentralMaterialLibrary
InheritanceCentralMaterialLibrary Inheritance flash.utils.Dictionary

Store for all materials associated with an externally loaded file.



Public Methods
 MethodDefined By
  
addMaterial(material:Material, mesh:Mesh = null, id:String, url:String):void
[static] Returns a material for the given name reference in the library.
CentralMaterialLibrary
  
clearMaterial(id:String):void
[static] clears a material for the given name reference in the library.
CentralMaterialLibrary
  
[static] Returns a material for the given name reference in the library.
CentralMaterialLibrary
  
[static] Returns a mesh for the given name reference in the library.
CentralMaterialLibrary
  
getURLMaterial(id:String):String
[static] Returns a url for the given name reference in the library.
CentralMaterialLibrary
  
updateMaterial(id:String, mat:Material):void
[static] Replace a material for the given name reference in the library.
CentralMaterialLibrary
Method Detail
addMaterial()method
public static function addMaterial(material:Material, mesh:Mesh = null, id:String, url:String):void

Returns a material for the given name reference in the library.

Parameters

material:Material
 
mesh:Mesh (default = null)
 
id:String
 
url:String

clearMaterial()method 
public static function clearMaterial(id:String):void

clears a material for the given name reference in the library.

Parameters

id:String

getMaterial()method 
public static function getMaterial(id:String):Material

Returns a material for the given name reference in the library.

Parameters

id:String

Returns
Material
getMeshFromMaterialName()method 
public static function getMeshFromMaterialName(id:String):Mesh

Returns a mesh for the given name reference in the library.

Parameters

id:String

Returns
Mesh
getURLMaterial()method 
public static function getURLMaterial(id:String):String

Returns a url for the given name reference in the library.

Parameters

id:String

Returns
String
updateMaterial()method 
public static function updateMaterial(id:String, mat:Material):void

Replace a material for the given name reference in the library.

Parameters

id:String
 
mat:Material