OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <body> | |
4 <template id="target-template"> | |
5 <svg width="90" height="90"> | |
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: '5, 10, 15, 20', | |
17 from: '-10, 20, 80, 90', | |
18 fromComposite: 'add', | |
19 to: '-20, 30, 70, 80' | |
20 toComposite: 'add' | |
21 }, [ | |
22 {at: -0.4, is: '-6, 16, 84, 94'}, | |
23 {at: 0, is: '-10, 20, 80, 90'}, | |
24 {at: 0.2, is: '-12, 22, 78, 88'}, | |
25 {at: 0.6, is: '-16, 26, 74, 84'}, | |
26 {at: 1, is: '-20, 30, 70, 80'}, | |
27 {at: 1.4, is: '-24, 34, 66, 76'} | |
28 ]); | |
29 | |
30 assertAttributeInterpolation({ | |
31 property: 'viewBox', | |
32 underlying: '5, 10, 15, 20', | |
33 from: '-10, 20, 80, 90', | |
34 fromComposite: 'add', | |
35 to: '-20, 30, 70, 80' | |
36 toComposite: 'replace' | |
37 }, [ | |
38 {at: -0.4, is: '-6, 16, 84, 94'}, | |
39 {at: 0, is: '-10, 20, 80, 90'}, | |
40 {at: 0.2, is: '-12, 22, 78, 88'}, | |
41 {at: 0.6, is: '-16, 26, 74, 84'}, | |
42 {at: 1, is: '-20, 30, 70, 80'}, | |
43 {at: 1.4, is: '-24, 34, 66, 76'} | |
44 ]); | |
45 | |
46 assertAttributeInterpolation({ | |
47 property: 'viewBox', | |
48 underlying: '5, 10, 15, 20', | |
49 from: '-10, 20, 80, 90', | |
50 fromComposite: 'replace', | |
51 to: '-20, 30, 70, 80' | |
52 toComposite: 'add', | |
53 }, [ | |
54 {at: -0.4, is: '-6, 16, 84, 94'}, | |
55 {at: 0, is: '-10, 20, 80, 90'}, | |
56 {at: 0.2, is: '-12, 22, 78, 88'}, | |
57 {at: 0.6, is: '-16, 26, 74, 84'}, | |
58 {at: 1, is: '-20, 30, 70, 80'}, | |
59 {at: 1.4, is: '-24, 34, 66, 76'} | |
60 ]); | |
61 | |
62 assertAttributeInterpolation({ | |
63 property: 'viewBox', | |
64 underlying: '5, 10, 15, 20', | |
65 from: '-10, 20, 80, 90', | |
66 fromComposite: 'neutral', | |
alancutter (OOO until 2018)
2015/11/03 05:39:26
Neutral keyframes are tested using:
from: '',
| |
67 to: '-20, 30, 70, 80' | |
68 toComposite: 'replace' | |
69 }, [ | |
70 {at: -0.4, is: '-6, 16, 84, 94'}, | |
71 {at: 0, is: '-10, 20, 80, 90'}, | |
72 {at: 0.2, is: '-12, 22, 78, 88'}, | |
73 {at: 0.6, is: '-16, 26, 74, 84'}, | |
74 {at: 1, is: '-20, 30, 70, 80'}, | |
75 {at: 1.4, is: '-24, 34, 66, 76'} | |
76 ]); | |
77 | |
78 assertAttributeInterpolation({ | |
79 property: 'viewBox', | |
80 underlying: '5, 10, 15, 20', | |
81 from: '-10, 20, 80, 90', | |
82 fromComposite: 'replace', | |
83 to: '-20, 30, 70, 80' | |
84 toComposite: 'neutral', | |
85 }, [ | |
86 {at: -0.4, is: '-6, 16, 84, 94'}, | |
87 {at: 0, is: '-10, 20, 80, 90'}, | |
88 {at: 0.2, is: '-12, 22, 78, 88'}, | |
89 {at: 0.6, is: '-16, 26, 74, 84'}, | |
90 {at: 1, is: '-20, 30, 70, 80'}, | |
91 {at: 1.4, is: '-24, 34, 66, 76'} | |
92 ]); | |
93 </script> | |
94 </body> | |
95 </html> | |
OLD | NEW |