私はオブジェクトのプロパティを受動的にトゥイーンできるようにしたいので、トゥウィーンの間にこのオブジェクトを更新してTweenLiteを実行します。tweenliteのプロパティを受動的にtween
たとえば、次のコードでは、オブジェクト内の座標を0
から15
に15秒間トゥーンします。これが起こっている間に、私はとy
の変数をtarget.position
に更新したいので、TweenLiteはオブジェクトが完了するまで(15秒経過するまで)オブジェクトを「馬鹿にする」ように見えます。
// target.position starts at { x:0, y: 0 }
TweenLite.to(target.position, 15, {
x: 15,
y: 15,
ease: Power4.easeOut
})
// for examples sake i'd like to do the following, yet it does not have an effect
setTimeout(function(){ target.position.x += 10 }, 1000)
setTimeout(function(){ target.position.y += 15 }, 2500)
setTimeout(function(){ target.position.x -= 17 }, 7500)
を-0 /)**)。現在実行中のトゥイーンを変更*する際に役立つかもしれません。 –
興味深いアプローチありがとう。 – bitten