0

Are these functionalities built into the service somewhere? Here's sample context:

HTML

<fa-modifier fa-opacity="opacityMod(testTimeline.get())">...

JS

$scope.testTimeline = new Transitionable(0);
$scope.opacityMod = $testTimeline([
    [0, 0, Easing.inOutExpo],
    [1, 1]
]);
$scope.testTimeline.set(1, {
    duration: 500,
    curver: 'easeInOut'
});

Couldn't find these in the docs or from reading src. The only ideas I had were:

  • loops - setInterval or re-run animation on callback
  • callback - setTimeout at same time testTimeline.set is called for the same duration within the same scope
4

1 回答 1

0

最后只是对可转换的“设置”进行回调,然后重新运行该函数。这是一个示例:

function runLoop(){
    $scope.testTimeline.set(1, {duration:...,curve:...}, function() {
        $scope.testTimeline.set(0, {duration:....,curve....}, runLoop);
    });
}
runLoop();

请注意,这将再次运行循环但向后运行。(我想要这种影响)。仍对其他解决方案持开放态度

于 2014-09-19T21:25:59.607 回答