12 Each section below has two boxes, the top runs on the main thread, the bottom
15 This test is successful if the boxes are mostly in sync and all finish at the
20 Steps for easing timing function is set to
9.
22 <div id=
"test1a">MT
</div>
23 <div id=
"test1b">CT
</div>
26 Per-keyframe steps easing function (
18 and
9 steps).
28 <div id=
"test2a">MT
</div>
29 <div id=
"test2b">CT
</div>
31 Cubic-bezier easing function combined with a step keyframe.
33 <div id=
"test3a">MT
</div>
34 <div id=
"test3b">CT
</div>
36 Steps easing function combined with a cubic-bezier keyframe.
38 <div id=
"test4a">MT
</div>
39 <div id=
"test4b">CT
</div>
42 var transformKeyframes
= [
43 {transform
: 'translateX(0px)'},
44 {transform
: 'translateX(500px)'}
50 var player1a
= test1a
.animate(leftKeyframes
, {
55 var player1b
= test1b
.animate(transformKeyframes
, {
61 var transformKeyframesEasing
= [
62 {transform
: 'translateX(0px)', easing
: 'steps(18)'},
63 {transform
: 'translateX(250px)', easing
: 'steps(9)'},
64 {transform
: 'translateX(500px)'}
66 var leftKeyframesEasing
= [
67 {left
: '0', easing
: 'steps(18)'},
68 {left
: '250px', easing
: 'steps(9)'},
71 var player2a
= test2a
.animate(leftKeyframesEasing
, {
75 var player2b
= test2b
.animate(transformKeyframesEasing
, {
80 var transformKeyframesWithStepsKeyframe
= [
81 {transform
: 'translateX(0px)', easing
: 'steps(9)'},
82 {transform
: 'translateX(500px)'}
84 var leftKeyframesWithStepsKeyframe
= [
85 {left
: '0', easing
: 'steps(9)'},
88 var player3a
= test3a
.animate(leftKeyframesWithStepsKeyframe
, {
91 easing
: 'cubic-bezier(.5, -1, .5, 2)'
93 var player3b
= test3b
.animate(transformKeyframesWithStepsKeyframe
, {
96 easing
: 'cubic-bezier(.5, -1, .5, 2)'
99 var transformKeyframesWithCubicKeyframe
= [
100 {transform
: 'translateX(0px)', easing
: 'cubic-bezier(.5, -1, .5, 2)'},
101 {transform
: 'translateX(500px)'}
103 var leftKeyframesWithCubicKeyframe
= [
104 {left
: '0', easing
: 'cubic-bezier(.5, -1, .5, 2)'},
107 var player4a
= test4a
.animate(leftKeyframesWithCubicKeyframe
, {
109 iterations
: Infinity
,
112 var player4b
= test4b
.animate(transformKeyframesWithCubicKeyframe
, {
114 iterations
: Infinity
,