extend = function extend( to, from ){
        var desc, key;
        for ( key in from ){
            desc = Object.getOwnPropertyDescriptor( from, key );
            if ( desc.get || desc.set ){

                Object.defineProperty( to, key, desc );

            } else if ( Physics.util.isFunction( desc.value ) ){

                to[ key ] = desc.value;
            }
        }
        return to;
    }
related to: factory
Physics.util.decorator( type [, protoDef ] ) -> Function
- type (String): The name of the factory you are creating
- protoDef (Object): The top-level prototype
+ (Function): The factory function

Facilitates creation of decorator factory functions.

See the [[factory]] definition for the factory signatures.
[For full documentation and examples, please visit the wiki](https://github.com/wellcaffeinated/PhysicsJS/wiki/Fundamentals#the-factory-pattern).

Example:

```javascript
var factory = Physics.util.decorator('factory', {
     // prototype methods...
     method: function( args ){
     }
});

// define
factory( 'name', 'parent-name', function( parent ){

     // extend further...
     return {
         // overrides
         init: function( cfg ){
             parent.init.call(this, cfg);
         }
     };
});

// instantiate
var options = { key: 'val' };
var instance = factory( 'name', options );
```