OLD | NEW |
1 #!mojo mojo:sky_viewer | 1 #!mojo mojo:sky_viewer |
2 <sky> | 2 <sky> |
3 <import src="/sky/framework/debug/shake-to-reload.sky" /> | 3 <import src="/sky/framework/debug/shake-to-reload.sky" /> |
4 <style> | 4 <style> |
5 dot { | 5 dot { |
6 position: absolute; | 6 position: absolute; |
7 height: 10px; | 7 height: 10px; |
8 width: 10px; | 8 width: 10px; |
9 background-color: #00FF00; | 9 background-color: #00FF00; |
10 border-radius: 5px; | 10 border-radius: 5px; |
11 opacity: .75; | 11 opacity: .75; |
12 } | 12 } |
| 13 |
| 14 log { |
| 15 margin-top: 50px; |
| 16 } |
13 </style> | 17 </style> |
14 <log>Ready!</log> | 18 <log>Touch the screen!</log> |
15 <script> | 19 <script> |
16 import "dart:sky"; | 20 import "dart:sky"; |
17 | 21 |
18 // Material design colors. :p | 22 // Material design colors. :p |
19 List<String> colors = [ | 23 List<String> colors = [ |
20 "#009688", | 24 "#009688", |
21 "#FFC107", | 25 "#FFC107", |
22 "#9C27B0", | 26 "#9C27B0", |
23 "#03A9F4", | 27 "#03A9F4", |
24 "#673AB7", | 28 "#673AB7", |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 } | 60 } |
57 | 61 |
58 void main() { | 62 void main() { |
59 document.addEventListener("pointerdown", moreDots); | 63 document.addEventListener("pointerdown", moreDots); |
60 document.addEventListener("pointermove", runToTheCenter); | 64 document.addEventListener("pointermove", runToTheCenter); |
61 document.addEventListener("pointerup", goAway); | 65 document.addEventListener("pointerup", goAway); |
62 document.addEventListener("pointercancel", stopDots); | 66 document.addEventListener("pointercancel", stopDots); |
63 } | 67 } |
64 </script> | 68 </script> |
65 </sky> | 69 </sky> |
OLD | NEW |