OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <body> |
| 4 <template id="target-template"> |
| 5 <svg width="90" height="90"> |
| 6 <feComponentTransfer> |
| 7 <feFuncG type="table" class="target" /> |
| 8 </feComponentTransfer> |
| 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: 'tableValues', |
| 16 underlying: '10, 20', |
| 17 from: '30, 40', |
| 18 fromComposite: 'add', |
| 19 to: '50, -10', |
| 20 toComposite: 'add', |
| 21 }, [ |
| 22 {at: -0.4, is: '32, 80'}, |
| 23 {at: 0, is: '40, 60'}, |
| 24 {at: 0.2, is: '44, 50'}, |
| 25 {at: 0.6, is: '52, 30'}, |
| 26 {at: 1, is: '60, 10'}, |
| 27 {at: 1.4, is: '68, -10'}, |
| 28 ]); |
| 29 |
| 30 assertAttributeInterpolation({ |
| 31 property: 'tableValues', |
| 32 underlying: '10, 20', |
| 33 from: '30', |
| 34 fromComposite: 'add', |
| 35 to: '50', |
| 36 toComposite: 'add', |
| 37 }, [ |
| 38 {at: -0.4, is: '32, 20'}, |
| 39 {at: 0, is: '40, 20'}, |
| 40 {at: 0.2, is: '44, 20'}, |
| 41 {at: 0.6, is: '52, 20'}, |
| 42 {at: 1, is: '60, 20'}, |
| 43 {at: 1.4, is: '68, 20'}, |
| 44 ]); |
| 45 |
| 46 assertAttributeInterpolation({ |
| 47 property: 'tableValues', |
| 48 underlying: '10', |
| 49 from: '20, 30, 40', |
| 50 fromComposite: 'add', |
| 51 to: '50, 40, 30', |
| 52 toComposite: 'add', |
| 53 }, [ |
| 54 {at: -0.4, is: '18, 26, 44'}, |
| 55 {at: 0, is: '30, 30, 40'}, |
| 56 {at: 0.2, is: '36, 32, 38'}, |
| 57 {at: 0.6, is: '48, 36, 34'}, |
| 58 {at: 1, is: '60, 40, 30'}, |
| 59 {at: 1.4, is: '72, 44, 26'}, |
| 60 ]); |
| 61 |
| 62 assertAttributeInterpolation({ |
| 63 property: 'tableValues', |
| 64 underlying: '10', |
| 65 from: '30, 40', |
| 66 fromComposite: 'add', |
| 67 to: '50, 60, 70', |
| 68 toComposite: 'replace', |
| 69 }, [ |
| 70 {at: -0.4, is: '40, 40'}, |
| 71 {at: 0, is: '40, 40'}, |
| 72 {at: 0.2, is: '40, 40'}, |
| 73 {at: 0.6, is: '50, 60, 70'}, |
| 74 {at: 1, is: '50, 60, 70'}, |
| 75 {at: 1.4, is: '50, 60, 70'}, |
| 76 ]); |
| 77 |
| 78 assertAttributeInterpolation({ |
| 79 property: 'tableValues', |
| 80 underlying: '10', |
| 81 from: neutralKeyframe, |
| 82 to: '50, -10', |
| 83 toComposite: 'replace', |
| 84 }, [ |
| 85 {at: -0.4, is: '10'}, |
| 86 {at: 0, is: '10'}, |
| 87 {at: 0.2, is: '10'}, |
| 88 {at: 0.6, is: '50, -10'}, |
| 89 {at: 1, is: '50, -10'}, |
| 90 {at: 1.4, is: '50, -10'}, |
| 91 ]); |
| 92 |
| 93 assertAttributeInterpolation({ |
| 94 property: 'tableValues', |
| 95 underlying: '10, 20', |
| 96 from: neutralKeyframe, |
| 97 to: '50, -10', |
| 98 toComposite: 'add', |
| 99 }, [ |
| 100 {at: -0.4, is: '-10, 24'}, |
| 101 {at: 0, is: '10, 20'}, |
| 102 {at: 0.2, is: '20, 18'}, |
| 103 {at: 0.6, is: '40, 14'}, |
| 104 {at: 1, is: '60, 10'}, |
| 105 {at: 1.4, is: '80, 6'}, |
| 106 ]); |
| 107 </script> |
| 108 </body> |
| 109 </html> |
OLD | NEW |