(function(){

    var defaults = {

        // drag applied during integration
        // 0 means vacuum
        // 0.9 means molasses
        drag: 0
    };

    /** related to: Physics.util.decorator
     * Physics.integrator( name[, options] ) -> Integrator
     * - name (String): The name of the integrator to create
     * - options (Object): The configuration for that integrator ( depends on integrator ).
       Available options and defaults:
       
       ```javascript
        {
            // drag applied during integration
            // 0 means vacuum
            // 0.9 means molasses
            drag: 0
        }
       ```
     *
     * Factory function for creating Integrators.
     *
     * Visit [the PhysicsJS wiki on Integrators](https://github.com/wellcaffeinated/PhysicsJS/wiki/Integrators)
     * for usage documentation.
     **/
    Physics.integrator = Decorator('integrator', {

        /** belongs to: Physics.integrator
         * class Integrator
         *
         * The base class for integrators created by [[Physics.integrator]] factory function.
         **/

        /** internal
         * Integrator#init( options )
         * - options (Object): The configuration options passed by the factory
         * 
         * Initialization. Internal use.
         **/
        init: function( options ){
            
            /** related to: Physics.util.options
             * Integrator#options( options ) -> Object
             * - options (Object): The options to set as an object
             * + (Object): The options
             * 
             * Set options on this instance. 
             * 
             * Access options directly from the options object.
             * 
             * Example:
             *
             * ```javascript
             * this.options.someOption;
             * ```
             * 
             **/
            this.options = Physics.util.options( defaults );
        },

        /**
         * Integrator#setWorld( world ) -> this
         * - world (Object): The world (or null)
         *
         * Set which world to apply to.
         *
         * Usually this is called internally. Shouldn't be a need to call this yourself usually.
         **/
        setWorld: function( world ){

            if ( this.disconnect && this._world ){
                this.disconnect( this._world );
            }

            this._world = world;

            if ( this.connect && world ){
                this.connect( world );
            }

            return this;
        },

        /**
         * Integrator#integrate( bodies, dt ) -> this
         * - bodies (Array): List of bodies to integrate
         * - dt (Number): Timestep size
         * 
         * Integrate bodies by timestep.
         *
         * Will emit `integrate:velocities` and `integrate:positions`
         * events on the world.
         **/
        integrate: function( bodies, dt ){

            var world = this._world;

            this.integrateVelocities( bodies, dt );
            
            if ( world ){
                world.emit('integrate:velocities', {
                    bodies: bodies,
                    dt: dt
                });
            }

            this.integratePositions( bodies, dt );
            
            if ( world ){
                world.emit('integrate:positions', {
                    bodies: bodies,
                    dt: dt
                });
            }

            return this;
        },

        /**
         * Integrator#connect( world )
         * - world (Physics.world): The world to connect to
         * 
         * Connect to a world.
         *
         * Extend this when creating integrators if you need to specify pubsub management.
         * Automatically called when added to world by the [[Integrator#setWorld]] method.
         **/
        connect: null,

        /**
         * Integrator#disconnect( world )
         * - world (Physics.world): The world to disconnect from
         * 
         * Disconnect from a world.
         *
         * Extend this when creating integrators if you need to specify pubsub management.
         * Automatically called when added to world by the [[Integrator#setWorld]] method.
         **/
        disconnect: null,

        /**
         * Integrator#integrateVelocities( bodies, dt )
         * - bodies (Array): List of bodies to integrate
         * - dt (Number): Timestep size
         * 
         * Just integrate the velocities.
         *
         * Should be overridden when creating integrators.
         **/
        integrateVelocities: function( bodies, dt ){

            throw 'The integrator.integrateVelocities() method must be overriden';
        },

        /**
         * Integrator#integratePositions( bodies, dt )
         * - bodies (Array): List of bodies to integrate
         * - dt (Number): Timestep size
         * 
         * Just integrate the positions.
         *
         * Called after [[Integrator#integrateVelocities]].
         * 
         * Should be overridden when creating integrators.
         **/
        integratePositions: function( bodies, dt ){

            throw 'The integrator.integratePositions() method must be overriden';
        }
    });

}());
@@ -446,24 +446,17 @@
 faults:%0A
-       
 %0A
+
        %60
@@ -1229,33 +1229,32 @@
 ctory%0A         *
- 
 %0A         * Init
@@ -1327,29 +1327,17 @@
 ions )%7B%0A
-            
 %0A
+
         
@@ -1544,33 +1544,32 @@
 s%0A             *
- 
 %0A             * 
@@ -1597,17 +1597,16 @@
 nstance.
- 
 %0A       
@@ -1604,33 +1604,32 @@
 .%0A             *
- 
 %0A             * 
@@ -1683,33 +1683,32 @@
 .%0A             *
- 
 %0A             * 
@@ -1825,33 +1825,32 @@
 %60%0A             *
- 
 %0A             **
@@ -1908,24 +1908,61 @@
 defaults );%0A
+            this.options( options );%0A
         %7D,%0A%0A
@@ -2726,33 +2726,32 @@
  size%0A         *
- 
 %0A         * Inte
@@ -3032,37 +3032,25 @@
 dies, dt );%0A
-            
 %0A
+
             
@@ -3269,21 +3269,9 @@
  );%0A
-            
 %0A
+
     
@@ -3592,33 +3592,32 @@
 ct to%0A         *
- 
 %0A         * Conn
@@ -3983,33 +3983,32 @@
  from%0A         *
- 
 %0A         * Disc
@@ -4428,33 +4428,32 @@
  size%0A         *
- 
 %0A         * Just
@@ -4877,33 +4877,32 @@
  size%0A         *
- 
 %0A         * Just
@@ -5008,17 +5008,16 @@
        *
- 
 %0A       
@@ -5239,9 +5239,10 @@
 );%0A%0A
-
 %7D());
+%0A

fix for issue #94