tweenjs/es6-tween

Tween instantiation syntax?

mikebolt opened this issue · 2 comments

We should decide on a syntax for tween instantiation. We could use a syntax similar to the current version of tween.js, where options are added to tweens using chainable methods:

var myTween = new Tween.tween(object).to({a: 1, b: 2}).easing(TWEEN.Easing.Quadratic.In);

The other option is to use an options object:

var myTween = new Tween.tween(object, {'to': {a: 1, b: 2}, 'easing': TWEEN.Easing.Quadratic.In});

The above two options could both be available at the same time.

Please let me know what you think!

Looks interesting. I try
EDIT: @mikebolt, this feature already available with to({x:'foo'}, {easing:...,delay:300,duration:2000}). See, let me know if something wrong

@mikebolt i answered to your question?