I would like to animate properties of an object with different effects but in a single Tween (performance issue), is it possible?
Let's say I have an object {x:0,y:0} and I want to animate it to {x:100,y:100}. I started with:
createjs.Tween.get(myObject)
.to({x: 100, y:100}, 1000, function (v) {
return v;
});
This animates all properties linearly, I would like to do something like this:
createjs.Tween.get(myObject)
.to({x: 100, y:100}, 1000, function (v) {
if( animatingX ) return v;
else return v*v;
});
My current solution is to animate each property with a different tween:
createjs.Tween.get(myObject)
.to({x: 100}, 1000, function (v) {
return v;
});
createjs.Tween.get(myObject)
.to({y:100}, 1000, function (v) {
return v*v;
});
but having hundreds of objects my CPU load is excessive.
Any idea?