OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <body> |
| 4 <template id="target-template"> |
| 5 <svg width="0" height="0"> |
| 6 <defs> |
| 7 <marker class="target" /> |
| 8 </defs> |
| 9 </svg> |
| 10 </template> |
| 11 <script src="../svg-attribute-interpolation/resources/interpolation-test.js"></s
cript> |
| 12 <script> |
| 13 'use strict'; |
| 14 assertAttributeInterpolation({ |
| 15 property: 'viewBox', |
| 16 underlying: '10, 10, 10, 10', |
| 17 from: '10, 20, 80, 90', |
| 18 fromComposite: 'add', |
| 19 to: '20, 30, 70, 80', |
| 20 toComposite: 'add', |
| 21 }, [ |
| 22 {at: -0.4, is: '16, 26, 94, 104'}, |
| 23 {at: 0, is: '20, 30, 90, 100'}, |
| 24 {at: 0.2, is: '22, 32, 88, 98'}, |
| 25 {at: 0.6, is: '26, 36, 84, 94'}, |
| 26 {at: 1, is: '30, 40, 80, 90'}, |
| 27 {at: 1.4, is: '34, 44, 76, 86'}, |
| 28 ]); |
| 29 |
| 30 assertAttributeInterpolation({ |
| 31 property: 'viewBox', |
| 32 underlying: '10, 10, 10, 10', |
| 33 from: '10, 20, 80, 90', |
| 34 fromComposite: 'add', |
| 35 to: '20, 30, 70, 80', |
| 36 toComposite: 'replace', |
| 37 }, [ |
| 38 {at: -0.4, is: '20, 30, 98, 108'}, |
| 39 {at: 0, is: '20, 30, 90, 100'}, |
| 40 {at: 0.2, is: '20, 30, 86, 96'}, |
| 41 {at: 0.6, is: '20, 30, 78, 88'}, |
| 42 {at: 1, is: '20, 30, 70, 80'}, |
| 43 {at: 1.4, is: '20, 30, 62, 72'}, |
| 44 ]); |
| 45 |
| 46 assertAttributeInterpolation({ |
| 47 property: 'viewBox', |
| 48 underlying: '10, 10, 10, 10', |
| 49 from: '10, 20, 80, 90', |
| 50 fromComposite: 'replace', |
| 51 to: '20, 30, 70, 80', |
| 52 toComposite: 'add', |
| 53 }, [ |
| 54 {at: -0.4, is: '2, 12, 80, 90'}, |
| 55 {at: 0, is: '10, 20, 80, 90'}, |
| 56 {at: 0.2, is: '14, 24, 80, 90'}, |
| 57 {at: 0.6, is: '22, 32, 80, 90'}, |
| 58 {at: 1, is: '30, 40, 80, 90'}, |
| 59 {at: 1.4, is: '38, 48, 80, 90'}, |
| 60 ]); |
| 61 |
| 62 assertAttributeInterpolation({ |
| 63 property: 'viewBox', |
| 64 underlying: '10, 20, 80, 90', |
| 65 from: neutralKeyframe, |
| 66 to: '20, 30, 70, 80', |
| 67 toComposite: 'replace', |
| 68 }, [ |
| 69 {at: -0.4, is: '6, 16, 84, 94'}, |
| 70 {at: 0, is: '10, 20, 80, 90'}, |
| 71 {at: 0.2, is: '12, 22, 78, 88'}, |
| 72 {at: 0.6, is: '16, 26, 74, 84'}, |
| 73 {at: 1, is: '20, 30, 70, 80'}, |
| 74 {at: 1.4, is: '24, 34, 66, 76'}, |
| 75 ]); |
| 76 </script> |
| 77 </body> |
| 78 </html> |
OLD | NEW |