1

フェードインするアニメーションがあり、<div id="robert">stuff</div>以下に指定されたパスをたどります。ベジェ曲線のアニメーション部分を遅くする方法があるかどうか知りたいですか? イージングのために「スイング」に設定しましたが、遅くするための回避策はありますか?

var pathRobert = {
    start: {
        x: 408,
        y: 303,
        angle: 72.594,
        length: 1.390
    },
    end: {
        x: 510,
        y:375,
        angle: 233.366,
        length: 1.138
    }
};

$(window).scroll(function(){
    //first animation for ipad with hands

    if ((withinViewport((testimonials)) == true) && (peopleBlock !=0)){
        peopleBlock = 0;

        $("#robert").fadeTo('fast',1).animate({
            path : new $.path.bezier(pathRobert)
        },"swing");  
    }
});

ありがとう、

アレックス

4

2 に答える 2

1

イージングだけでなくデュレーションも指定できるはずです。

.animate( properties [, duration ] [, easing ] [, complete ] )

何かのようなもの:

$("#robert").fadeTo('fast',1).animate({
    path : new $.path.bezier(pathRobert)
},5000,"swing");

http://jsfiddle.net/kLRN2/

于 2013-06-07T21:46:04.323 に答える