OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <meta charset="UTF-8"> |
| 3 <style> |
| 4 .target { |
| 5 color: white; |
| 6 width: 100px; |
| 7 height: 100px; |
| 8 background-color: black; |
| 9 display: inline-block; |
| 10 overflow: hidden; |
| 11 } |
| 12 .replica { |
| 13 background-color: green; |
| 14 } |
| 15 .target div { |
| 16 width: 10px; |
| 17 height: 10px; |
| 18 display: inline-block; |
| 19 background: orange; |
| 20 margin: 1px; |
| 21 } |
| 22 .test { |
| 23 overflow: hidden; |
| 24 } |
| 25 </style> |
| 26 <body> |
| 27 <template id="target-template"> |
| 28 <div></div> |
| 29 </template> |
| 30 <script src="../testharness/testharness.js"></script> |
| 31 <script src="../testharness/testharnessreport.js"></script> |
| 32 <script src="resources/interpolation-test.js"></script> |
| 33 <script> |
| 34 |
| 35 assertInterpolation({ |
| 36 property: 'transform', |
| 37 prefixedProperty: ['-webkit-transform'], |
| 38 from: 'perspective(400px)', |
| 39 to: 'perspective(500px)' |
| 40 }, [ |
| 41 {at: -1, is: 'perspective(300px)'}, |
| 42 {at: 0, is: 'perspective(400px)'}, |
| 43 {at: 0.25, is: 'perspective(425px)'}, |
| 44 {at: 0.75, is: 'perspective(475px)'}, |
| 45 {at: 1, is: 'perspective(500px)'}, |
| 46 {at: 2, is: 'perspective(600px)'}, |
| 47 ]); |
| 48 assertInterpolation({ |
| 49 property: 'transform', |
| 50 prefixedProperty: ['-webkit-transform'], |
| 51 from: 'skewX(10rad) perspective(400px)', |
| 52 to: 'skewX(20rad) perspective(500px)' |
| 53 }, [ |
| 54 {at: -1, is: 'skewX(0rad) perspective(300px)'}, |
| 55 {at: 0, is: 'skewX(10rad) perspective(400px)'}, |
| 56 {at: 0.25, is: 'skewX(12.5rad) perspective(425px)'}, |
| 57 {at: 0.75, is: 'skewX(17.5rad) perspective(475px)'}, |
| 58 {at: 1, is: 'skewX(20rad) perspective(500px)'}, |
| 59 {at: 2, is: 'skewX(30rad) perspective(600px)'}, |
| 60 ]); |
| 61 assertInterpolation({ |
| 62 property: 'transform', |
| 63 prefixedProperty: ['-webkit-transform'], |
| 64 from: 'scaleZ(1) perspective(400px)', |
| 65 to: 'scaleZ(2) perspective(500px)' |
| 66 }, [ |
| 67 {at: -1, is: 'scaleZ(0) perspective(300px)'}, |
| 68 {at: 0, is: 'scaleZ(1) perspective(400px)'}, |
| 69 {at: 0.25, is: 'scaleZ(1.25) perspective(425px)'}, |
| 70 {at: 0.75, is: 'scaleZ(1.75) perspective(475px)'}, |
| 71 {at: 1, is: 'scaleZ(2) perspective(500px)'}, |
| 72 {at: 2, is: 'scaleZ(3) perspective(600px)'}, |
| 73 ]); |
| 74 </script> |
| 75 </body> |
OLD | NEW |