File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ var Box = require('../shapes/Box');
3030 * @param {number } [options.collisionFilterGroup=1]
3131 * @param {number } [options.collisionFilterMask=1]
3232 * @param {boolean } [options.fixedRotation=false]
33+ * @param {Vec3 } [options.linearFactor]
34+ * @param {Vec3 } [options.angularFactor]
3335 * @param {Body } [options.shape]
3436 * @example
3537 * var body = new Body({
@@ -329,11 +331,17 @@ function Body(options){
329331 * @property {Vec3 } linearFactor
330332 */
331333 this . linearFactor = new Vec3 ( 1 , 1 , 1 ) ;
334+ if ( options . linearFactor ) {
335+ this . linearFactor . copy ( options . linearFactor ) ;
336+ }
332337
333338 /**
334339 * @property {Vec3 } angularFactor
335340 */
336341 this . angularFactor = new Vec3 ( 1 , 1 , 1 ) ;
342+ if ( options . angularFactor ) {
343+ this . angularFactor . copy ( options . angularFactor ) ;
344+ }
337345
338346 /**
339347 * @property aabb
You can’t perform that action at this time.
0 commit comments