This repository was archived by the owner on Aug 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 604
Expand file tree
/
Copy pathmaintenance.html
More file actions
executable file
·1675 lines (1450 loc) · 72.2 KB
/
maintenance.html
File metadata and controls
executable file
·1675 lines (1450 loc) · 72.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<!-- note: don't alter references. see cakefile.targetPaths.staticFilesBaseUrl -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Welcome to Koding. A new way for developers to get work done.</title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://api.koding.com/images/favicon.ico">
<link rel="fluid-icon" href="https://api.koding.com/images/kd-fluid-icon512.png" title="Koding" />
<script src="https://static.firebase.com/v0/firebase.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<base target="_blank">
<style type="text/css">
/*
__ __ _____ ____ ______ __ __ ____
/\ \/\ \ /\ __`\ /\ _`\ /\__ _\ /\ \/\ \ /\ _`\
\ \ \/'/' \ \ \/\ \ \ \ \/\ \ \/_/\ \/ \ \ `\\ \ \ \ \ \_\
\ \ , < \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ , ` \ \ \ \___
\ \ \\`\ \ \ \_\ \ \ \ \_\ \ \_\ \__ \ \ \`\ \ \ \ \/, \
\ \_\ \_\ \ \_____\ \ \____/ /\_____\ \ \_\ \_\ \ \____/
\/_/\/_/ \/_____/ \/___/ \/_____/ \/_/\/_/ \/___/
*/
/* HTML5 ✰ Boilerplate */
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure, footer, header, hgroup,
menu, nav, section, summary, time, mark, audio, video {
margin:0;
padding:0;
border:0;
outline:0;
/*font-size:100%; // was causing too many overrides */
vertical-align:baseline;
background:transparent;
}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
display:block;
}
nav ul, ul { list-style:none; }
blockquote, q { quotes:none; }
blockquote:before, blockquote:after,
q:before, q:after { content:''; content:none; }
a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }
ins { background-color:#ff9; color:#000; text-decoration:none; }
mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }
del { text-decoration: line-through; }
abbr[title], dfn[title] { border-bottom:1px dotted; cursor:help; }
table { border-collapse:collapse; border-spacing:0; }
hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; }
input, select { vertical-align:middle; }
body { font:13px/1.231 sans-serif; *font-size:small; }
select, input, textarea, button { font:99% "Open Sans"; }
pre, code, kbd, samp { font-family: monospace, sans-serif; background-color: #f2f2f2; }
body, select, input, textarea { color: #444; }
h1,h2,h3,h4,h5,h6 { font-weight: bold; }
/*html { overflow-y: scroll; }*/
a:hover, a:active { outline: none; }
a, a:active, a:visited { color: #07C; }
a:hover { color: #036; }
ul, ol { margin-left: 1.8em; }
ol { list-style-type: decimal; }
nav ul, nav li { margin: 0; }
small { font-size: 85%; }
strong, th { font-weight: bold; }
td, td img { vertical-align: top; }
sub { vertical-align: sub; font-size: smaller; }
sup { vertical-align: super; font-size: smaller; }
pre { padding: 15px; margin: 5px; white-space: pre; white-space: pre-wrap; /*white-space: pre-line;*/ word-wrap: break-word; }
textarea { overflow: auto; }
.ie6 legend, .ie7 legend { margin-left: -7px; }
input[type="radio"] { vertical-align: text-bottom; }
input[type="checkbox"] { vertical-align: bottom; }
.ie7 input[type="checkbox"] { vertical-align: baseline; }
.ie6 input { vertical-align: text-bottom; }
label, input[type=button], input[type=submit], button { cursor: pointer; }
button, input, select, textarea { margin: 0; }
input:valid, textarea:valid { }
input:invalid, textarea:invalid { border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; }
.no-boxshadow input:invalid,
.no-boxshadow textarea:invalid { background-color: #f0dddd; }
::-moz-selection {background: rgba(255, 185, 41,.5)}
::selection {background: rgba(255, 185, 41,.5)}
a:link {-webkit-tap-highlight-color: #F6A220;}
button { width: auto; overflow: visible; }
.ie7 img { -ms-interpolation-mode: bicubic; }
.ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; }
.hidden { display: none !important; visibility: hidden; }
.visuallyhidden { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px); }
.invisible { visibility: hidden; }
.clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; visibility: hidden; }
.clearfix:after { clear: both; }
.clearfix { zoom: 1; }
/*@font-face{font-family:"Open Sans";font-weight:400;font-style:normal;src:url("fonts/OpenSans-Regular-webfont.woff") format("woff")}*/
body,html{width:100%;height:100%}
body{font-family:"Open Sans",Helvetica,sans-serif;background-color:#393630;background-image:url("https://api.koding.com/images/koding-new-bg.png");background-repeat:repeat-x;font-weight:400;overflow:hidden;}
h1{font-size:28px;line-height:2; margin:50px auto 20px auto; color:#eee; text-shadow:0 1px 0 black;text-align:center;border-radius:10px;background:rgba(0,0,0,.2); width:78%; padding:0 1%;}
h1 span{display: block; font-size: 18px; color: #888;}
/* firebase asteroids stuff*/
body {
font-family: 'Open Sans',"proxima-nova", "Helvetica Neue", Helvetica, Arial, sans-serif;
/*background: url('bg_tile.jpg');*/
margin-left: auto;
margin-right: auto;
width: 1024px;
font-size: 16px;
color: #c0c0c0;
}
h3 {
font-size: 24px;
font-family: "proxima-nova", "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #c0c0c0;
}
span {
font-family: "proxima-nova", "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #c0c0c0;
}
A:link {text-decoration: none; color: yellow}
A:visited {text-decoration: none; color: yellow}
A:active {text-decoration: none; color: yellow}
A:hover {text-decoration: underline; color: white;}
#asteroids {
width: 100%;
text-align: center;
}
#game-container {
width: 100%;
}
#header-pane span{
font-size :14px;
color : #888;
}
#header-pane span a {
color : #c0c0c0;
transition: color 0.25s linear;
-webkit-transition: color 0.25s linear;
-moz-transition: color 0.25s linear;
}
#header-pane span a:hover {
color : yellow;
}
#header-left {
float: left;
}
#footer-col {
float: left;
width: 33%;
}
#header-right {
float: right;
}
#footer-pane {
width:100%;
}
.middle {
display:inline-block;
vertical-align:middle;
}
#game-pane {
}
#leaderboardTable {
overflow: auto;
width: 100%;
color: #c0c0c0;
}
#canvas {
text-align: center
position:relative;
border-radius: 4px;
border: 1px solid #444;
margin: 2px;
color: #424547;
background: url('https://api.koding.com/images/stars.gif');
}
.button {
position:absolute;
border:1px solid black;
}
#left-controls {
position:absolute;
left:1px;
bottom:0px;
display:none;
}
#right-controls {
position:absolute;
right:1px;
bottom:0px;
display:none;
}
#up {
width:200px;
height:100px;
bottom:100px;
}
#left {
width:100px;
height:100px;
bottom:0px;
}
#right {
width:100px;
height:100px;
bottom:0px;
left:100px;
}
#space {
width:200px;
height:200px;
bottom:0px;
right:0px;
}
</style>
</head>
<body>
<h1>We're updating Koding, it will be back shortly.<span>
In the meantime, why not shoot each other?</span></h1>
<div id="asteroids">
<div id="game-pane">
<div id="game-container">
<div id="left-controls">
<div id="up" class='button'>⬆</div>
<div id="left" class='button'>⬅</div>
<div id="right" class='button'>➡</div>
</div>
<div id="right-controls">
<div id="space" class='button'>Fire</div>
</div>
<canvas id="canvas" width="1000" height="600"></canvas>
</div>
</div>
<div id="header-pane">
<div id="header-left">
<span id="my-name"></span><span>: </span><span id="my-score"></span>
</div>
<div id="header-right">
<span>This Multiplayer Asteroids is powered by <a href="https://www.firebase.com/">Firebase</a> </span>
</div>
</div>
</div>
<!-- </div> -->
<script type="text/javascript">
// converted at http://typeface.neocracy.org
vector_battle = {"glyphs":{"S":{"x_min":65,"x_max":980,"ha":1045,"o":"m 963 17 l 963 716 l 65 716 l 65 1305 l 980 1305 l 980 1288 l 81 1288 l 81 733 l 980 733 l 980 0 l 65 0 l 65 17 l 963 17 "},"¦":{"x_min":0,"x_max":0,"ha":1361},"/":{"x_min":65.125,"x_max":980.296875,"ha":1045,"o":"m 81 0 l 65 0 l 963 1305 l 980 1305 l 81 0 "},"y":{"x_min":65.375,"x_max":980.546875,"ha":1046,"o":"m 958 1305 l 980 1305 l 528 716 l 528 0 l 512 0 l 512 716 l 65 1305 l 87 1305 l 519 738 l 958 1305 "},"Á":{"x_min":0,"x_max":0,"ha":1361},"g":{"x_min":65,"x_max":980,"ha":1045,"o":"m 980 1305 l 980 1132 l 963 1132 l 963 1288 l 81 1288 l 81 17 l 963 17 l 963 716 l 292 716 l 292 733 l 980 733 l 980 0 l 65 0 l 65 1305 l 980 1305 "},"²":{"x_min":0,"x_max":0,"ha":1361},"–":{"x_min":0,"x_max":0,"ha":1361},"ë":{"x_min":0,"x_max":0,"ha":1361},"ƒ":{"x_min":0,"x_max":0,"ha":1361},"Î":{"x_min":45.1875,"x_max":1008.875,"ha":1045,"o":"m 271 46 l 414 159 l 759 35 l 972 347 l 691 555 l 958 677 l 760 844 l 511 683 l 293 854 l 83 665 l 174 475 l 81 226 l 271 46 m 263 6 l 45 226 l 141 466 l 47 669 l 292 883 l 506 717 l 763 875 l 1005 677 l 739 547 l 1008 352 l 760 6 l 414 130 l 263 6 "},"e":{"x_min":65,"x_max":980.15625,"ha":1045,"o":"m 81 716 l 81 17 l 980 17 l 980 0 l 65 0 l 65 1305 l 980 1305 l 980 1288 l 81 1288 l 81 733 l 980 733 l 980 716 l 81 716 "},"Ã":{"x_min":0,"x_max":0,"ha":1361},"J":{"x_min":65.453125,"x_max":980.609375,"ha":1046,"o":"m 534 1288 l 534 1305 l 980 1305 l 980 0 l 494 0 l 65 437 l 87 437 l 498 17 l 964 17 l 964 1288 l 534 1288 "},"»":{"x_min":261.1875,"x_max":863.984375,"ha":1045,"o":"m 457 1038 l 476 1038 l 863 724 l 476 408 l 457 408 l 845 724 l 457 1038 m 261 1038 l 280 1038 l 668 724 l 280 408 l 261 408 l 649 724 l 261 1038 "},"‐":{"x_min":65,"x_max":980,"ha":1045,"o":"m 65 733 l 980 733 l 980 717 l 65 717 l 65 733 "},"©":{"x_min":128,"x_max":914,"ha":1045,"o":"m 128 350 l 128 1054 l 522 1110 l 914 1054 l 914 350 l 522 297 l 128 350 m 898 364 l 898 1043 l 522 1095 l 144 1043 l 144 364 l 522 313 l 898 364 m 759 502 l 759 487 l 291 487 l 291 944 l 759 944 l 759 931 l 310 931 l 310 502 l 759 502 "},"ò":{"x_min":0,"x_max":0,"ha":1361},"^":{"x_min":215,"x_max":832,"ha":1045,"o":"m 832 888 l 525 1285 l 215 888 l 215 907 l 525 1305 l 832 907 l 832 888 "},"«":{"x_min":261.1875,"x_max":863.984375,"ha":1045,"o":"m 863 1038 l 476 724 l 863 408 l 845 408 l 457 724 l 845 1038 l 863 1038 m 668 1038 l 280 724 l 668 408 l 649 408 l 261 724 l 649 1038 l 668 1038 "},"D":{"x_min":65,"x_max":980,"ha":1045,"o":"m 65 0 l 65 1305 l 552 1305 l 980 869 l 980 434 l 554 0 l 65 0 m 963 863 l 546 1288 l 81 1288 l 81 17 l 548 17 l 963 440 l 963 863 "},"∙":{"x_min":0,"x_max":0,"ha":1361},"ÿ":{"x_min":0,"x_max":0,"ha":1361},"í":{"x_min":0,"x_max":0,"ha":1361},"ˆ":{"x_min":215,"x_max":832,"ha":1045,"o":"m 832 888 l 525 1285 l 215 888 l 215 907 l 525 1305 l 832 907 l 832 888 "},"w":{"x_min":65,"x_max":980,"ha":1045,"o":"m 525 596 l 963 21 l 963 1304 l 980 1304 l 980 -1 l 963 -1 l 525 570 l 81 0 l 65 0 l 65 1305 l 81 1305 l 81 22 l 525 596 "},"$":{"x_min":64.84375,"x_max":980,"ha":1045,"o":"m 511 1288 l 81 1288 l 81 733 l 511 733 l 511 1288 m 528 17 l 963 17 l 963 716 l 528 716 l 528 17 m 980 0 l 64 0 l 64 17 l 511 17 l 511 716 l 65 716 l 65 1305 l 980 1305 l 980 1288 l 528 1288 l 528 733 l 980 733 l 980 0 "},"\\":{"x_min":65.125,"x_max":980.296875,"ha":1045,"o":"m 65 1305 l 81 1305 l 980 0 l 963 0 l 65 1305 "},"Ì":{"x_min":72,"x_max":1026.453125,"ha":1046,"o":"m 166 852 l 335 686 l 494 1092 l 835 963 l 1026 545 l 775 282 l 839 126 l 518 2 l 422 373 l 214 119 l 72 180 l 72 563 l 166 852 m 344 651 l 171 810 l 94 545 l 94 198 l 215 145 l 432 414 l 536 33 l 807 137 l 749 288 l 997 541 l 822 936 l 510 1062 l 344 651 "},"µ":{"x_min":0,"x_max":0,"ha":1361},"Ç":{"x_min":13.296875,"x_max":1020.828125,"ha":1045,"o":"m 718 381 l 646 525 l 419 525 l 336 381 l 718 381 m 978 236 l 745 360 l 307 360 l 58 236 l 978 236 m 250 21 l 786 21 l 978 216 l 58 216 l 250 21 m 1020 233 l 796 3 l 237 3 l 13 233 l 307 381 l 406 545 l 658 545 l 745 381 l 1020 233 "},"’":{"x_min":0,"x_max":0,"ha":1361},"-":{"x_min":65,"x_max":980,"ha":1045,"o":"m 65 733 l 980 733 l 980 717 l 65 717 l 65 733 "},"Q":{"x_min":65,"x_max":980,"ha":1045,"o":"m 808 174 l 963 333 l 963 1288 l 81 1288 l 81 17 l 653 17 l 799 166 l 595 374 l 595 391 l 808 174 m 980 0 l 963 0 l 808 158 l 653 0 l 65 0 l 65 1305 l 980 1305 l 980 333 l 816 166 l 980 0 "},"M":{"x_min":65,"x_max":980,"ha":1045,"o":"m 519 716 l 81 1288 l 81 0 l 65 0 l 65 1305 l 86 1305 l 519 738 l 958 1305 l 980 1305 l 980 0 l 963 0 l 963 1288 l 519 716 "},"C":{"x_min":65,"x_max":980.15625,"ha":1045,"o":"m 81 17 l 980 17 l 980 0 l 65 0 l 65 1305 l 980 1305 l 980 1288 l 81 1288 l 81 17 "},"œ":{"x_min":0,"x_max":0,"ha":1361},"!":{"x_min":397,"x_max":653,"ha":1045,"o":"m 413 197 l 413 17 l 636 17 l 636 197 l 413 197 m 397 216 l 653 216 l 653 0 l 397 0 l 397 216 m 530 334 l 514 334 l 514 1305 l 530 1305 l 530 334 "},"ç":{"x_min":0,"x_max":0,"ha":1361},"È":{"x_min":21.859375,"x_max":1010.125,"ha":1045,"o":"m 549 272 l 654 245 l 943 245 l 943 272 l 549 272 m 976 145 l 308 315 l 259 230 l 47 184 l 150 21 l 854 21 l 976 145 m 1010 152 l 859 0 l 144 0 l 21 197 l 240 243 l 296 340 l 498 289 l 959 289 l 959 229 l 714 229 l 1010 152 "},"{":{"x_min":196,"x_max":849.34375,"ha":1045,"o":"m 212 17 l 849 17 l 849 0 l 196 0 l 196 1305 l 849 1305 l 849 1288 l 212 1288 l 212 17 "},"X":{"x_min":65.125,"x_max":980.296875,"ha":1045,"o":"m 958 0 l 519 696 l 87 0 l 65 0 q 152 139 93 44 l 455 625 q 511 716 509 710 l 65 1305 l 87 1305 l 519 735 l 958 1305 l 980 1305 l 528 716 l 980 0 l 958 0 "},"ô":{"x_min":0,"x_max":0,"ha":1361},"¼":{"x_min":0,"x_max":0,"ha":1361},"#":{"x_min":109,"x_max":926,"ha":1046,"o":"m 316 517 l 718 517 l 718 802 l 316 802 l 316 517 m 718 500 l 316 500 l 316 200 l 300 200 l 300 500 l 109 500 l 109 517 l 300 517 l 300 802 l 109 802 l 109 819 l 300 819 l 300 1105 l 316 1105 l 316 819 l 718 819 l 718 1105 l 735 1105 l 735 819 l 926 819 l 926 802 l 735 802 l 735 517 l 926 517 l 926 500 l 735 500 l 735 200 l 718 200 l 718 500 "},"Ê":{"x_min":31,"x_max":1019.3125,"ha":1045,"o":"m 435 736 l 1014 736 l 1014 575 l 687 486 l 1019 260 l 792 30 l 686 139 l 291 28 l 31 379 l 31 729 l 294 970 l 679 970 l 435 736 m 995 719 l 392 719 l 632 950 l 298 950 l 55 723 l 55 383 l 301 51 l 690 160 l 793 57 l 988 255 l 649 494 l 995 586 l 995 719 "},")":{"x_min":196.3125,"x_max":849.609375,"ha":1046,"o":"m 833 1288 l 196 1288 l 196 1305 l 849 1305 l 849 0 l 196 0 l 196 17 l 833 17 l 833 1288 "},"Å":{"x_min":197.390625,"x_max":862.65625,"ha":1045,"o":"m 826 59 l 532 925 l 231 59 l 310 165 l 751 165 l 826 59 m 546 933 l 862 0 l 852 0 l 743 148 l 318 148 l 208 0 l 197 0 l 532 971 l 546 933 "},"ø":{"x_min":0,"x_max":0,"ha":1361},"â":{"x_min":0,"x_max":0,"ha":1361},"}":{"x_min":196.3125,"x_max":849.609375,"ha":1046,"o":"m 833 1288 l 196 1288 l 196 1305 l 849 1305 l 849 0 l 196 0 l 196 17 l 833 17 l 833 1288 "},"‰":{"x_min":0,"x_max":0,"ha":1361},"Ä":{"x_min":65,"x_max":980,"ha":1045,"o":"m 81 994 l 81 733 l 963 733 l 963 994 l 522 1289 l 81 994 m 980 0 l 963 0 l 963 716 l 81 716 l 81 0 l 65 0 l 65 1000 l 522 1305 l 980 1000 l 980 0 m 731 1525 l 980 1525 l 980 1508 l 731 1508 l 731 1525 m 65 1525 l 314 1525 l 314 1508 l 65 1508 l 65 1525 "},"¸":{"x_min":0,"x_max":0,"ha":1361},"a":{"x_min":65,"x_max":980,"ha":1045,"o":"m 81 994 l 81 733 l 963 733 l 963 994 l 522 1288 l 81 994 m 980 0 l 963 0 l 963 716 l 81 716 l 81 0 l 65 0 l 65 1000 l 522 1305 l 980 1000 l 980 0 "},"—":{"x_min":0,"x_max":0,"ha":1361},"=":{"x_min":65,"x_max":980,"ha":1045,"o":"m 65 433 l 980 433 l 980 416 l 65 416 l 65 433 m 65 732 l 980 732 l 980 716 l 65 716 l 65 732 "},"N":{"x_min":65,"x_max":980,"ha":1045,"o":"m 980 1305 l 980 0 l 963 0 l 963 66 l 81 1221 l 81 0 l 65 0 l 65 1305 l 81 1305 l 81 1243 l 963 88 l 963 1305 l 980 1305 "},"\u0011":{"x_min":0,"x_max":0,"ha":1361},"ú":{"x_min":0,"x_max":0,"ha":1361},"⁄":{"x_min":0,"x_max":0,"ha":1361},"2":{"x_min":64.84375,"x_max":980.15625,"ha":1045,"o":"m 64 1288 l 64 1305 l 980 1305 l 980 716 l 81 716 l 81 17 l 980 17 l 980 0 l 65 0 l 65 733 l 963 733 l 963 1288 l 64 1288 "},"ü":{"x_min":65,"x_max":980,"ha":1045,"o":"m 963 1305 l 980 1305 l 980 0 l 65 0 l 65 1305 l 81 1305 l 81 17 l 963 17 l 963 1305 m 731 1525 l 980 1525 l 980 1508 l 731 1508 l 731 1525 m 65 1525 l 314 1525 l 314 1508 l 65 1508 l 65 1525 "},"¯":{"x_min":0,"x_max":0,"ha":1361},"Z":{"x_min":65,"x_max":980,"ha":1045,"o":"m 84 17 l 980 17 l 980 0 l 65 0 l 65 22 l 958 1288 l 65 1288 l 65 1305 l 980 1305 l 980 1288 l 84 17 "},"u":{"x_min":65,"x_max":980,"ha":1045,"o":"m 963 1305 l 980 1305 l 980 0 l 65 0 l 65 1305 l 81 1305 l 81 17 l 963 17 l 963 1305 "},"˜":{"x_min":0,"x_max":0,"ha":1361},"Ó":{"x_min":0,"x_max":0,"ha":1361},"k":{"x_min":65,"x_max":980.15625,"ha":1045,"o":"m 955 1305 l 980 1305 l 86 716 l 980 0 l 955 0 l 81 699 l 81 0 l 65 0 l 65 1305 l 81 1305 l 81 732 l 955 1305 "},"Ù":{"x_min":0,"x_max":0,"ha":1361},"Ÿ":{"x_min":0,"x_max":0,"ha":1361},"¢":{"x_min":0,"x_max":0,"ha":1361},"ß":{"x_min":94,"x_max":899,"ha":1046,"o":"m 100 505 l 369 505 l 369 500 l 94 500 l 94 892 l 369 892 l 369 887 l 100 887 l 100 505 m 681 892 l 413 715 l 681 500 l 675 500 l 413 710 l 413 500 l 407 500 l 407 892 l 413 892 l 413 719 l 681 892 m 826 560 l 826 505 l 893 505 l 893 560 l 826 560 m 822 566 l 899 566 l 899 500 l 822 500 l 822 566 m 861 600 l 856 600 l 856 892 l 861 892 l 861 600 "},"é":{"x_min":0,"x_max":0,"ha":1361},"s":{"x_min":65,"x_max":980,"ha":1045,"o":"m 963 17 l 963 716 l 65 716 l 65 1305 l 980 1305 l 980 1288 l 81 1288 l 81 733 l 980 733 l 980 0 l 65 0 l 65 17 l 963 17 "},"B":{"x_min":65,"x_max":980,"ha":1045,"o":"m 65 0 l 65 1305 l 653 1305 l 980 972 l 980 849 l 857 724 l 980 600 l 980 333 l 653 0 l 65 0 m 846 716 l 81 716 l 81 17 l 650 17 l 963 336 l 963 597 l 846 716 m 81 733 l 846 733 l 963 852 l 963 969 l 650 1288 l 81 1288 l 81 733 "},"…":{"x_min":0,"x_max":0,"ha":1361},"?":{"x_min":64.84375,"x_max":980,"ha":1045,"o":"m 530 333 l 514 333 l 514 733 l 963 733 l 963 1288 l 64 1288 l 64 1305 l 980 1305 l 980 716 l 530 716 l 530 333 m 413 197 l 413 17 l 636 17 l 636 197 l 413 197 m 397 216 l 653 216 l 653 0 l 397 0 l 397 216 "},"H":{"x_min":65,"x_max":980,"ha":1045,"o":"m 980 1305 l 980 0 l 963 0 l 963 716 l 81 716 l 81 0 l 65 0 l 65 1305 l 81 1305 l 81 733 l 963 733 l 963 1305 l 980 1305 "},"î":{"x_min":0,"x_max":0,"ha":1361},"c":{"x_min":65,"x_max":980.15625,"ha":1045,"o":"m 81 17 l 980 17 l 980 0 l 65 0 l 65 1305 l 980 1305 l 980 1288 l 81 1288 l 81 17 "},"¶":{"x_min":0,"x_max":0,"ha":1361},"−":{"x_min":0,"x_max":0,"ha":1361},"•":{"x_min":0,"x_max":0,"ha":1361},"¥":{"x_min":0,"x_max":0,"ha":1361},"(":{"x_min":196,"x_max":849.34375,"ha":1045,"o":"m 212 17 l 849 17 l 849 0 l 196 0 l 196 1305 l 849 1305 l 849 1288 l 212 1288 l 212 17 "},"U":{"x_min":65,"x_max":980,"ha":1045,"o":"m 963 1305 l 980 1305 l 980 0 l 65 0 l 65 1305 l 81 1305 l 81 17 l 963 17 l 963 1305 "},"Ñ":{"x_min":0,"x_max":0,"ha":1361},"F":{"x_min":65,"x_max":980.15625,"ha":1045,"o":"m 65 0 l 65 1305 l 980 1305 l 980 1288 l 81 1288 l 81 733 l 980 733 l 980 716 l 81 716 l 81 0 l 65 0 "},"":{"x_min":0,"x_max":0,"ha":1361},":":{"x_min":441,"x_max":697,"ha":1045,"o":"m 457 714 l 457 533 l 680 533 l 680 714 l 457 714 m 441 733 l 697 733 l 697 516 l 441 516 l 441 733 m 457 197 l 457 17 l 680 17 l 680 197 l 457 197 m 441 216 l 697 216 l 697 0 l 441 0 l 441 216 "},"Û":{"x_min":0,"x_max":0,"ha":1361},"*":{"x_min":294,"x_max":751,"ha":1045,"o":"m 294 716 l 294 733 l 514 733 l 294 1024 l 311 1024 l 517 753 l 517 955 l 534 955 l 534 753 l 733 1024 l 751 1024 l 537 733 l 751 733 l 751 716 l 537 716 l 751 372 l 733 372 l 534 698 l 534 489 l 517 489 l 517 698 l 311 372 l 294 372 l 514 716 l 294 716 "},"†":{"x_min":0,"x_max":0,"ha":1361},"°":{"x_min":0,"x_max":0,"ha":1361},"V":{"x_min":65.125,"x_max":980.296875,"ha":1045,"o":"m 958 1305 l 980 1305 l 528 0 l 511 0 l 65 1305 l 87 1305 l 519 25 l 958 1305 "},"å":{"x_min":0,"x_max":0,"ha":1361}," ":{"x_min":0,"x_max":0,"ha":1361},"0":{"x_min":65,"x_max":980,"ha":1045,"o":"m 65 0 l 65 1305 l 980 1305 l 980 0 l 65 0 m 81 1288 l 81 55 l 963 1288 l 81 1288 m 81 17 l 962 17 l 962 1244 l 81 17 "},"”":{"x_min":0,"x_max":0,"ha":1361},"¾":{"x_min":0,"x_max":0,"ha":1361},"@":{"x_min":128,"x_max":914,"ha":1045,"o":"m 797 706 l 797 823 l 522 955 l 253 823 l 253 706 l 797 706 m 814 363 l 898 363 l 898 1043 l 144 1043 l 144 256 l 914 256 l 914 243 l 128 243 l 128 1055 l 914 1055 l 914 350 l 797 350 l 797 692 l 253 692 l 253 350 l 236 350 l 236 832 l 522 972 l 814 832 l 814 363 "},"ö":{"x_min":65,"x_max":980,"ha":1045,"o":"m 65 0 l 65 1305 l 980 1305 l 980 0 l 65 0 m 963 17 l 963 1288 l 81 1288 l 81 17 l 963 17 m 731 1525 l 980 1525 l 980 1508 l 731 1508 l 731 1525 m 65 1525 l 314 1525 l 314 1508 l 65 1508 l 65 1525 "},"i":{"x_min":65,"x_max":980,"ha":1045,"o":"m 528 1288 l 528 17 l 980 17 l 980 0 l 65 0 l 65 17 l 511 17 l 511 1288 l 65 1288 l 65 1305 l 980 1305 l 980 1288 l 528 1288 "},"Õ":{"x_min":0,"x_max":0,"ha":1361},"þ":{"x_min":0,"x_max":0,"ha":1361},"]":{"x_min":196.3125,"x_max":849.609375,"ha":1046,"o":"m 833 1288 l 196 1288 l 196 1305 l 849 1305 l 849 0 l 196 0 l 196 17 l 833 17 l 833 1288 "},"m":{"x_min":65,"x_max":980,"ha":1045,"o":"m 519 716 l 81 1288 l 81 0 l 65 0 l 65 1305 l 86 1305 l 519 738 l 958 1305 l 980 1305 l 980 0 l 963 0 l 963 1288 l 519 716 "},"8":{"x_min":65,"x_max":980,"ha":1045,"o":"m 65 0 l 65 1305 l 980 1305 l 980 0 l 65 0 m 81 1288 l 81 733 l 963 733 l 963 1288 l 81 1288 m 81 716 l 81 17 l 963 17 l 963 716 l 81 716 "},"R":{"x_min":65,"x_max":980,"ha":1045,"o":"m 963 733 l 963 1288 l 81 1288 l 81 733 l 963 733 m 980 716 l 86 716 l 980 0 l 955 0 l 81 697 l 81 0 l 65 0 l 65 1305 l 980 1305 l 980 716 "},"á":{"x_min":0,"x_max":0,"ha":1361},"×":{"x_min":0,"x_max":0,"ha":1361},"o":{"x_min":65,"x_max":980,"ha":1045,"o":"m 65 0 l 65 1305 l 980 1305 l 980 0 l 65 0 m 963 17 l 963 1288 l 81 1288 l 81 17 l 963 17 "},"5":{"x_min":65,"x_max":980,"ha":1045,"o":"m 963 17 l 963 716 l 65 716 l 65 1305 l 980 1305 l 980 1288 l 81 1288 l 81 733 l 980 733 l 980 0 l 65 0 l 65 17 l 963 17 "},"õ":{"x_min":0,"x_max":0,"ha":1361},"7":{"x_min":65.453125,"x_max":980.609375,"ha":1046,"o":"m 964 0 l 964 1288 l 65 1288 l 65 1305 l 980 1305 l 980 0 l 964 0 "},"K":{"x_min":65,"x_max":980.15625,"ha":1045,"o":"m 955 1305 l 980 1305 l 86 716 l 980 0 l 955 0 l 81 699 l 81 0 l 65 0 l 65 1305 l 81 1305 l 81 732 l 955 1305 "},",":{"x_min":435,"x_max":697,"ha":1045,"o":"m 451 197 l 451 -83 l 588 -83 l 588 17 l 680 17 l 680 197 l 451 197 m 435 216 l 697 216 l 697 0 l 604 0 l 604 -100 l 435 -100 l 435 216 "},"d":{"x_min":65,"x_max":980,"ha":1045,"o":"m 65 0 l 65 1305 l 552 1305 l 980 869 l 980 434 l 554 0 l 65 0 m 963 863 l 546 1288 l 81 1288 l 81 17 l 548 17 l 963 440 l 963 863 "},"¨":{"x_min":0,"x_max":0,"ha":1361},"Ô":{"x_min":0,"x_max":0,"ha":1361},"E":{"x_min":65,"x_max":980.15625,"ha":1045,"o":"m 81 716 l 81 17 l 980 17 l 980 0 l 65 0 l 65 1305 l 980 1305 l 980 1288 l 81 1288 l 81 733 l 980 733 l 980 716 l 81 716 "},"Y":{"x_min":65.375,"x_max":980.546875,"ha":1046,"o":"m 958 1305 l 980 1305 l 528 716 l 528 0 l 512 0 l 512 716 l 65 1305 l 87 1305 l 519 738 l 958 1305 "},"\"":{"x_min":435,"x_max":697,"ha":1045,"o":"m 451 1285 l 451 1005 l 588 1005 l 588 1105 l 680 1105 l 680 1285 l 451 1285 m 435 1305 l 697 1305 l 697 1088 l 604 1088 l 604 988 l 435 988 l 435 1305 "},"‹":{"x_min":261.1875,"x_max":668.59375,"ha":1045,"o":"m 668 1038 l 280 724 l 668 408 l 649 408 l 261 724 l 649 1038 l 668 1038 "},"ê":{"x_min":0,"x_max":0,"ha":1361},"Ï":{"x_min":37,"x_max":1004.421875,"ha":1046,"o":"m 37 253 l 37 669 l 261 911 l 517 664 l 763 901 l 1004 652 l 860 415 l 996 238 l 628 35 l 252 35 l 37 253 m 264 55 l 627 55 l 966 242 l 835 417 l 977 646 l 762 869 l 518 632 l 264 879 l 64 654 l 64 257 l 264 55 "},"„":{"x_min":0,"x_max":0,"ha":1361},"Â":{"x_min":0,"x_max":0,"ha":1361},"Í":{"x_min":6.640625,"x_max":1019.5,"ha":1045,"o":"m 133 208 l 254 247 l 518 34 l 898 193 l 980 433 l 618 562 l 790 694 l 532 802 l 192 741 l 149 678 l 405 473 l 41 381 l 133 208 m 118 177 l 6 397 l 362 482 l 114 678 l 175 759 l 533 829 l 835 696 l 659 568 l 1019 441 l 915 178 l 514 6 l 239 222 l 118 177 "},"´":{"x_min":0,"x_max":0,"ha":1361},"ì":{"x_min":0,"x_max":0,"ha":1361},"±":{"x_min":65,"x_max":980,"ha":1045,"o":"m 514 716 l 65 716 l 65 732 l 514 732 l 514 1175 l 531 1175 l 531 732 l 980 732 l 980 716 l 531 716 l 531 241 l 514 241 l 514 716 m 65 99 l 980 99 l 980 83 l 65 83 l 65 99 "},"Ú":{"x_min":0,"x_max":0,"ha":1361},"|":{"x_min":261,"x_max":277.609375,"ha":522,"o":"m 277 1305 l 277 0 l 261 0 l 261 1305 l 277 1305 "},"§":{"x_min":0,"x_max":0,"ha":1361},"Ý":{"x_min":0,"x_max":0,"ha":1361},"b":{"x_min":65,"x_max":980,"ha":1045,"o":"m 65 0 l 65 1305 l 653 1305 l 980 972 l 980 849 l 857 724 l 980 600 l 980 333 l 653 0 l 65 0 m 846 716 l 81 716 l 81 17 l 650 17 l 963 336 l 963 597 l 846 716 m 81 733 l 846 733 l 963 852 l 963 969 l 650 1288 l 81 1288 l 81 733 "},"q":{"x_min":65,"x_max":980,"ha":1045,"o":"m 808 174 l 963 333 l 963 1288 l 81 1288 l 81 17 l 653 17 l 799 166 l 595 374 l 595 391 l 808 174 m 980 0 l 963 0 l 808 158 l 653 0 l 65 0 l 65 1305 l 980 1305 l 980 333 l 816 166 l 980 0 "},"Ö":{"x_min":65,"x_max":980,"ha":1045,"o":"m 65 0 l 65 1305 l 980 1305 l 980 0 l 65 0 m 963 17 l 963 1288 l 81 1288 l 81 17 l 963 17 m 731 1525 l 980 1525 l 980 1508 l 731 1508 l 731 1525 m 65 1525 l 314 1525 l 314 1508 l 65 1508 l 65 1525 "},"z":{"x_min":65,"x_max":980,"ha":1045,"o":"m 84 17 l 980 17 l 980 0 l 65 0 l 65 22 l 958 1288 l 65 1288 l 65 1305 l 980 1305 l 980 1288 l 84 17 "},"™":{"x_min":26,"x_max":810,"ha":1045,"o":"m 211 782 l 204 782 l 204 1298 l 26 1298 l 26 1305 l 392 1305 l 392 1298 l 211 1298 l 211 782 m 626 1068 l 451 1298 l 451 783 l 444 783 l 444 1305 l 451 1305 l 626 1075 l 803 1305 l 810 1305 l 810 783 l 803 783 l 803 1298 l 626 1068 "},"ã":{"x_min":0,"x_max":0,"ha":1361},"æ":{"x_min":0,"x_max":0,"ha":1361},"®":{"x_min":128,"x_max":914,"ha":1045,"o":"m 748 744 l 748 931 l 318 931 l 318 744 l 748 744 m 764 731 l 320 731 l 764 486 l 740 486 l 318 718 l 318 486 l 302 486 l 302 944 l 764 944 l 764 731 m 128 350 l 128 1054 l 522 1110 l 914 1054 l 914 350 l 522 297 l 128 350 m 898 364 l 898 1043 l 522 1095 l 144 1043 l 144 364 l 522 313 l 898 364 "},"É":{"x_min":21.5,"x_max":1019.109375,"ha":1045,"o":"m 485 272 l 88 272 l 88 245 l 379 245 l 485 272 m 54 145 l 177 21 l 888 21 l 993 184 l 777 230 l 729 315 l 54 145 m 21 152 l 319 229 l 72 229 l 72 289 l 537 289 l 741 340 l 797 243 l 1019 197 l 895 0 l 172 0 l 21 152 "},"~":{"x_min":0,"x_max":0,"ha":1361},"³":{"x_min":0,"x_max":0,"ha":1361},"¡":{"x_min":0,"x_max":0,"ha":1361},"[":{"x_min":196,"x_max":849.34375,"ha":1045,"o":"m 212 17 l 849 17 l 849 0 l 196 0 l 196 1305 l 849 1305 l 849 1288 l 212 1288 l 212 17 "},"L":{"x_min":65,"x_max":980.15625,"ha":1045,"o":"m 980 0 l 65 0 l 65 1305 l 81 1305 l 81 17 l 980 17 l 980 0 "}," ":{"x_min":0,"x_max":0,"ha":1045},"%":{"x_min":27,"x_max":1018,"ha":1045,"o":"m 27 808 l 27 1277 l 384 1277 l 384 808 l 27 808 m 32 1272 l 32 827 l 377 1272 l 32 1272 m 32 813 l 377 813 l 377 1256 l 32 813 m 661 28 l 661 497 l 1018 497 l 1018 28 l 661 28 m 668 492 l 668 47 l 1011 492 l 668 492 m 668 33 l 1011 33 l 1011 476 l 668 33 m 81 0 l 64 0 l 963 1305 l 979 1305 l 81 0 "},"P":{"x_min":65,"x_max":980,"ha":1045,"o":"m 963 733 l 963 1288 l 81 1288 l 81 733 l 963 733 m 81 0 l 65 0 l 65 1305 l 980 1305 l 980 716 l 81 716 l 81 0 "},"À":{"x_min":0,"x_max":0,"ha":1361},"_":{"x_min":65,"x_max":980,"ha":1045,"o":"m 65 17 l 980 17 l 980 0 l 65 0 l 65 17 "},"ñ":{"x_min":0,"x_max":0,"ha":1361},"+":{"x_min":65,"x_max":980,"ha":1045,"o":"m 514 716 l 65 716 l 65 732 l 514 732 l 514 1175 l 531 1175 l 531 732 l 980 732 l 980 716 l 531 716 l 531 241 l 514 241 l 514 716 "},"‚":{"x_min":0,"x_max":0,"ha":1361},"½":{"x_min":0,"x_max":0,"ha":1361},"Æ":{"x_min":8.265625,"x_max":1038.234375,"ha":1046,"o":"m 438 366 l 438 46 l 662 46 l 662 366 l 550 413 l 438 366 m 662 391 l 556 879 l 438 391 l 550 438 l 662 391 m 684 46 l 997 205 l 684 357 l 684 46 m 1038 205 l 662 5 l 438 5 l 8 205 l 417 382 l 556 972 l 684 382 l 1038 205 m 417 46 l 417 357 l 62 205 l 417 46 "},"Ë":{"x_min":18.859375,"x_max":930,"ha":1045,"o":"m 41 216 l 276 33 l 609 33 l 759 264 l 908 279 l 908 480 l 569 433 l 690 666 l 650 716 l 317 656 l 317 433 l 108 477 l 41 216 m 18 212 l 90 503 l 292 462 l 292 674 l 658 738 l 713 670 l 607 462 l 930 506 l 930 252 l 769 252 l 618 11 l 260 11 l 18 212 "},"'":{"x_min":435,"x_max":697,"ha":1045,"o":"m 451 1285 l 451 1005 l 588 1005 l 588 1105 l 680 1105 l 680 1285 l 451 1285 m 435 1305 l 697 1305 l 697 1088 l 604 1088 l 604 988 l 435 988 l 435 1305 "},"Š":{"x_min":0,"x_max":0,"ha":1361},"ª":{"x_min":0,"x_max":0,"ha":1361},"Œ":{"x_min":0,"x_max":0,"ha":1361},"ð":{"x_min":0,"x_max":0,"ha":1361},"T":{"x_min":65,"x_max":980,"ha":1045,"o":"m 528 0 l 511 0 l 511 1288 l 65 1288 l 65 1305 l 980 1305 l 980 1288 l 528 1288 l 528 0 "},"š":{"x_min":0,"x_max":0,"ha":1361},"Þ":{"x_min":0,"x_max":0,"ha":1361},"j":{"x_min":65.453125,"x_max":980.609375,"ha":1046,"o":"m 534 1288 l 534 1305 l 980 1305 l 980 0 l 494 0 l 65 437 l 87 437 l 498 17 l 964 17 l 964 1288 l 534 1288 "},"1":{"x_min":512,"x_max":528.609375,"ha":1046,"o":"m 528 1305 l 528 0 l 512 0 l 512 1305 l 528 1305 "},"›":{"x_min":261.1875,"x_max":668.59375,"ha":1045,"o":"m 261 1038 l 280 1038 l 668 724 l 280 408 l 261 408 l 649 724 l 261 1038 "},"ä":{"x_min":65,"x_max":980,"ha":1045,"o":"m 81 994 l 81 733 l 963 733 l 963 994 l 522 1289 l 81 994 m 980 0 l 963 0 l 963 716 l 81 716 l 81 0 l 65 0 l 65 1000 l 522 1305 l 980 1000 l 980 0 m 731 1525 l 980 1525 l 980 1508 l 731 1508 l 731 1525 m 65 1525 l 314 1525 l 314 1508 l 65 1508 l 65 1525 "},"<":{"x_min":503.765625,"x_max":980.296875,"ha":1045,"o":"m 958 0 l 503 716 l 958 1305 l 980 1305 l 528 716 l 980 0 l 958 0 "},"£":{"x_min":0,"x_max":0,"ha":1361},"¹":{"x_min":0,"x_max":0,"ha":1361},"t":{"x_min":65,"x_max":980,"ha":1045,"o":"m 528 0 l 511 0 l 511 1288 l 65 1288 l 65 1305 l 980 1305 l 980 1288 l 528 1288 l 528 0 "},"¬":{"x_min":0,"x_max":0,"ha":1361},"ù":{"x_min":0,"x_max":0,"ha":1361},"W":{"x_min":65,"x_max":980,"ha":1045,"o":"m 525 596 l 963 21 l 963 1304 l 980 1304 l 980 -1 l 963 -1 l 525 570 l 81 0 l 65 0 l 65 1305 l 81 1305 l 81 22 l 525 596 "},"ï":{"x_min":0,"x_max":0,"ha":1361},">":{"x_min":65.125,"x_max":533.671875,"ha":1045,"o":"m 65 0 l 511 716 l 65 1305 l 87 1305 l 533 716 l 87 0 l 65 0 "},"v":{"x_min":65.125,"x_max":980.296875,"ha":1045,"o":"m 958 1305 l 980 1305 l 528 0 l 511 0 l 65 1305 l 87 1305 l 519 25 l 958 1305 "},"û":{"x_min":0,"x_max":0,"ha":1361},"Ò":{"x_min":0,"x_max":0,"ha":1361},"&":{"x_min":54.5,"x_max":1016.84375,"ha":1045,"o":"m 148 704 l 379 533 l 291 255 l 521 428 l 754 255 l 665 533 l 897 704 l 610 704 l 521 981 l 433 704 l 148 704 m 54 733 l 410 733 l 521 1080 l 631 733 l 1016 733 l 701 519 l 811 172 l 521 387 l 232 172 l 342 519 l 54 733 "},"Ð":{"x_min":0,"x_max":0,"ha":1361},"I":{"x_min":65,"x_max":980,"ha":1045,"o":"m 528 1288 l 528 17 l 980 17 l 980 0 l 65 0 l 65 17 l 511 17 l 511 1288 l 65 1288 l 65 1305 l 980 1305 l 980 1288 l 528 1288 "},"ˉ":{"x_min":0,"x_max":0,"ha":1361},"G":{"x_min":65,"x_max":980,"ha":1045,"o":"m 980 1305 l 980 1132 l 963 1132 l 963 1288 l 81 1288 l 81 17 l 963 17 l 963 716 l 292 716 l 292 733 l 980 733 l 980 0 l 65 0 l 65 1305 l 980 1305 "},"`":{"x_min":435,"x_max":697,"ha":1045,"o":"m 451 1285 l 451 1005 l 588 1005 l 588 1105 l 680 1105 l 680 1285 l 451 1285 m 435 1305 l 697 1305 l 697 1088 l 604 1088 l 604 988 l 435 988 l 435 1305 "},"·":{"x_min":0,"x_max":0,"ha":1361},"r":{"x_min":65,"x_max":980,"ha":1045,"o":"m 963 733 l 963 1288 l 81 1288 l 81 733 l 963 733 m 980 716 l 86 716 l 980 0 l 955 0 l 81 697 l 81 0 l 65 0 l 65 1305 l 980 1305 l 980 716 "},"¿":{"x_min":0,"x_max":0,"ha":1361},"ý":{"x_min":0,"x_max":0,"ha":1361},"x":{"x_min":65.125,"x_max":980.296875,"ha":1045,"o":"m 958 0 l 519 696 l 87 0 l 65 0 q 152 139 93 44 l 455 625 q 511 716 509 710 l 65 1305 l 87 1305 l 519 735 l 958 1305 l 980 1305 l 528 716 l 980 0 l 958 0 "},"è":{"x_min":0,"x_max":0,"ha":1361},"º":{"x_min":0,"x_max":0,"ha":1361},"Ø":{"x_min":0,"x_max":0,"ha":1361},"μ":{"x_min":0,"x_max":0,"ha":1361},"÷":{"x_min":0,"x_max":0,"ha":1361},"h":{"x_min":65,"x_max":980,"ha":1045,"o":"m 980 1305 l 980 0 l 963 0 l 963 716 l 81 716 l 81 0 l 65 0 l 65 1305 l 81 1305 l 81 733 l 963 733 l 963 1305 l 980 1305 "},".":{"x_min":441,"x_max":697,"ha":1045,"o":"m 457 197 l 457 17 l 680 17 l 680 197 l 457 197 m 441 216 l 697 216 l 697 0 l 441 0 l 441 216 "},";":{"x_min":435,"x_max":697,"ha":1045,"o":"m 457 714 l 457 533 l 680 533 l 680 714 l 457 714 m 441 733 l 697 733 l 697 516 l 441 516 l 441 733 m 451 197 l 451 -83 l 588 -83 l 588 17 l 680 17 l 680 197 l 451 197 m 435 216 l 697 216 l 697 0 l 604 0 l 604 -100 l 435 -100 l 435 216 "},"f":{"x_min":65,"x_max":980.15625,"ha":1045,"o":"m 65 0 l 65 1305 l 980 1305 l 980 1288 l 81 1288 l 81 733 l 980 733 l 980 716 l 81 716 l 81 0 l 65 0 "},"“":{"x_min":0,"x_max":0,"ha":1361},"A":{"x_min":65,"x_max":980,"ha":1045,"o":"m 81 994 l 81 733 l 963 733 l 963 994 l 522 1288 l 81 994 m 980 0 l 963 0 l 963 716 l 81 716 l 81 0 l 65 0 l 65 1000 l 522 1305 l 980 1000 l 980 0 "},"6":{"x_min":65,"x_max":980,"ha":1045,"o":"m 81 716 l 81 17 l 963 17 l 963 716 l 81 716 m 81 733 l 980 733 l 980 0 l 65 0 l 65 1305 l 81 1305 l 81 733 "},"‘":{"x_min":0,"x_max":0,"ha":1361},"O":{"x_min":65,"x_max":980,"ha":1045,"o":"m 65 0 l 65 1305 l 980 1305 l 980 0 l 65 0 m 963 17 l 963 1288 l 81 1288 l 81 17 l 963 17 "},"n":{"x_min":65,"x_max":980,"ha":1045,"o":"m 980 1305 l 980 0 l 963 0 l 963 66 l 81 1221 l 81 0 l 65 0 l 65 1305 l 81 1305 l 81 1243 l 963 88 l 963 1305 l 980 1305 "},"3":{"x_min":65.453125,"x_max":980.609375,"ha":1046,"o":"m 964 733 l 964 1288 l 65 1288 l 65 1305 l 980 1305 l 980 0 l 65 0 l 65 17 l 964 17 l 964 716 l 65 716 l 65 733 l 964 733 "},"9":{"x_min":65,"x_max":980,"ha":1045,"o":"m 81 1288 l 81 733 l 963 733 l 963 1288 l 81 1288 m 65 1305 l 980 1305 l 980 0 l 963 0 l 963 716 l 65 716 l 65 1305 "},"l":{"x_min":65,"x_max":980.15625,"ha":1045,"o":"m 980 0 l 65 0 l 65 1305 l 81 1305 l 81 17 l 980 17 l 980 0 "},"¤":{"x_min":0,"x_max":0,"ha":1361},"4":{"x_min":65,"x_max":980,"ha":1045,"o":"m 980 1305 l 980 0 l 963 0 l 963 716 l 65 716 l 65 1305 l 81 1305 l 81 733 l 963 733 l 963 1305 l 980 1305 "},"p":{"x_min":65,"x_max":980,"ha":1045,"o":"m 963 733 l 963 1288 l 81 1288 l 81 733 l 963 733 m 81 0 l 65 0 l 65 1305 l 980 1305 l 980 716 l 81 716 l 81 0 "},"‡":{"x_min":0,"x_max":0,"ha":1361},"à":{"x_min":0,"x_max":0,"ha":1361},"Ü":{"x_min":65,"x_max":980,"ha":1045,"o":"m 963 1305 l 980 1305 l 980 0 l 65 0 l 65 1305 l 81 1305 l 81 17 l 963 17 l 963 1305 m 731 1525 l 980 1525 l 980 1508 l 731 1508 l 731 1525 m 65 1525 l 314 1525 l 314 1508 l 65 1508 l 65 1525 "},"ó":{"x_min":0,"x_max":0,"ha":1361}},"cssFontWeight":"normal","ascender":1526,"underlinePosition":-100,"cssFontStyle":"normal","boundingBox":{"yMin":-100,"xMin":0,"yMax":1525,"xMax":1038.234375},"resolution":1000,"original_font_information":{"postscript_name":"VectorBattle","version_string":"1.03","vendor_url":"","full_font_name":"Vector Battle","font_family_name":"Vector Battle","copyright":"© 1999 by ck! -- http://come.to/freakyfonts","description":"","trademark":"ck!, mail: ckrule@geocities.com","designer":"","designer_url":"","unique_font_identifier":"Vector Battle","license_url":"","license_description":"","manufacturer_name":"","font_sub_family_name":"Regular"},"descender":-114,"familyName":"Vector Battle","lineHeight":1638,"underlineThickness":50};
// http://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html
$.extend({
getUrlVars: function(){
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('#') + 1).split('&');
for(var i = 0; i < hashes.length; i++)
{
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
},
getUrlVar: function(name){
return $.getUrlVars()[name];
}
});
/*
Copyright (c) 2010 Doug McInnes
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
KEY_CODES = {
32: 'space',
37: 'left',
38: 'up',
39: 'right',
40: 'down',
71: 'g',
72: 'h',
77: 'm',
}
KEY_STATUS = { keyDown:false };
for (code in KEY_CODES) {
KEY_STATUS[KEY_CODES[code]] = false;
}
var chatting = false;
$(window).keydown(function (e) {
KEY_STATUS.keyDown = true;
if (KEY_CODES[e.keyCode]) {
e.preventDefault();
KEY_STATUS[KEY_CODES[e.keyCode]] = true;
}
}).keyup(function (e) {
KEY_STATUS.keyDown = false;
if (KEY_CODES[e.keyCode]) {
e.preventDefault();
KEY_STATUS[KEY_CODES[e.keyCode]] = false;
}
});
GRID_SIZE = 60;
var frefR = 'https://a-a.firebaseio-staging.com/';
var frefA = frefR + 'game';
var frefL = frefR + 'leaderboard';
// var frefR = 'https://mmoasteroids.firebaseio.com/';
// var frefA = 'https://mmoasteroids.firebaseio.com/game';
// var frefL = 'https://mmoasteroids.firebaseio.com/leaderboard';
// Firebase.enableLogging(true);
var asteroids = new Firebase(frefA);
var myship = asteroids.child('players').push();
myship.removeOnDisconnect();
// Leaderboard start
var LEADERBOARD_SIZE = 25;
// Should the leaderboard be global? Move it to delta?
var leaderboard = new Firebase(frefL);
var scoreListRef = leaderboard.child('scoreList');
var htmlForPath = {};
var currentUser = { name: "Guest" + Math.floor((10000 * Math.random())), type: 'guest', photo: null };
function updateName() {
if(currentUser.type == 'twitter') {
$('#my-name').text(currentUser.name);
}
else {
$('#my-name').text(currentUser.name);
}
}
updateName();
/*twttr.anywhere(function (T) {
if(T.isConnected()) {
currentUser = { name: T.currentUser.data('screen_name'), type: 'twitter', photo: T.currentUser.data('profile_image_url') };
$('#login').remove();
}
updateName();
T.bind("authComplete", function (e, user) {
currentUser = { name: user.data('screen_name'), type: 'twitter', photo: user.data('profile_image_url') };
$('#login').remove();
updateName();
});
});*/
function handleScoreAdded(scoreSnapshot, lowerScoreName) {
var newScoreRow = $("<tr/>");
var postedScore = scoreSnapshot.val();
if(postedScore.user.type == 'twitter') {
newScoreRow.append($("<td/>").text(postedScore.score)); newScoreRow.append($("<td/>").append($("<strong/>").text(postedScore.user.name)));
}
else {
newScoreRow.append($("<td/>").text(postedScore.score));
newScoreRow.append($("<td/>").append($("<strong/>").text(postedScore.user.name)));
}
// Store a reference to the table row so we can get it again later.
htmlForPath[scoreSnapshot.name()] = newScoreRow;
// Insert the new score in the appropriate place in the GUI.
if (lowerScoreName === null) {
$("#leaderboardTable").append(newScoreRow);
}
else {
var lowerScoreRow = htmlForPath[lowerScoreName];
lowerScoreRow.before(newScoreRow);
}
}
function handleScoreRemoved(scoreSnapshot) {
var removedScoreRow = htmlForPath[scoreSnapshot.name()];
removedScoreRow.remove();
delete htmlForPath[scoreSnapshot.name()];
}
var scoreListView = scoreListRef.limit(LEADERBOARD_SIZE);
scoreListView.on('child_added', function (newScoreSnapshot, prevScoreName) {
handleScoreAdded(newScoreSnapshot, prevScoreName);
});
scoreListView.on('child_removed', function (oldScoreSnapshot) {
handleScoreRemoved(oldScoreSnapshot);
});
var changedCallback = function (scoreSnapshot, prevScoreName) {
handleScoreRemoved(scoreSnapshot);
handleScoreAdded(scoreSnapshot, prevScoreName);
};
scoreListView.on('child_moved', changedCallback);
scoreListView.on('child_changed', changedCallback);
function setScore(score) {
Game.score = score;
updateScore();
}
function deltaScore(score) {
Game.score += score;
updateScore();
}
function updateScore() {
$("#my-score").html(Game.score);
}
// Leaderboard end
Matrix = function (rows, columns) {
var i, j;
this.data = new Array(rows);
for (i = 0; i < rows; i++) {
this.data[i] = new Array(columns);
}
this.configure = function (rot, scale, transx, transy) {
var rad = (rot * Math.PI)/180;
var sin = Math.sin(rad) * scale;
var cos = Math.cos(rad) * scale;
this.set(cos, -sin, transx,
sin, cos, transy);
};
this.set = function () {
var k = 0;
for (i = 0; i < rows; i++) {
for (j = 0; j < columns; j++) {
this.data[i][j] = arguments[k];
k++;
}
}
}
this.multiply = function () {
var vector = new Array(rows);
for (i = 0; i < rows; i++) {
vector[i] = 0;
for (j = 0; j < columns; j++) {
vector[i] += this.data[i][j] * arguments[j];
}
}
return vector;
};
};
Sprite = function () {
this.init = function (name, points) {
this.name = name;
this.points = points;
this.vel = {
x: 0,
y: 0,
rot: 0
};
this.acc = {
x: 0,
y: 0,
rot: 0
};
};
this.children = {};
this.visible = false;
this.reap = false;
this.bridgesH = true;
this.bridgesV = true;
this.collidesWith = [];
this.x = 0;
this.y = 0;
this.rot = 0;
this.scale = 1;
this.currentNode = null;
this.nextSprite = null;
this.preMove = null;
this.postMove = null;
this.strokeStyle = "#000000";
this.run = function(delta) {
this.move(delta);
this.updateGrid();
this.context.save();
this.configureTransform();
this.draw();
var canidates = this.findCollisionCanidates();
this.matrix.configure(this.rot, this.scale, this.x, this.y);
this.checkCollisionsAgainst(canidates);
this.context.restore();
if (this.bridgesH && this.currentNode && this.currentNode.dupe.horizontal) {
this.x += this.currentNode.dupe.horizontal;
this.context.save();
this.configureTransform();
this.draw();
this.checkCollisionsAgainst(canidates);
this.context.restore();
if (this.currentNode) {
this.x -= this.currentNode.dupe.horizontal;
}
}
if (this.bridgesV && this.currentNode && this.currentNode.dupe.vertical) {
this.y += this.currentNode.dupe.vertical;
this.context.save();
this.configureTransform();
this.draw();
this.checkCollisionsAgainst(canidates);
this.context.restore();
if (this.currentNode) {
this.y -= this.currentNode.dupe.vertical;
}
}
if (this.bridgesH && this.bridgesV &&
this.currentNode &&
this.currentNode.dupe.vertical &&
this.currentNode.dupe.horizontal) {
this.x += this.currentNode.dupe.horizontal;
this.y += this.currentNode.dupe.vertical;
this.context.save();
this.configureTransform();
this.draw();
this.checkCollisionsAgainst(canidates);
this.context.restore();
if (this.currentNode) {
this.x -= this.currentNode.dupe.horizontal;
this.y -= this.currentNode.dupe.vertical;
}
}
};
this.move = function (delta) {
if (!this.visible) return;
this.transPoints = null; // clear cached points
if ($.isFunction(this.preMove)) {
this.preMove(delta);
}
this.vel.x += this.acc.x * delta;
this.vel.y += this.acc.y * delta;
this.x += this.vel.x * delta;
this.y += this.vel.y * delta;
this.rot += this.vel.rot * delta;
if (this.rot > 360) {
this.rot -= 360;
} else if (this.rot < 0) {
this.rot += 360;
}
if ($.isFunction(this.postMove)) {
this.postMove(delta);
}
};
this.updateGrid = function () {
if (!this.visible) return;
var gridx = Math.floor(this.x / GRID_SIZE);
var gridy = Math.floor(this.y / GRID_SIZE);
gridx = (gridx >= this.grid.length) ? 0 : gridx;
gridy = (gridy >= this.grid[0].length) ? 0 : gridy;
gridx = (gridx < 0) ? this.grid.length-1 : gridx;
gridy = (gridy < 0) ? this.grid[0].length-1 : gridy;
var newNode = this.grid[gridx][gridy];
if (newNode != this.currentNode) {
if (this.currentNode) {
this.currentNode.leave(this);
}
newNode.enter(this);
this.currentNode = newNode;
}
if (KEY_STATUS.g && this.currentNode) {
this.context.lineWidth = 3.0;
this.context.strokeStyle = 'green';
this.context.strokeRect(gridx*GRID_SIZE+2, gridy*GRID_SIZE+2, GRID_SIZE-4, GRID_SIZE-4);
this.context.strokeStyle = 'black';
this.context.lineWidth = 1.0;
}
};
this.configureTransform = function () {
if (!this.visible) return;
var rad = (this.rot * Math.PI)/180;
this.context.translate(this.x, this.y);
this.context.rotate(rad);
this.context.scale(this.scale, this.scale);
};
this.draw = function () {
if (!this.visible) return;
this.context.lineWidth = 1.5 / this.scale;
for (child in this.children) {
this.children[child].draw();
}
this.context.beginPath();
this.context.moveTo(this.points[0], this.points[1]);
for (var i = 1; i < this.points.length/2; i++) {
var xi = i*2;
var yi = xi + 1;
this.context.lineTo(this.points[xi], this.points[yi]);
}
this.context.closePath();
this.context.strokeStyle = this.strokeStyle;
this.context.stroke();
};
this.findCollisionCanidates = function () {
if (!this.visible || !this.currentNode) return [];
var cn = this.currentNode;
var canidates = [];
if (cn.nextSprite) canidates.push(cn.nextSprite);
if (cn.north.nextSprite) canidates.push(cn.north.nextSprite);
if (cn.south.nextSprite) canidates.push(cn.south.nextSprite);
if (cn.east.nextSprite) canidates.push(cn.east.nextSprite);
if (cn.west.nextSprite) canidates.push(cn.west.nextSprite);
if (cn.north.east.nextSprite) canidates.push(cn.north.east.nextSprite);
if (cn.north.west.nextSprite) canidates.push(cn.north.west.nextSprite);
if (cn.south.east.nextSprite) canidates.push(cn.south.east.nextSprite);
if (cn.south.west.nextSprite) canidates.push(cn.south.west.nextSprite);
return canidates
};
this.checkCollisionsAgainst = function (canidates) {
for (var i = 0; i < canidates.length; i++) {
var ref = canidates[i];
do {
this.checkCollision(ref);
ref = ref.nextSprite;
} while (ref)
}
};
this.checkCollision = function (other) {
if (!other.visible ||
this == other ||
this.collidesWith.indexOf(other.name) == -1) return;
var trans = other.transformedPoints();
var px, py;
var count = trans.length/2;
for (var i = 0; i < count; i++) {
px = trans[i*2];
py = trans[i*2 + 1];
// mozilla doesn't take into account transforms with isPointInPath >:-P
if (($.browser.mozilla) ? this.pointInPolygon(px, py) : this.context.isPointInPath(px, py)) {
other.collision(this);
this.collision(other);
return;
}
}
};
this.pointInPolygon = function (x, y) {
var points = this.transformedPoints();
var j = 2;
var y0, y1;
var oddNodes = false;
for (var i = 0; i < points.length; i += 2) {
y0 = points[i + 1];
y1 = points[j + 1];
if ((y0 < y && y1 >= y) ||
(y1 < y && y0 >= y)) {
if (points[i]+(y-y0)/(y1-y0)*(points[j]-points[i]) < x) {
oddNodes = !oddNodes;
}
}
j += 2
if (j == points.length) j = 0;
}
return oddNodes;
};
this.collision = function () {
};
this.die = function () {
this.visible = false;
this.reap = true;
if (this.currentNode) {
this.currentNode.leave(this);
this.currentNode = null;
}
};
this.transformedPoints = function () {
if (this.transPoints) return this.transPoints;
var trans = new Array(this.points.length);
this.matrix.configure(this.rot, this.scale, this.x, this.y);
for (var i = 0; i < this.points.length/2; i++) {
var xi = i*2;
var yi = xi + 1;
var pts = this.matrix.multiply(this.points[xi], this.points[yi], 1);
trans[xi] = pts[0];
trans[yi] = pts[1];
}
this.transPoints = trans; // cache translated points
return trans;
};
this.isClear = function () {
if (this.collidesWith.length == 0) return true;
var cn = this.currentNode;
if (cn == null) {
var gridx = Math.floor(this.x / GRID_SIZE);
var gridy = Math.floor(this.y / GRID_SIZE);
gridx = (gridx >= this.grid.length) ? 0 : gridx;
gridy = (gridy >= this.grid[0].length) ? 0 : gridy;
cn = this.grid[gridx][gridy];
}
return (cn.isEmpty(this.collidesWith) &&
cn.north.isEmpty(this.collidesWith) &&
cn.south.isEmpty(this.collidesWith) &&
cn.east.isEmpty(this.collidesWith) &&
cn.west.isEmpty(this.collidesWith) &&
cn.north.east.isEmpty(this.collidesWith) &&
cn.north.west.isEmpty(this.collidesWith) &&
cn.south.east.isEmpty(this.collidesWith) &&
cn.south.west.isEmpty(this.collidesWith));
};
this.wrapPostMove = function () {
if (this.x > Game.canvasWidth) {
this.x = 0;
} else if (this.x < 0) {
this.x = Game.canvasWidth;
}
if (this.y > Game.canvasHeight) {
this.y = 0;
} else if (this.y < 0) {
this.y = Game.canvasHeight;
}
};
};
Ship = function () {
this.init("ship",
[-5, 4,
0, -12,
5, 4]);
this.scale = 1.5;
this.children.exhaust = new Sprite();
this.children.exhaust.strokeStyle = "#ff0000";
this.children.exhaust.init("exhaust",
[-3, 6,
0, 11,
3, 6]);
this.bulletCounter = 0;
this.strokeStyle = "#ffff00";
this.keyFrame = 0;
this.postMove = this.wrapPostMove;
this.collidesWith = ["enemybullet", "enemyship"];
this.previousKeyFrame = { vel: { rot: 0 }, accb: false };
this.preMove = function (delta) {
if (KEY_STATUS.left) {
this.vel.rot = -5;
} else if (KEY_STATUS.right) {
this.vel.rot = 5;
} else {
this.vel.rot = 0;
}
if (KEY_STATUS.up) {
var rad = ((this.rot-90) * Math.PI)/180;
this.acc.x = 0.5 * Math.cos(rad);
this.acc.y = 0.5 * Math.sin(rad);
this.children.exhaust.visible = Math.random() > 0.1;
} else {
this.acc.x = 0;
this.acc.y = 0;
this.children.exhaust.visible = false;
}
if (this.bulletCounter > 0) {
this.bulletCounter -= delta;
}
if (KEY_STATUS.space) {
if (this.bulletCounter <= 0) {
this.bulletCounter = 10; // XXX
for (var i = 0; i < this.bullets.length; i++) {
if (!this.bullets[i].visible) {
SFX.laser();
var bullet = this.bullets[i];
var rad = ((this.rot-90) * Math.PI)/180;
var vectorx = Math.cos(rad);
var vectory = Math.sin(rad);
// move to the nose of the ship
bullet.x = this.x + vectorx * 4;
bullet.y = this.y + vectory * 4;
bullet.vel.x = 6 * vectorx + this.vel.x;
bullet.vel.y = 6 * vectory + this.vel.y;
bullet.visible = true;
bullet.fref = asteroids.child('bullets').push({s: myship.name(), x: bullet.x, y: bullet.y, vel: bullet.vel});
bullet.fref.removeOnDisconnect();
break;
}
}
}
}
// limit the ship's speed
if (Math.sqrt(this.vel.x * this.vel.x + this.vel.y * this.vel.y) > 8) {
this.vel.x *= 0.95;
this.vel.y *= 0.95;
}
if((this.vel.rot != this.previousKeyFrame.vel.rot) || (KEY_STATUS.up != this.previousKeyFrame.accb)) {
myship.set({ship: {acc: this.acc, vel: this.vel, x: this.x, y: this.y, rot: this.rot, accb: KEY_STATUS.up }, user: currentUser });
}
this.previousKeyFrame = { vel: { rot: this.vel.rot }, accb: KEY_STATUS.up };
this.keyFrame++;
if(this.keyFrame % 60 == 0) {
myship.set({ship: {acc: this.acc, vel: this.vel, x: this.x, y: this.y, rot: this.rot, accb: KEY_STATUS.up }, user: currentUser });
}
};
this.collision = function (other) {
SFX.explosion();
if(other != null) {
Game.explosionAt(other.x, other.y);
}
else {
Game.explosionAt(Game.ship.x, Game.ship.y);
}
Game.FSM.state = 'player_died';
this.visible = false;
if(this.currentNode != null) {
this.currentNode.leave(this);
}
this.currentNode = null;
Game.lives--;
if (other != null && other.name == "enemyship") deltaScore(Math.floor(100 * Math.random()));
};
};
Ship.prototype = new Sprite();
EnemyShip = function () {
this.init("enemyship",
[-5, 4,
0, -12,
5, 4]);
this.children.exhaust = new Sprite();
this.children.exhaust.strokeStyle = "#ff0000";
this.children.exhaust.init("exhaust",
[-3, 6,
0, 11,
3, 6]);
this.scale = 1.5;
this.bulletCounter = 0;
this.strokeStyle = "#ffffff";
this.postMove = this.wrapPostMove;
this.collidesWith = ["bullet"];
this.draw = function () {
if (!this.visible) return;
this.context.lineWidth = 1.5 / this.scale;
for (child in this.children) {
this.children[child].draw();
}
this.context.beginPath();
this.context.moveTo(this.points[0], this.points[1]);
for (var i = 1; i < this.points.length/2; i++) {
var xi = i*2;
var yi = xi + 1;
this.context.lineTo(this.points[xi], this.points[yi]);
}
this.context.closePath();
this.context.strokeStyle = this.strokeStyle;
if(this.eimg != null) {
this.context.drawImage(this.eimg, 0, 0, 20, 20);
}
this.context.stroke();
};
this.preMove = function (delta) {
// limit the ship's speed
if (Math.sqrt(this.vel.x * this.vel.x + this.vel.y * this.vel.y) > 8) {
this.vel.x *= 0.95;
this.vel.y *= 0.95;
}
if(this.accb) {
var rad = ((this.rot-90) * Math.PI)/180;
this.acc.x = 0.5 * Math.cos(rad);
this.acc.y = 0.5 * Math.sin(rad);
this.children.exhaust.visible = Math.random() > 0.1;
}
else {
this.acc.x = 0;
this.acc.y = 0;
this.children.exhaust.visible = false;
}
};
this.collision = function (other) {
SFX.explosion();
Game.explosionAt(other.x, other.y);
this.fref.remove();
this.visible = false;
this.currentNode.leave(this);
this.currentNode = null;
//Game.lives--;
};
};
EnemyShip.prototype = new Sprite();
Bullet = function () {
this.init("bullet", [0, 0]);