| Package | com.fileitup.fisixengine.materials |
| Class | public class Material |
See also
| Property | Defined by | ||
|---|---|---|---|
| bounce : Number [read-only]Coefficient of reinstitution.
| Material | ||
| color : int [read-only]Color to be used when rendering an object with this material.
| Material | ||
| friction : Number [read-only]Coefficient of friction.
| Material | ||
| traction : Number [read-only]The traction of wheels to the object.
| Material | ||
| Method | Defined by | ||
|---|---|---|---|
|
Material(n:String, f:Number, b:Number, t:Number = 1, c:int = -1)
| Material | ||
| bounce | property |
bounce:Number [read-only]Coefficient of reinstitution. A number between 0 - 1. 0 represents a clay or rock-like material, and 1 a very bouncy, rubber-like once.
Implementation public function get bounce():Number
| color | property |
color:int [read-only]Color to be used when rendering an object with this material.
Implementation public function get color():int
| friction | property |
friction:Number [read-only]Coefficient of friction. A number between 0 - 1. 0 represents an icy surface, and 1 a surface with full friction.
Implementation public function get friction():Number
| traction | property |
traction:Number [read-only]The traction of wheels to the object. 0 represents no traction and 1 full traction.
Implementation public function get traction():Number
| Material | () | constructor |
public function Material(n:String, f:Number, b:Number, t:Number = 1, c:int = -1)Parameters
n:String — The name of the material (ie. Wood, ice, metal, etc...).
|
|
f:Number — Coefficient of friction.
|
|
b:Number — The bounciness of the material.
|
|
t:Number (default = 1) — The material's traction (affects wheels only).
|
|
c:int (default = -1) — The color to be used when rendering the objects with this material using render(). Leave at default to use default object colors.
|