OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <meta charset="UTF-8"> | 2 <meta charset="UTF-8"> |
3 <body> | 3 <body> |
4 <script src="../interpolation/resources/interpolation-test.js"></script> | 4 <script src="../interpolation/resources/interpolation-test.js"></script> |
5 <script> | 5 <script> |
6 assertComposition({ | 6 assertComposition({ |
7 property: 'motion-offset', | 7 property: 'offset-distance', |
8 underlying: '50px', | 8 underlying: '50px', |
9 addFrom: '100px', | 9 addFrom: '100px', |
10 addTo: '200px', | 10 addTo: '200px', |
11 }, [ | 11 }, [ |
12 {at: -0.3, is: '120px'}, | 12 {at: -0.3, is: '120px'}, |
13 {at: 0, is: '150px'}, | 13 {at: 0, is: '150px'}, |
14 {at: 0.5, is: '200px'}, | 14 {at: 0.5, is: '200px'}, |
15 {at: 1, is: '250px'}, | 15 {at: 1, is: '250px'}, |
16 {at: 1.5, is: '300px'}, | 16 {at: 1.5, is: '300px'}, |
17 ]); | 17 ]); |
18 | 18 |
19 assertComposition({ | 19 assertComposition({ |
20 property: 'motion-offset', | 20 property: 'offset-distance', |
21 underlying: '100px', | 21 underlying: '100px', |
22 addFrom: '10px', | 22 addFrom: '10px', |
23 addTo: '2px', | 23 addTo: '2px', |
24 }, [ | 24 }, [ |
25 {at: -0.5, is: '114px'}, | 25 {at: -0.5, is: '114px'}, |
26 {at: 0, is: '110px'}, | 26 {at: 0, is: '110px'}, |
27 {at: 0.5, is: '106px'}, | 27 {at: 0.5, is: '106px'}, |
28 {at: 1, is: '102px'}, | 28 {at: 1, is: '102px'}, |
29 {at: 1.5, is: '98px'}, | 29 {at: 1.5, is: '98px'}, |
30 ]); | 30 ]); |
31 | 31 |
32 assertComposition({ | 32 assertComposition({ |
33 property: 'motion-offset', | 33 property: 'offset-distance', |
34 underlying: '10%', | 34 underlying: '10%', |
35 addFrom: '100px', | 35 addFrom: '100px', |
36 addTo: '20%', | 36 addTo: '20%', |
37 }, [ | 37 }, [ |
38 {at: -0.3, is: 'calc(130px + 4%)'}, | 38 {at: -0.3, is: 'calc(130px + 4%)'}, |
39 {at: 0, is: 'calc(100px + 10%)'}, | 39 {at: 0, is: 'calc(100px + 10%)'}, |
40 {at: 0.5, is: 'calc(50px + 20%)'}, | 40 {at: 0.5, is: 'calc(50px + 20%)'}, |
41 {at: 1, is: '30%'}, | 41 {at: 1, is: '30%'}, |
42 {at: 1.5, is: 'calc(-50px + 40%)'}, | 42 {at: 1.5, is: 'calc(-50px + 40%)'}, |
43 ]); | 43 ]); |
44 | 44 |
45 assertComposition({ | 45 assertComposition({ |
46 property: 'motion-offset', | 46 property: 'offset-distance', |
47 underlying: '50px', | 47 underlying: '50px', |
48 addFrom: '100px', | 48 addFrom: '100px', |
49 replaceTo: '200px', | 49 replaceTo: '200px', |
50 }, [ | 50 }, [ |
51 {at: -0.3, is: '135px'}, | 51 {at: -0.3, is: '135px'}, |
52 {at: 0, is: '150px'}, | 52 {at: 0, is: '150px'}, |
53 {at: 0.5, is: '175px'}, | 53 {at: 0.5, is: '175px'}, |
54 {at: 1, is: '200px'}, | 54 {at: 1, is: '200px'}, |
55 {at: 1.5, is: '225px'}, | 55 {at: 1.5, is: '225px'}, |
56 ]); | 56 ]); |
57 </script> | 57 </script> |
58 </body> | 58 </body> |
OLD | NEW |