dist/client/lance-gg.js
/**
    * Creates an instance of the Simple Physics Engine.
    * @param {Object} options - physics options
    * @param {Object} options.collisions - collision options
    * @param {String} options.collisions.type - can be set to "HSHG" or "bruteForce".  Default is Brute-Force collision detection.
    * @param {Number} options.collisions.collisionDistance - for brute force, this can be set for a simple distance-based (radius) collision detection.
    * @param {Boolean} options.collisions.autoResolve - for brute force collision, colliding objects should be moved apart
    * @param {TwoVector} options.gravity - TwoVector instance which describes gravity, which will be added to the velocity of all objects at every step.  For example TwoVector(0, -0.01)
    */
Creates an instance of the Simple Physics Engine.
@param {Object} options - physics options
@param {Object} options.collisions - collision options
@param {String} options.collisions.type - can be set to "HSHG" or "bruteForce".  Default is Brute-Force collision detection.
@param {Number} options.collisions.collisionDistance - for brute force, this can be set for a simple distance-based (radius) collision detection.
@param {Boolean} options.collisions.autoResolve - for brute force collision, colliding objects should be moved apart
@param {TwoVector} options.gravity - TwoVector instance which describes gravity, which will be added to the velocity of all objects at every step.
Creates an instance of the Simple Physics Engine . @param { Object } options - physics options @param { Object } options . collisions - collision options @param { String } options . collisions . type - can be set to " HSHG " or " bruteForce " . Default is Brute - Force collision detection . @param { Number } options . collisions . collisionDistance - for brute force this can be set for a simple distance - based ( radius ) collision detection . @param { Boolean } options . collisions . autoResolve - for brute force collision colliding objects should be moved apart @param { TwoVector } options . gravity - TwoVector instance which describes gravity which will be added to the velocity of all objects at every step .
function SimplePhysicsEngine(options) {
      var _this;
      _classCallCheck(this, SimplePhysicsEngine);
      _this = _possibleConstructorReturn(this, _getPrototypeOf(SimplePhysicsEngine).call(this, options)); 
      if (options.collisions && options.collisions.type === 'HSHG') {
        _this.collisionDetection = new HSHGCollisionDetection(options.collisions);
      } else {
        _this.collisionDetection = new BruteForceCollisionDetection(options.collisions);
      }
      _this.gravity = new TwoVector(0, 0);
      if (options.gravity) _this.gravity.copy(options.gravity);
      var collisionOptions = Object.assign({
        gameEngine: _this.gameEngine
      }, options.collisionOptions);
      _this.collisionDetection.init(collisionOptions);
      return _this;
    } 
function SimplePhysicsEngine ( options ) { var _this ; _classCallCheck ( this , SimplePhysicsEngine ) ; _this = _possibleConstructorReturn ( this , _getPrototypeOf ( SimplePhysicsEngine ) . call ( this , options ) ) ; if ( options . collisions && options . collisions . type === 'HSHG' ) { _this . collisionDetection = new HSHGCollisionDetection ( options . collisions ) ; } else { _this . collisionDetection = new BruteForceCollisionDetection ( options . collisions ) ; } _this . gravity = new TwoVector ( 0 , 0 ) ; if ( options . gravity ) _this . gravity . copy ( options . gravity ) ; var collisionOptions = Object . assign ( { gameEngine : _this . gameEngine } , options . collisionOptions ) ; _this . collisionDetection . init ( collisionOptions ) ; return _this ; }
Creates an instance of the Simple Physics Engine.
Creates an instance of the Simple Physics Engine .
// todo does this mean both modules always get loaded? /**
       * The actor's name.
       * @memberof SimplePhysicsEngine
       * @member {TwoVector} gravity affecting all objects
       */ // a single object advances, based on: