Skip to content

Commit

Permalink
setting linear & angularFactor via Body constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
schteppe committed May 12, 2015
1 parent 1cfbb44 commit 6fe68c8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/objects/Body.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ var Box = require('../shapes/Box');
* @param {number} [options.collisionFilterGroup=1]
* @param {number} [options.collisionFilterMask=1]
* @param {boolean} [options.fixedRotation=false]
* @param {Vec3} [options.linearFactor]
* @param {Vec3} [options.angularFactor]
* @param {Body} [options.shape]
* @example
* var body = new Body({
Expand Down Expand Up @@ -329,11 +331,17 @@ function Body(options){
* @property {Vec3} linearFactor
*/
this.linearFactor = new Vec3(1,1,1);
if(options.linearFactor){
this.linearFactor.copy(options.linearFactor);
}

/**
* @property {Vec3} angularFactor
*/
this.angularFactor = new Vec3(1,1,1);
if(options.angularFactor){
this.angularFactor.copy(options.angularFactor);
}

/**
* @property aabb
Expand Down

0 comments on commit 6fe68c8

Please sign in to comment.