OLD | NEW |
(Empty) | |
| 1 var translateSteps = { |
| 2 keyframes: [ |
| 3 {transform: 'translateX(100px)'}, |
| 4 {transform: 'translateX(500px)'} |
| 5 ], |
| 6 easing: 'steps(9)', |
| 7 vertical: true, |
| 8 color: 'maroon', |
| 9 stamps: [ |
| 10 {at: 0}, |
| 11 {at: 0.25}, |
| 12 {at: 0.5}, |
| 13 {at: 0.75}, |
| 14 {at: 1.1}, |
| 15 ] |
| 16 }; |
| 17 |
| 18 var translateStepsPerKeyframe = { |
| 19 keyframes: [ |
| 20 {transform: 'translateX(100px)', easing: 'steps(18)'}, |
| 21 {transform: 'translateX(400px)', easing: 'steps(9)'}, |
| 22 {transform: 'translateX(500px)'} |
| 23 ], |
| 24 vertical: true, |
| 25 color: 'navy', |
| 26 stamps: [ |
| 27 {at: 0}, |
| 28 {at: 0.25}, |
| 29 {at: 0.35}, |
| 30 {at: 0.5}, |
| 31 {at: 0.65}, |
| 32 {at: 0.75}, |
| 33 {at: 1.1}, |
| 34 ] |
| 35 }; |
| 36 |
| 37 var translateStepsWithCubicBezier = { |
| 38 keyframes: [ |
| 39 {transform: 'translateX(100px)', easing: 'steps(9)'}, |
| 40 {transform: 'translateX(500px)'} |
| 41 ], |
| 42 easing: 'cubic-bezier(.5, -1, .5, 2)', |
| 43 vertical: true, |
| 44 color: 'black', |
| 45 stamps: [ |
| 46 {at: 0}, |
| 47 {at: 0.4}, |
| 48 {at: 0.45}, |
| 49 {at: 0.5}, |
| 50 {at: 0.6}, |
| 51 {at: 1.41}, |
| 52 ] |
| 53 }; |
| 54 |
| 55 var translateCubicBezierWithSteps = { |
| 56 keyframes: [ |
| 57 {transform: 'translateX(100px)', easing: 'cubic-bezier(.5, -1, .5, 2)'}, |
| 58 {transform: 'translateX(500px)'} |
| 59 ], |
| 60 easing: 'steps(9)', |
| 61 vertical: true, |
| 62 color: 'peru', |
| 63 stamps: [ |
| 64 {at: 0}, |
| 65 {at: 0.25}, |
| 66 {at: 0.35}, |
| 67 {at: 0.5}, |
| 68 {at: 0.65}, |
| 69 {at: 0.75}, |
| 70 {at: 1.39}, |
| 71 ] |
| 72 }; |
| 73 |
| 74 var timingFunctionTests = [translateSteps, translateStepsPerKeyframe, |
| 75 translateStepsWithCubicBezier, translateCubicBezierWi
thSteps]; |
| 76 |
OLD | NEW |