OLD | NEW |
| (Empty) |
1 <!-- | |
2 Copyright 2012 Google Inc. All Rights Reserved. | |
3 | |
4 Licensed under the Apache License, Version 2.0 (the "License"); | |
5 you may not use this file except in compliance with the License. | |
6 You may obtain a copy of the License at | |
7 | |
8 http://www.apache.org/licenses/LICENSE-2.0 | |
9 | |
10 Unless required by applicable law or agreed to in writing, software | |
11 distributed under the License is distributed on an "AS IS" BASIS, | |
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 See the License for the specific language governing permissions and | |
14 limitations under the License. | |
15 --> | |
16 | |
17 <!DOCTYPE html><meta charset="UTF-8"> | |
18 <style> | |
19 .animation { | |
20 position: absolute; | |
21 width: 25px; | |
22 height: 25px; | |
23 top: 0px; | |
24 left: 0px; | |
25 background: lightsteelblue; | |
26 } | |
27 .expectation { | |
28 background: red; | |
29 position: absolute; | |
30 width: 25px; | |
31 height: 25px; | |
32 top: 0px; | |
33 left: 0px; | |
34 } | |
35 #e { | |
36 -webkit-transform: translate(117.5px, 87.5px); | |
37 transform: translate(117.5px, 87.5px); | |
38 } | |
39 svg { | |
40 position:absolute; | |
41 top: 0px; | |
42 left: 0px; | |
43 width: 800px; | |
44 height: 600px; | |
45 } | |
46 </style> | |
47 | |
48 <svg xmlns="http://www.w3.org/2000/svg" version="1.1"> | |
49 <path id="path" d="M 130,100 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0 " /> | |
50 <path d="M 130,100 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0 " | |
51 stroke="black" stroke-width="1" fill="none" /> | |
52 <path d="M 260,200 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0 " | |
53 stroke="black" stroke-width="1" fill="none" /> | |
54 <path d="M 390,300 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0 " | |
55 stroke="black" stroke-width="1" fill="none" /> | |
56 </svg> | |
57 | |
58 <div id="e" class="expectation"></div> | |
59 <div id="anim" class="animation">→</div> | |
60 | |
61 <script> | |
62 var expected_failures = [ | |
63 { | |
64 browser_configurations: [ | |
65 { firefox: true }, | |
66 { msie: true }, | |
67 ], | |
68 tests: ['Auto generated tests'], | |
69 message: 'Doesn\'t quite follow path correctly.', | |
70 } | |
71 ]; | |
72 </script> | |
73 <script src="../bootstrap.js"></script> | |
74 <script> | |
75 "use strict"; | |
76 | |
77 var options = {autoRotate: 'auto-rotate', iterationComposite: 'accumulate'}; | |
78 var animFunc = new MotionPathEffect( | |
79 document.querySelector('#path').pathSegList, options); | |
80 document.timeline.play(new Animation(document.querySelector("#anim"), | |
81 animFunc, {duration: 7 * 1000, iterations: 3})); | |
82 | |
83 </script> | |
OLD | NEW |