process() {
    if (this._files.length && this.active < this._spriter._limit) {
      ++this.active;
      const file = this._files.shift();
      let shape;
      let spriter;

      // Instantiate the shape
      try {
        shape = new Shape(file, this._spriter);
        spriter = this._spriter;

        // In case of errors: Skip the file
      } catch (error) {
        this._spriter.error('Skipping "%s" (%s)', file.path.substr(file.base.length + path.sep.length), error.message);
        this.emit(--this.active ? 'remove' : 'empty');
        return;
      }

      // Subsequently run through all optimization and compilation tasks
      async.waterfall([
        // Transform the shape
        _cb => {
          spriter._transformShape(shape, _cb);
        },

        // Complement the shape
        _cb => {
          shape.complement(_cb);
        }
      ], this.remove.bind(this));
    }
  }
Try to process an item in the queue