src/Movement.js
/**
 * MovementComponent class held by a game object
 *
 * @constructor
 */
MovementComponent class held by a game object
@constructor
MovementComponent class held by a game object @constructor
function BaseMovementComponent() {
    this.CollisionMode = { 'kNormal' : 1, 'kDiscardOneSided' : 2, 'kDiscardNormal' : 3};
	this.spheres    = [];               
    this.contacts   = [];               
    this.desiredVel = new Vec2(0, 0);   
    this.force      = new Vec2(0, 0);   
    this.velocity   = new Vec2(0, 0);   
    this.position   = new Vec2(0, 0);   
    this.gravity    = -9.82;            
    this.lastPosition = new Vec2(0, 0); 
    this.owner      = null;             
    this.gravityStack  = [];            
    this.collisionMode = this.CollisionMode.kNormal; 
    this.platform = null;               
    this.collisionProvider = null;
    this.localContactPoints = []; 
    this.tempContacts = []; 
    this.shapes = []; 
}
function BaseMovementComponent ( ) { this . CollisionMode = { 'kNormal' : 1 , 'kDiscardOneSided' : 2 , 'kDiscardNormal' : 3 } ; this . spheres = [ ] ; this . contacts = [ ] ; this . desiredVel = new Vec2 ( 0 , 0 ) ; this . force = new Vec2 ( 0 , 0 ) ; this . velocity = new Vec2 ( 0 , 0 ) ; this . position = new Vec2 ( 0 , 0 ) ; this . gravity = - 9.82 ; this . lastPosition = new Vec2 ( 0 , 0 ) ; this . owner = null ; this . gravityStack = [ ] ; this . collisionMode = this . CollisionMode . kNormal ; this . platform = null ; this . collisionProvider = null ; this . localContactPoints = [ ] ; this . tempContacts = [ ] ; this . shapes = [ ] ; }
MovementComponent class held by a game object
 @constructor
MovementComponent class held by a game object @constructor
// "Enumerator" :P // @type [Circle] // @type [CollisionContact] // @type Vec2 // @type Vec2 // @type Vec2 // @type Vec2 // @type number // @type Vec2 // @type {Object} // @type {[number]} // @type CollisionMode // TODO // This is a placeholder for the "collision provider", which is a function // to be loaded during the initialization of the movement component. It is // expected that the function returns an array of ConvexShape objects // @type [CollisionContact] // @type [Collisioncontact] // @type [ConvexShape]