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