This interface defines methods that any class that is to be used as a material in the engine must implement
public function getBump(width:Number, height:Number):DisplayObject
Retrieves the bump map for this material. If you write custom classes, make sure they return the proper size
0,0 of the returned DisplayObject corresponds to the top-left corner of material
Parameters
| width:Number — Requested width
|
| |
| height:Number — Requested height
|
Returns
| DisplayObject — A DisplayObject (either Bitmap or MovieClip) that will used as BumpMap. If it is a MovieClip, the first frame will we used
|
public function getDiffuse(width:Number, height:Number):DisplayObject
Retrieves the diffuse map for this material. If you write custom classes, make sure they return the proper size.
0,0 of the returned DisplayObject corresponds to the top-left corner of material
Parameters
| width:Number — Requested width
|
| |
| height:Number — Requested width
|
Returns
| DisplayObject — A DisplayObject (either Bitmap or MovieClip) that will be display onscreen
|
public function getHoles(width:Number, height:Number):Array
Retrieves an array of holes (if any) of this material. These holes will be used to render proper lights and calculate collisions
and bullet impatcs
Parameters
| width:Number — Requested width
|
| |
| height:Number — Requested height
|
Returns
| Array — An array of Rectangle objects, one for each hole. Positions and sizes are relative to material origin of coordinates
|