File tree 1 file changed +6
-10
lines changed
1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -315,7 +315,7 @@ cc.EaseExponentialOut = cc.ActionEase.extend(/** @lends cc.EaseExponentialOut# *
315
315
* @param {Number } time1
316
316
*/
317
317
update :function ( time1 ) {
318
- this . _other . update ( time1 == 1 ? 1 : ( - ( Math . pow ( 2 , - 10 * time1 ) ) + 1 ) ) ;
318
+ this . _other . update ( time1 == 1 ? 1 : ( - ( Math . pow ( 2 , - 10 * time1 ) ) + 1 ) ) ;
319
319
} ,
320
320
321
321
/**
@@ -674,32 +674,28 @@ cc.EaseElasticInOut = cc.EaseElastic.extend(/** @lends cc.EaseElasticInOut# */{
674
674
*/
675
675
update :function ( time1 ) {
676
676
var newT = 0 ;
677
- if ( time1 == 0 || time1 == 1 ) {
677
+ if ( time1 === 0 || time1 = == 1 ) {
678
678
newT = time1 ;
679
679
} else {
680
680
time1 = time1 * 2 ;
681
- if ( ! this . _period ) {
681
+ if ( ! this . _period )
682
682
this . _period = 0.3 * 1.5 ;
683
- }
684
683
685
684
var s = this . _period / 4 ;
686
-
687
685
time1 = time1 - 1 ;
688
- if ( time1 < 0 ) {
686
+ if ( time1 < 0 )
689
687
newT = - 0.5 * Math . pow ( 2 , 10 * time1 ) * Math . sin ( ( time1 - s ) * Math . PI * 2 / this . _period ) ;
690
- } else {
688
+ else
691
689
newT = Math . pow ( 2 , - 10 * time1 ) * Math . sin ( ( time1 - s ) * Math . PI * 2 / this . _period ) * 0.5 + 1 ;
692
- }
693
690
}
694
-
695
691
this . _other . update ( newT ) ;
696
692
} ,
697
693
698
694
/**
699
695
* @return {cc.ActionInterval }
700
696
*/
701
697
reverse :function ( ) {
702
- return cc . EaseInOut . create ( this . _other . reverse ( ) , this . _period ) ;
698
+ return cc . EaseElasticInOut . create ( this . _other . reverse ( ) , this . _period ) ;
703
699
}
704
700
} ) ;
705
701
You can’t perform that action at this time.
0 commit comments