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