demos/Collage/fabric.js
function() {
      return this.getObjects().reduce(function(total, object) {
        total += (typeof object.complexity == 'function') ? object.complexity() : 0;
        return total;
      }, 0);
    }
function() {
      return this.getObjects().reduce(function(total, object) {
        total += (typeof object.complexity == 'function') ? object.complexity() : 0;
        return total;
      }, 0);
    }
function ( ) { return this . getObjects ( ) . reduce ( function ( total , object ) { total += ( typeof object . complexity == 'function' ) ? object . complexity ( ) : 0 ; return total ; } , 0 ) ; }
Returns complexity of an instance
@method complexity
@return {Number} complexity
Returns complexity of an instance