CreateJS / TweenJS

A simple but powerful tweening / animation library for Javascript. Part of the CreateJS suite of libraries.
http://createjs.com/
MIT License
3.56k stars 966 forks source link

'set' is unused in queue #82

Closed RockyF closed 8 years ago

RockyF commented 8 years ago
target.x = 0;
createjs.Tween.get(target)
    .set({x: 100}, highlight)
    .to({x: 300}, 1500);

you should saw target move from 0 nor 100 (set({x: 100}))

lannymcnie commented 8 years ago

The set method won't work like that. Tweens will use their initial and to() values -- so if you are already using the to() method to change the x property, it will ignore the values set on it.

Change the set call to a to call with 0 duration.

createjs.Tween.get(target)
    .to({x: 100})
    .to({x: 300}, 1500);
RockyF commented 8 years ago

ok, it is!