The generator function allows for the ultimate level of flexibility in SeuratJS and provides the ability to create jaw-dropping animations. Using the generator you can alter everything from the sample coordinates (x,y) to the color. As a result you are responsible for generating a Raphaël element (use ppr which is your current Raphaël canvas) and returning it. You can see more great examples of using generators at SeuratJS Website.
paper.seurat({ imageSource: 'imgs/eiffle-tower.png', generator: function(ppr,x,y,color,step,attributes){ return ppr.circle(Math.random()*x, Math.random()*y, Math.random()*7) .attr({fill: color}).attr(attributes); }, animator: function(elm, x,y,step){ elm.animate( Raphael.animation({r: 10, cx: x+step/2,cy: y+step/2}, 2e3));} });
Note paper is a Raphaël canvas object as defined here.
Chrome Users Because SeuratJS uses the HTML5 canvas element if you are attempting to debug from file:// as opposed to a local webserver you will need to run Chrome using the --allow-file-access-from-files flag. More info here.