There are a couple ways you could do it.. I have tried a few, and this one works the best.. I found nextTick to be a bit sketchy..
If you rotate an object 360 degrees (2PI radians), Famo.us thinks you are already in the position you are trying to reach.. and does not animate..
Just change the 0.08 to increase or decrease the speed
var Engine = require("famous/core/Engine");
var Surface = require("famous/core/Surface");
var StateModifier = require("famous/modifiers/StateModifier");
var Transform = require("famous/core/Transform");
var Transitionable = require("famous/transitions/Transitionable");
var Timer = require("famous/utilities/Timer");
var mainContext = Engine.createContext();
var rotate_mod1 = new StateModifier({origin:[0.5,0.5]});
var spinner = new Surface({
size: [100,100],
properties:{
backgroundColor: 'red'
}
});
mainContext.add(rotate_mod1).add(spinner);
var total_rotation = 0;
var rotate_spinner = function(){
total_rotation += 0.08;
rotate_mod1.setTransform(Transform.rotateZ(total_rotation));
Timer.setTimeout(rotate_spinner,0);
};
rotate_spinner();