Animation is treated as a range of numbers that go from 0 to 1 (float values)
You could do smth like this:
//This is the original compute function, which is called from fxMorph
whenever it needs to. For instance, in a 3seconds animation, at 50fps
(the default) this would be called 60 times (3000/50) and the delta
parameter holds a value that ranges from 0 to 1.
Fx.Morph.implement(
{
compute: function(from, to, delta){
//delta is a value ranging from 0 to 1.
var now = {};
for (var p in from) {
//p will have values in ['left', 'top', 'color',
etc.....]
now[p] = this.parent(from[p], to[p], delta)
};
return now;
}
});
Maybe you could stick your code here, map the 0-1 value to the
rotation value of your example (if the value of your example ranges
0-360, you have to map 0-1 to 0-360)
Since this would interfere with ALL Fx.Morph Instances, I would advise
to place if/then and check wether you want to use the value or not....
But again, without a better example from yours... I cant imagine the
real use/scenario for this.
Hope this helps!!!
Iván