OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <body> |
| 3 <style> |
| 4 .target { |
| 5 width: 100px; |
| 6 height: 100px; |
| 7 } |
| 8 </style> |
| 9 <script src="../interpolation/resources/interpolation-test.js"></script> |
| 10 <script> |
| 11 assertComposition({ |
| 12 property: 'translate', |
| 13 underlying: '100px 200px 300px', |
| 14 addFrom: '-50px 50%', |
| 15 addTo: '100%', |
| 16 }, [ |
| 17 {at: -1, is: '-100px 300px 300px'}, |
| 18 {at: 0, is: '50px 250px 300px'}, |
| 19 {at: 0.25, is: '87.5px 237.5px 300px'}, |
| 20 {at: 0.75, is: '162.5px 212.5px 300px'}, |
| 21 {at: 1, is: '200px 200px 300px'}, |
| 22 {at: 2, is: '350px 150px 300px'}, |
| 23 ]); |
| 24 |
| 25 assertComposition({ |
| 26 property: 'translate', |
| 27 underlying: '100px 200px 300px', |
| 28 addFrom: '50% 100px', |
| 29 replaceTo: '200px 50% 100px', |
| 30 }, [ |
| 31 {at: -1, is: '100px 550px 500px'}, |
| 32 {at: 0, is: '150px 300px 300px'}, |
| 33 {at: 0.25, is: '162.5px 237.5px 250px'}, |
| 34 {at: 0.75, is: '187.5px 112.5px 150px'}, |
| 35 {at: 1, is: '200px 50px 100px'}, |
| 36 {at: 2, is: '250px -200px -100px'}, |
| 37 ]); |
| 38 |
| 39 assertComposition({ |
| 40 property: 'translate', |
| 41 underlying: '100px 200px 300px', |
| 42 replaceFrom: '50% 100px', |
| 43 addTo: '200px 50% 100px', |
| 44 }, [ |
| 45 {at: -1, is: '-200px -50px -400px'}, |
| 46 {at: 0, is: '50px 100px'}, |
| 47 {at: 0.25, is: '112.5px 137.5px 100px'}, |
| 48 {at: 0.75, is: '237.5px 212.5px 300px'}, |
| 49 {at: 1, is: '300px 250px 400px'}, |
| 50 {at: 2, is: '550px 400px 800px'}, |
| 51 ]); |
| 52 </script> |
| 53 </body> |
OLD | NEW |