code: function(options) {
              options = paper.Base.set({
                  fps: 30,
                  prefix: 'frame-',
                  amount: 1,
              }, options);
              if (!options.directory)
                  throw new Error('Missing options.directory');
              var view = this,
                  count = 0,
                  frameDuration = 1 / options.fps,
                  startTime = Date.now(),
                  lastTime = startTime,
                  padding = options.padding || ((options.amount - 1) + '').length,
                  paddedStr = Array(padding + 1).join('0');
  
              // Start exporting frames by exporting the first frame:
              exportFrame(options);
  
              function exportFrame() {
                  // Convert to a Base object, for #toString()
                  view.emit('frame', new paper.Base({
                      delta: frameDuration,
                      time: frameDuration * count,
                      count: count
                  }));
                  var file = path.join(options.directory, options.prefix +
                          (paddedStr + count).slice(-padding) + '.png');
                  var out = view.exportImage(file, function() {
                      // Once the file has been closed, export the next fame:
                      var then = Date.now();
                      if (options.onProgress) {
                          options.onProgress({
                              count: count,
                              amount: options.amount,
                              percentage: Math.round((count + 1) / options.amount
                                      * 10000) / 100,
                              time: then - startTime,
                              delta: then - lastTime
                          });
                      }
                      lastTime = then;
                      if (++count < options.amount) {
                          exportFrame();
                      } else {
                          // Call onComplete handler when finished:
                          if (options.onComplete) {
                              options.onComplete();
                          }
                      }
                  });
              }
          }
docs: DOCS: CanvasView#exportFrames(options);