index.js
function (pos) {
      if (!pos) {
        throw new Error('Body position is required');
      }
      var body = createBody(pos);
      bodies.push(body);

      return body;
    }
function (pos) {
      if (!pos) {
        throw new Error('Body position is required');
      }
      var body = createBody(pos);
      bodies.push(body);

      return body;
    }
function ( pos ) { if ( ! pos ) { throw new Error ( 'Body position is required' ) ; } var body = createBody ( pos ) ; bodies . push ( body ) ; return body ; }
Adds body to the system at given position

@param {Object} pos position of a body

@returns {ngraph.physics.primitives.Body} added body
Adds body to the system at given position