summaryrefslogtreecommitdiff
path: root/SunkenMoon.html
blob: a3a352e4864f7b94453cbc6a46c6bde0914bad7a (plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
<!DOCTYPE html>
<html lang="en" manifest="SunkenMoon.appcache" style="height:100%"><head><meta charset="utf-8"><meta name="viewport" content="width=480, user-scalable=no"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="mobile-web-app-capable" content="yes"><link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAIAEBAAAAEACABoBQAAJgAAACAgAAABABgAqAwAAI4FAAAoAAAAEAAAACAAAAABAAgAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAKCcrAHx1eACOipIAExUaAHGChAADAAAAMSAoAPfz8ADi4NwAeHqHAFZQUwABBgkAztHLAIB8ewC8t70A5uTfABoaIABcXFwA7OroAJagngDt7egAmKCeAExKSwCHhY0A3NrUAI+GhwChm6EAZWJlAH5zcwCNipMAPTpAACgnLABIW1oA9vLuAGlkYgBPVVoAU1FXABYVGwAUGBsA5ODdABYYGwArLDIARj1AAFZbWgAGCg0ABhANAB0eJADCwcEA2tnJAISJiADw7OYAY1tjAHd1cQChm6IAxsrKALa1uQB+eHoABQMCAF1MUgBBQ0EAqaGrABgaIgAxLyoAQkJHAFNcXgAaGiIAQ0NKAIV/fQC6xr8AvsHCAJiTnQBxanUAPVJTAB8hJQB0cW8Admp1AMLHwgB+aWkAiISMADg0OQB2bngAr7W6AGuKhAApJy4AUVJTAODi3ADe498AQTpCACoqLgB6eoEAGBgdAObj3wD79vMAlo+SAM7UzgC9vbcAgn57AODq6wAaHCAAgH+HAK+nowBcVVwACggJAH6GigAwMzcACAoPAPDo5QDw7OgAEQsSAPHt6wAfKSwAEhMYAHpzfwBlaGgAsb3BAAAEBwC+s7UA0NLJAFdUWgAoNTUACgQHAM7Y0gCRmJwAlpKcAHFtdwBvc3cANDQ7ACAhJwAiIScAkX9/ACYjGwB2cXEAYF1jAHdxcQB+mIsAt6+qAIyGiwDV4OEAdHV9APPw7AB6dncAfHZ3AC4jJACzub8AU1BYAMrSygBMXl4ART4+A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IBcaIxgaIxsbIxwcJR4eJyMjKyknMCAgKSAhKCgmLysqMicuNC42Ozg4Pz0+RD4+RkNCTkJBT3t3eHRwcnBub3FwbnNxcXRxclJVWA8XGggOEggOEQ0QFg8SHBETHRETHRQWIBQWIBgcIxwdJBwdJB4fJx4fJhscIx0fJh0eJiAgKCUjKy8rNDYxOjk0PTg0OzM4PjM3PoJ3eXx4eHZycnNwcHNwb3Nwb3NxcGBiYhEgHgcVFgsTGRASHRIUHRMVIBcYIhocIxsdJRweJRweJRsdJBseJSAfKCAgKB0eJh0eJiAfJyMhKDEtNjk0PDcxOjMxOS4tNoN5en57fHl0enZxdHRxcXRxcHRycHl1dm1qbi04OBEaHg8SHBETHRQWIBocIxwdJBweJhwfJh0gJx4gKB8gKB8gKB8gKB8gKB8gJx4fJh8gKCkoMDEuNzAuNiIsMiErMYV7fIN9foR9fnx4eXh1dndzdHZzcnl1dHhzdnZzclRUVxseJxMWIBYYIhgcIxwdJR0eJR0gJx8gKCAhKSEiKSEiKSEiKCEiKCEiKSEiKSEiKSEiKicmLycnLyAoLR8oLX10dn55e4N9fXp1dnh0dXh0dXdzcXVycnVxcnRubnBqcmFgaUFETSImLRocIxweJhwfJR4fKB4gKBwdJhweJh0fJyIkKyIkKiEjKiEjKh8hKCAiKCMkKiIkKiQlLCQlLGpkZW5tbHVycXRxcW9tbXBubm1samlpaGtpamxnaWtjbWZjbGFgaVxVXkI8RCQkLB8gKB8gKR8hKBweJh0eJx0fJxweJh8hKCEiKh8hKRwdJRwdJh8gKB4gKCIjKiIjKgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"><title>Vilma, the happy Vaquita - Sunken Moon</title></head><body style="margin:0;border:0;padding:0;height:100%;width:100%;background:black"><div style="visibility:hidden;position:absolute"><img id="pixyvaquita" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAeCAYAAABuUU38AAAFWElEQVRYw+2WX0gcVxTGv7l3Zmd2drs6aHaNW7Jd88cYDaQYI1jsQ5GSh1BCAhUsNQ/JWxT6lLKExISCQkBECoW+6IMJEknaIEKQbKXJ5iFY6mKsEhOkk6qbRTe67szs7M7szvQhydKWhibEbQn1B/M2557z3e/ecy6wxRZbbLHFFv8hZ86ccYVCIe/rxkUiEXckEnFvVh3M6wZMTk7un56eHkkkEnsJIdA0DZRSuFwumKbZqSjKRHd399zL4sfHx9l4PL7TMIw5AGR4eLh0YmJi402FkFf9cXZ2tv7SpUv2zZs378fj8b2WZcE0TRDybAnTNKHr+tcOh2N2ZGTk4Iu4vr6+P22Wqqo1uVzuQSwWI4uLi5AkqfJlOdva2pj+/v7tFy5cIJviiKIort7eXlUURei6DgAwDAMOhwPZbBZPnz5FSUkJBEGAruvgOA48z8Plcj14/Pjx516vVxcEQVlZWflsx44d3clkEplMBrZtI5PJHPR4PFlK6dK5c+eSf8z76NGjytHR0eXa2tomlmUftLS0rL+RkBs3bhycn5//CQCSySSOHDkCv98Py7JAKYWu68hkMlhYWMDDhw8Rj8fhcrlg2zYMw/hZkiSNYRhKCPlAVdWCYJZlQSlFPp/v4jhOIYT8ePbs2WgikRB7enp2+ny++06nE36/v/7YsWNTb+RIOByWotHoGsuyiMViOH36NAAgn8+jo6MDtm2jv78fDMNA0zRYloV79+4hlUpBUZRnSRgGhmGgpKQEAGDbNhiGQT6fRz6fh2VZ4DgOlFIQQpDNZpFOpwEAHo8HlmXBtm2Iong1n89fDYVC3/+1TvYV7saHuVwO2WwW5eXlAACHw4HW1lbcuXMHPM/j1KlTGBoawp49exCNRtHc3AyPx4PBwUGkUinkcjmwLItkMlkQJkkSqqurwTAM5ubmkMlkYJomTNOEYRiglKK6uhqGYUCSJDyvoRXARwC+f+3LnkqlPgUAXddx9OhRiK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L49pErrN2UlLSU5CIBJm/4fMoxmDXmoJaezwA0TfB18mjz5wbJZKYmJgA0N/xlFYqlRH6ANI35kaJEMQZGQco8kRfUPrE3TgRfUDcRMxdEOEa2uv0eL+FcVdEtNBf/i+5aS53QeSmMV+Y757InZRZh0X+BYR+fj33yDXSAAAAAElFTkSuQmCC"><img id="happybubble0" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAlElEQVQYV32QzQ2DMAyFn2GUCvFzyC54jF67AAsgboxBdskhUDFLSfOjJBSJ+mRbn56fHyGWNk8UqNJ8YEdHs5vJL1czWkCiXkSC3qxwoEdLL4JTKKECQCpBMAIO/EAQNjOhWXZoZnRy8JDuh9BbcOMqQz8qUe8KrfzIp2zXSpmVzp4iGIHk6d931rSLIUTgzd7n9AU5+Eu6k4Zb7QAAAABJRU5ErkJggg=="><img id="grumpybubble0" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAACiklEQVQoU52Tz0tUURTHP2/em9EZf4yOM+r4K00xrSwcN4ZWtIuSjJCiIKj+gFYWaBC1DoQgiGgRVCRJbYJyVVRouhpJKw2l/K0z4+9y1Jn3fJ03masW0d3ce+6553u+53zPVcBUQDGRVUX8kIFWHwPvBjjEYYhDTYKYA+ZU9K4B7O+tt1ac+K2gpcw47ool8GRjeAuJFLnQXQqqbmJoUbToBL7xMOpcBizYWR4aIGMxEVyBecAGTQvwMcDM6DmCZRorKXbsRpy4qpO++oTASBB/sQf2b8KzIZQexaIaRksXFM8pBjeO0L9uoBs6RoLcCqvrNmxKMoWZ79jl7KTUKnHeh/5D2Y3ZqmFMFhAerWW8wkvUnUW0T2F5EeyOQYpSbRjuSiYzf5K63EH17CTZJTpqvlKG2RZgOnSCvkgLx28IarcdM/k8fe1Cj0cELsimybmylXuXUikobKcm/yu5mUoh5p06JhZO0hW5wtlmoW/Rsl0k2CzE9YcE2uTCK3dKC3cbPWRUPudgXi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HwrgvSfWIKpIAx8TB9vtxktnzs8/r31qDRROD9jPv0laJ2ng30P9444yMni5DbSOQiQQQno2i+LSEvhbOjE0NA1nfiaUrAGxrjvikMfANnempJES+N6bVv9YPjHwc+KQ23B6oB+HVueit28MTcFpHCgRk5niQAf/RHZLT0oaKYHvNXShYicJtLeK7QzoNWrU/O6dX36nuBBmMBj1jmPFhlwo1QzSq04lrZM0cGEPXdqxjejH+hDlBPBRyZQC3uEJGB168boDRKwCay4Ldi4Iyp0JR21TUlpJgeKV4rn1+SSncCUMfBgzf0yAC0UgWJzgFRR4saOUgaDYPTEwtBrOtSyMZjtsbx1LqJcQEM9Mz97ytwNtVyoVKj2srA5COALt01vgeu3gP3ztu18mXE+HWKAzsLkcYk0I4o1zw1H9tbweimeo+/VyouEGQYsVgLEgFBs3IetAdVyha9u3kLneLqh1aTB4TLAXPALbm1+k3tRLfYxf27qB2PIcUPv8CNtceKi2IWHSUo9RE0MwGQWYdr4K5+b4X5YJiRYak45L4btbqeEJBJ0GnuPfp8Txy7OrGjWPFmXm1dQXx3vplMgkgp6Du4h29A4U3AyyTib3d7BU2gvXUjbUWVFCWC0F5wcXUt6bjLF/hTQZ4cUwy4YSpbec0P8uob8AGyqPNPk8QBcAAAAASUVORK5CYII="></div><div style="display:table;width:100%;max-width:100%;height:100%;margin:0;border:0;padding:0"><div style="display:table-cell;vertical-align:middle;width:100%;margin:0;border:0;padding:0;text-align:center"><div style="position:relative;display:inline-block" width="480" height="720"><canvas width="480" height="720"></canvas><header style="position:absolute;top:0;left:0;font-size:14px;width:100%;color:black"><span>Vilma, the happy Vaquita - Sunken Moon v0.1.800</span><span> - </span><a target="_blank" href="index.html">Save Vaqitas</a><div style="text-align:right" id="fps"></div></header></div></div></div><script type="text/javascript">gameObjects=null;</script><script type="text/javascript">__hasProp = {}.hasOwnProperty; __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };</script><script type="text/javascript">var jaws=function(t){function e(e){t.mouse_x=e.pageX||e.clientX,t.mouse_y=e.pageY||e.clientY;var i=t.canvas?t.canvas:t.dom;t.mouse_x-=i.offsetLeft,t.mouse_y-=i.offsetTop}var i,s;return t.SpriteList=function(){throw"To use SpriteList() you need to include src/extras/sprite_list.js"},t.Audio=function(){throw"To use jaws.Audio() you need to include src/extras/audio.js"},t.title=function(e){return t.isString(e)?e?i.innerHTML=e:i.innerHTML:void t.log.error("jaws.title: Passed in value is not a String.")},t.unpack=function(){var e=["Sprite","SpriteList","Animation","SpriteSheet","Parallax","pressed","QuadTree"];e.forEach(function(e){window[e]?t.log.warn("jaws.unpack: "+e+" already exists in global namespace."):window[e]=t[e]})},t.log=function(e,i){t.isString(e)||(e=JSON.stringify(e)),t.log.on&&(s&&t.log.use_log_element&&(i?s.innerHTML+=e+"<br />":s.innerHTML=e),console.log&&t.log.use_console&&console.log("JawsJS: ",e))},t.log.on=!0,t.log.use_console=!1,t.log.use_log_element=!0,t.log.warn=function(e){console.warn&&t.log.use_console&&t.log.on?console.warn(e):t.log("[WARNING]: "+JSON.stringify(e),!0)},t.log.error=function(e){console.error&&t.log.use_console&&t.log.on?console.error(e):t.log("[ERROR]: "+JSON.stringify(e),!0)},t.log.info=function(e){console.info&&t.log.use_console&&t.log.on?console.info(e):t.log("[INFO]: "+JSON.stringify(e),!0)},t.log.debug=function(e){console.debug&&t.log.use_console&&t.log.on?console.debug(e):t.log("[DEBUG]: "+JSON.stringify(e),!0)},t.log.clear=function(){s&&(s.innerHTML=""),console.clear&&console.clear()},t.init=function(o){i=document.getElementsByTagName("title")[0],t.url_parameters=t.getUrlParameters(),t.canvas=document.getElementsByTagName("canvas")[0],t.canvas||(t.dom=document.getElementById("canvas")),t.canvas?t.context=t.canvas.getContext("2d"):t.dom?t.dom.style.position="relative":(t.canvas=document.createElement("canvas"),t.canvas.width=o.width,t.canvas.height=o.height,t.context=t.canvas.getContext("2d"),document.body.appendChild(t.canvas)),s=document.getElementById("jaws-log"),t.url_parameters.debug&&(s||(s=document.createElement("div"),s.id="jaws-log",s.style.cssText="overflow: auto; color: #aaaaaa; width: 300px; height: 150px; margin: 40px auto 0px auto; padding: 5px; border: #444444 1px solid; clear: both; font: 10px verdana; text-align: left;",document.body.appendChild(s))),t.url_parameters.bust_cache&&(t.log.info("Busting cache when loading assets"),t.assets.bust_cache=!0),t.context&&t.useCrispScaling(),t.width=t.canvas?t.canvas.width:t.dom.offsetWidth,t.height=t.canvas?t.canvas.height:t.dom.offsetHeight,t.mouse_x=0,t.mouse_y=0,window.addEventListener("mousemove",e)},t.useCrispScaling=function(){t.context.imageSmoothingEnabled=!1,t.context.webkitImageSmoothingEnabled=!1,t.context.mozImageSmoothingEnabled=!1},t.useSmoothScaling=function(){t.context.imageSmoothingEnabled=!0,t.context.webkitImageSmoothingEnabled=!0,t.context.mozImageSmoothingEnabled=!0},t.start=function(e,i,s){function o(e,s){t.log.info(s+"%: "+e,!0),i.loading_screen&&t.assets.displayProgress(s)}function n(e,i){t.log.info(i+"%: Error loading asset "+e,!0)}function a(){t.log.info("all assets loaded",!0),t.switchGameState(e||window,{fps:r},s)}i||(i={});var r=i.fps||60;return void 0===i.loading_screen&&(i.loading_screen=!0),i.width||(i.width=500),i.height||(i.height=300),t.init(i),t.isFunction(e)||t.isObject(e)?t.isObject(s)||void 0===s?(i.loading_screen&&t.assets.displayProgress(0),t.log.info("setupInput()",!0),t.setupInput(),t.log.info("assets.loadAll()",!0),void(t.assets.length()>0?t.assets.loadAll({onprogress:o,onerror:n,onload:a}):a())):void t.log.error("jaws.start: The setup options for the game state is not an object."):void t.log.error("jaws.start: Passed in GameState is niether function or object")},t.switchGameState=function(e,i,s){if(void 0===i&&(i={}),t.isFunction(e)&&(e=new e),!t.isObject(e))return void t.log.error("jaws.switchGameState: Passed in GameState should be a Function or an Object.");var o=i&&i.fps||t.game_loop&&t.game_loop.fps||60,n=i.setup;t.game_loop&&t.game_loop.stop(),t.clearKeyCallbacks(),t.previous_game_state=t.game_state,t.game_state=e,t.game_loop=new t.GameLoop(e,{fps:o,setup:n},s),t.game_loop.start()},t.imageToCanvas=function(e){if(t.isCanvas(e))return e;if(!t.isImage(e))return void t.log.error("jaws.imageToCanvas: Passed in object is not an Image.");var i=document.createElement("canvas");i.src=e.src,i.width=e.width,i.height=e.height;var s=i.getContext("2d");return s.drawImage(e,0,0,e.width,e.height),i},t.forceArray=function(t){return Array.isArray(t)?t:[t]},t.clear=function(){t.context.clearRect(0,0,t.width,t.height)},t.fill=function(e){t.context.fillStyle=e,t.context.fillRect(0,0,t.width,t.height)},t.draw=function(){var e=arguments;1==e.length&&t.isArray(e[0])&&(e=e[0]);for(var i=0;i<e.length;i++)t.isArray(e[i])?t.draw(e[i]):e[i].draw&&e[i].draw()},t.update=function(){var e=arguments;1==e.length&&t.isArray(e[0])&&(e=e[0]);for(var i=0;i<e.length;i++)t.isArray(e[i])?t.update(e[i]):e[i].update&&e[i].update()},t.isImage=function(t){return"[object HTMLImageElement]"===Object.prototype.toString.call(t)},t.isCanvas=function(t){return"[object HTMLCanvasElement]"===Object.prototype.toString.call(t)},t.isDrawable=function(e){return t.isImage(e)||t.isCanvas(e)},t.isString=function(t){return"string"==typeof t||"object"==typeof t&&t.constructor===String},t.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},t.isArray=function(t){return t?!(-1===t.constructor.toString().indexOf("Array")):!1},t.isObject=function(t){return null!==t&&"object"==typeof t},t.isFunction=function(t){return"[object Function]"===Object.prototype.toString.call(t)},t.isRegExp=function(t){return t instanceof RegExp},t.isOutsideCanvas=function(e){return e.x&&e.y?e.x<0||e.y<0||e.x>t.width||e.y>t.height:void 0},t.forceInsideCanvas=function(e){e.x&&e.y&&(e.x<0&&(e.x=0),e.x>t.width&&(e.x=t.width),e.y<0&&(e.y=0),e.y>t.height&&(e.y=t.height))},t.getUrlParameters=function(){for(var t,e=[],i=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),s=0;s<i.length;s++)t=i[s].split("="),e.push(t[0]),e[t[0]]=t[1];return e},t.parseOptions=function(e,i,s){e.options=i;for(var o in i)void 0===s[o]&&t.log.warn("jaws.parseOptions: Unsupported property "+o+"for "+e.constructor);for(var o in s)t.isFunction(s[o])&&(s[o]=s[o]()),e[o]=void 0!==i[o]?i[o]:t.clone(s[o])},t.clone=function(e){return t.isArray(e)?e.slice(0):t.isObject(e)?JSON.parse(JSON.stringify(e)):e},t.imageToCanvasContext=function(e){var i=document.createElement("canvas");i.width=e.width,i.height=e.height;var s=i.getContext("2d");return t.context&&(s.imageSmoothingEnabled=t.context.mozImageSmoothingEnabled,s.webkitImageSmoothingEnabled=t.context.mozImageSmoothingEnabled,s.mozImageSmoothingEnabled=t.context.mozImageSmoothingEnabled),s.drawImage(e,0,0,i.width,i.height),s},t.retroScaleImage=function(e,i){var s=t.isImage(e)?t.imageToCanvas(e):e,o=s.getContext("2d"),n=o.getImageData(0,0,s.width,s.height).data,a=document.createElement("canvas");a.width=e.width*i,a.height=e.height*i;for(var r=a.getContext("2d"),h=r.createImageData(a.width,a.height),c=h.width,l=h.height,u=0;l>u;u+=1)for(var d=Math.floor(u/i),f=u*h.width,p=d*e.width,g=0;c>g;g+=1){var m=Math.floor(g/i),w=4*(f+g),x=4*(p+m);h.data[w]=n[x],h.data[w+1]=n[x+1],h.data[w+2]=n[x+2],h.data[w+3]=n[x+3]}return r.putImageData(h,0,0),a},t}(jaws||{});"undefined"!=typeof module&&"exports"in module&&(module.exports=jaws);var jaws=function(t){function e(){for(var t in h)delete h[t]}function i(t){var e=e=t.keyCode;h[e]=!1,d[e]?(d[e](e),t.preventDefault()):g[e]&&t.preventDefault()}function s(t){var e=e=t.keyCode;h[e]=!0,u[e]?(u[e](e),t.preventDefault()):g[e]&&t.preventDefault()}function o(t){var e=f[t.button];"Microsoft Internet Explorer"==navigator.appName&&(e=p[t.button]),h[e]=!0,u[e]&&(u[e](e),t.preventDefault())}function n(t){var e=f[t.button];"Microsoft Internet Explorer"==navigator.appName&&(e=p[t.button]),h[e]=!1,d[e]&&(d[e](e),t.preventDefault())}function a(e){h.left_mouse_button=!0,t.mouse_x=e.touches[0].pageX-t.canvas.offsetLeft,t.mouse_y=e.touches[0].pageY-t.canvas.offsetTop}function r(){h.left_mouse_button=!1,t.mouse_x=void 0,t.mouse_y=void 0}var h={},c={0:"48",1:"49",2:"50",3:"51",4:"52",5:"53",6:"54",7:"55",8:"56",9:"57",backspace:"8",tab:"9",enter:"13",shift:"16",ctrl:"17",alt:"18",pause:"19",caps_lock:"20",esc:"27",space:"32",page_up:"33",page_down:"34",end:"35",home:"36",left:"37",up:"38",right:"39",down:"40",insert:"45","delete":"46",a:"65",b:"66",c:"67",d:"68",e:"69",f:"70",g:"71",h:"72",i:"73",j:"74",k:"75",l:"76",m:"77",n:"78",o:"79",p:"80",q:"81",r:"82",s:"83",t:"84",u:"85",v:"86",w:"87",x:"88",y:"89",z:"90",windows_left:"91",windows_right:"92",select:"93",numpad0:"96",numpad1:"97",numpad2:"98",numpad3:"99",numpad4:"100",numpad5:"101",numpad6:"102",numpad7:"103",numpad8:"104",numpad9:"105",asterisk:"106",plus:"107",minus:"109",decimal_point:"110",divide:"111",f1:"112",f2:"113",f3:"114",f4:"115",f5:"116",f6:"117",f7:"118",f8:"119",f9:"120",numlock:"144",scrollock:"145",semicolon:"186",equals:"187",comma:"188",dash:"189",period:"190",slash:"191",grave_accent:"192",open_bracket:"219",backslash:"220",close_bracket:"221",single_quote:"222"},l={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"caps_lock",27:"esc",32:"space",33:"page_up",34:"page_down",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",91:"windows_left",92:"windows_right",93:"select",96:"numpad0",97:"numpad1",98:"numpad2",99:"numpad3",100:"numpad4",101:"numpad5",102:"numpad6",103:"numpad7",104:"numpad8",105:"numpad9",106:"asterisk",107:"plus",109:"minus",110:"decimal_point",111:"divide",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",144:"numlock",145:"scrollock",186:"semicolon",187:"equals",188:"comma",189:"dash",190:"period",191:"slash",192:"grave_accent",219:"open_bracket",220:"backslash",221:"close_bracket",222:"single_quote"},u=[],d=[],f=[],p=[],g=[];return t.setupInput=function(){var h=[];h[0]="left_mouse_button",h[1]="center_mouse_button",h[2]="right_mouse_button";var c=[];c[1]="left_mouse_button",c[2]="right_mouse_button",c[4]="center_mouse_button",f=h,p=c,window.addEventListener("keydown",s),window.addEventListener("keyup",i);var l=t.canvas||t.dom;l.addEventListener("mousedown",o,!1),l.addEventListener("mouseup",n,!1),l.addEventListener("touchstart",a,!1),l.addEventListener("touchend",r,!1),window.addEventListener("blur",e,!1),document.oncontextmenu=function(){return!1}},t.preventDefaultKeys=function(){for(var t=arguments,e=0;e<t.length;e++)g[t[e]]=!0},t.pressed=h,t.keyCodes=c,t.keycodeNames=l,t.on_keydown=function(e,i){if(t.isArray(e))for(var s=0;e[s];s++)u[e[s]]=i;else u[e]=i},t.on_keyup=function(e,i){if(t.isArray(e))for(var s=0;e[s];s++)d[e[s]]=i;else d[e]=i},t.clearKeyCallbacks=function(){d=[],u=[]},t}(jaws||{}),jaws=function(t){function e(e){if(t.isDrawable(e)){for(var i=t.isImage(e)?t.imageToCanvas(e):e,s=i.getContext("2d"),o=s.getImageData(0,0,i.width,i.height),n=o.data,a=0;a<n.length;a+=4)255===n[a]&&0===n[a+1]&&255===n[a+2]&&(n[a+3]=0);return s.putImageData(o,0,0),i}}return t.Assets=function(){function i(e){if(t.isString(e)){var i=r.getPostfix(e);return r.file_type[i]?r.file_type[i]:i}t.log.error("jaws.assets.getType: Argument not a String with "+e)}function s(s){var o=this.asset,n=o.src,h=i(o.src);try{if("json"===h){if(4!==this.readyState)return;r.data[o.src]=JSON.parse(this.responseText)}else if("image"===h){var c=r.image_to_canvas?t.imageToCanvas(o.image):o.image;r.fuchia_to_transparent&&"bmp"===r.getPostfix(o.src)&&(c=e(c)),r.data[o.src]=c}else r.data[o.src]="audio"===h&&r.can_play[r.getPostfix(o.src)]?o.audio:"video"===h&&r.can_play[r.getPostfix(o.src)]?o.video:this.response}catch(l){t.log.error("Cannot process "+n+" (Message: "+l.message+", Name: "+l.name+")"),r.data[o.src]=null}r.loaded[n]||r.load_count++,r.loaded[n]=!0,r.loading[n]=!1,a(o,!0,s)}function o(t){r.loaded[t.src]=!0,r.loading[t.src]=!1,r.load_count++,a(t,!0)}function n(t){var e=this.asset;r.error_count++,a(e,!1,t)}function a(t,e,i){var s=parseInt((r.load_count+r.error_count)/r.src_list.length*100);e?(r.onprogress&&r.onprogress(t.src,s),t.onprogress&&void 0!==i&&t.onprogress(i)):(r.onerror&&r.onerror(t.src,s),t.onerror&&void 0!==i&&t.onerror(i)),100===s&&(r.onload&&r.onload(),r.onprogress=null,r.onerror=null,r.onload=null)}if(!(this instanceof arguments.callee))return new arguments.callee;var r=this;r.loaded=[],r.loading=[],r.src_list=[],r.data=[],r.bust_cache=!1,r.image_to_canvas=!0,r.fuchia_to_transparent=!0,r.root="",r.file_type={},r.file_type.json="json",r.file_type.wav="audio",r.file_type.mp3="audio",r.file_type.ogg="audio",r.file_type.m4a="audio",r.file_type.weba="audio",r.file_type.aac="audio",r.file_type.mka="audio",r.file_type.flac="audio",r.file_type.png="image",r.file_type.jpg="image",r.file_type.jpeg="image",r.file_type.gif="image",r.file_type.bmp="image",r.file_type.tiff="image",r.file_type.mp4="video",r.file_type.webm="video",r.file_type.ogv="video",r.file_type.mkv="video",r.can_play={};try{var h=new Audio;r.can_play.wav=!!h.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),r.can_play.ogg=!!h.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),r.can_play.mp3=!!h.canPlayType("audio/mpeg;").replace(/^no$/,""),r.can_play.m4a=!!(h.canPlayType("audio/x-m4a;")||h.canPlayType("audio/aac;")).replace(/^no$/,""),r.can_play.weba=!!h.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,""),r.can_play.aac=!!h.canPlayType("audio/aac;").replace(/^no$/,""),r.can_play.mka=!!h.canPlayType("audio/x-matroska;").replace(/^no$/,""),r.can_play.flac=!!h.canPlayType("audio/x-flac;").replace(/^no$/,"")}catch(c){}try{var l=document.createElement("video");r.can_play.mp4=!!l.canPlayType("video/mp4;").replace(/^no$/,""),r.can_play.webm=!!l.canPlayType('video/webm; codecs="vorbis"').replace(/^no$/,""),r.can_play.ogv=!!l.canPlayType('video/ogg; codecs="vorbis"').replace(/^no$/,""),r.can_play.mkv=!!l.canPlayType("video/x-matroska;").replace(/^no$/,"")}catch(c){}r.length=function(){return r.src_list.length},r.setRoot=function(t){return r.root=t,r},r.get=function(e){if(t.isArray(e))return e.map(function(t){return r.data[t]});if(!t.isString(e))return void t.log.error("jaws.get: Neither String nor Array. Incorrect URL resource "+e);if("*"===e[e.length-1])for(var i=e.replace("*",""),s=0;s<r.src_list.length;s++)if(0==r.src_list[s].indexOf(i)&&r.data[r.src_list[s]])return r.data[r.src_list[s]];return r.data[e]?r.data[e]:void t.log.warn("No such asset: "+e,!0)},r.isLoading=function(e){return t.isString(e)?r.loading[e]:void t.log.error("jaws.isLoading: Argument not a String with "+e)},r.isLoaded=function(e){return t.isString(e)?r.loaded[e]:void t.log.error("jaws.isLoaded: Argument not a String with "+e)},r.getPostfix=function(e){return t.isString(e)?e.toLowerCase().match(/.+\.([^?]+)(\?|$)/)[1]:void t.log.error("jaws.assets.getPostfix: Argument not a String with "+e)},r.add=function(e){var i=arguments;1==i.length&&t.isArray(i[0])&&(i=i[0]);for(var s=0;s<i.length;s++)t.isArray(i[s])?r.add(i[s]):t.isString(i[s])?r.src_list.push(i[s]):t.log.error("jaws.assets.add: Neither String nor Array. Incorrect URL resource "+e);return r},r.loadAll=function(e){return r.load_count=0,r.error_count=0,e.onprogress&&t.isFunction(e.onprogress)&&(r.onprogress=e.onprogress),e.onerror&&t.isFunction(e.onerror)&&(r.onerror=e.onerror),e.onload&&t.isFunction(e.onload)&&(r.onload=e.onload),r.src_list.forEach(function(t){r.load(t)}),r},r.load=function(e,a){if(a||(a={}),!t.isString(e))return void t.log.error("jaws.assets.load: Argument not a String with "+e);var h={},c="";h.src=e,h.onload=a.onload,h.onerror=a.onerror,r.loading[e]=!0;var l=RegExp("^((f|ht)tp(s)?:)?//");c=l.test(e)?h.src:r.root+h.src,r.bust_cache&&(c+="?"+parseInt(1e7*Math.random()));var u=i(h.src);if("image"===u)try{h.image=new Image,h.image.asset=h,h.image.addEventListener("load",s),h.image.addEventListener("error",n),h.image.src=c}catch(d){t.log.error("Cannot load Image resource "+c+" (Message: "+d.message+", Name: "+d.name+")")}else if(r.can_play[r.getPostfix(h.src)]){if("audio"===u)try{h.audio=new Audio,h.audio.asset=h,h.audio.addEventListener("error",n),h.audio.addEventListener("canplay",s),r.data[h.src]=h.audio,h.audio.src=c,h.audio.load()}catch(d){t.log.error("Cannot load Audio resource "+c+" (Message: "+d.message+", Name: "+d.name+")")}else if("video"===u)try{h.video=document.createElement("video"),h.video.asset=h,r.data[h.src]=h.video,h.video.setAttribute("style","display:none;"),h.video.addEventListener("error",n),h.video.addEventListener("canplay",s),document.body.appendChild(h.video),h.video.src=c,h.video.load()}catch(d){t.log.error("Cannot load Video resource "+c+" (Message: "+d.message+", Name: "+d.name+")")}}else{if("audio"===u&&!r.can_play[r.getPostfix(h.src)])return o(h),r;try{var f=new XMLHttpRequest;f.asset=h,f.onreadystatechange=s,f.onerror=n,f.open("GET",c,!0),"json"!==u&&(f.responseType="blob"),f.send(null)}catch(d){t.log.error("Cannot load "+c+" (Message: "+d.message+", Name: "+d.name+")")}}return r},r.displayProgress=function(e){t.isNumber(e)&&t.context&&(t.context.save(),t.context.fillStyle="black",t.context.fillRect(0,0,t.width,t.height),t.context.fillStyle="white",t.context.strokeStyle="white",t.context.textAlign="center",t.context.strokeRect(49,t.height/2-30-1,t.width-100+2,62),t.context.fillRect(50,t.height/2-30,(t.width-100)/100*e,60),t.context.font="11px verdana",t.context.fillText("Loading... "+e+"%",t.width/2,t.height/2-35),t.context.font="11px verdana",t.context.fillStyle="#ccc",t.context.textBaseline="bottom",t.context.fillText("powered by www.jawsjs.com",t.width/2,t.height-1),t.context.restore())}},t.assets=new t.Assets,t}(jaws||{});if("undefined"!=typeof require)var jaws=require("./core.js");var jaws=function(t){function e(t){this.size=t,this.values=new Array(this.size),this.value,this.add=function(t){if(this.values.length>this.size){this.values.splice(0,1),this.value=0;for(var e=0;this.values[e];e++)this.value+=this.values[e];this.value=this.value/this.size}return this.values.push(t),this},this.get=function(){return parseInt(this.value)}}return window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){window.setTimeout(t,16.666)}}(),t.GameLoop=function(i,s,o){if(!(this instanceof arguments.callee))return new arguments.callee(i,s);this.tick_duration=0,this.fps=0,this.ticks=0;var n,a=!1,r=!1,h=this,c=new e(20);this.runtime=function(){return this.last_tick-this.first_tick},this.start=function(){t.log.info("Game loop start",!0),this.first_tick=(new Date).getTime(),this.current_tick=(new Date).getTime(),this.last_tick=(new Date).getTime(),s.setup!==!1&&i.setup&&i.setup(o),step_delay=1e3/s.fps,60==s.fps?requestAnimFrame(this.loop):n=setInterval(this.loop,step_delay)},this.loop=function(){h.current_tick=(new Date).getTime(),h.tick_duration=h.current_tick-h.last_tick,h.fps=c.add(1e3/h.tick_duration).get(),r||a||(i.update&&i.update(),i.draw&&i.draw(),h.ticks++),60!=s.fps||r||requestAnimFrame(h.loop),h.last_tick=h.current_tick},this.pause=function(){a=!0},this.unpause=function(){a=!1},this.stop=function(){n&&clearInterval(n),r=!0}},t}(jaws||{}),jaws=function(t){var e=0;return t.Rect=function(t,i,s,o){return this instanceof arguments.callee?(this.x=t,this.y=i,this.width=s,this.height=o,this.right=t+s-e,void(this.bottom=i+o-e)):new arguments.callee(t,i,s,o)},t.Rect.prototype.getPosition=function(){return[this.x,this.y]},t.Rect.prototype.move=function(t,e){return this.x+=t,this.y+=e,this.right+=t,this.bottom+=e,this},t.Rect.prototype.moveTo=function(t,i){return this.x=t,this.y=i,this.right=this.x+this.width-e,this.bottom=this.y+this.height-e,this},t.Rect.prototype.resize=function(t,i){return this.width+=t,this.height+=i,this.right=this.x+this.width-e,this.bottom=this.y+this.height-e,this},t.Rect.prototype.clone=function(){return new t.Rect(this.x,this.y,this.width,this.height)},t.Rect.prototype.shrink=function(t,i){return this.x+=t,this.y+=i,this.width-=t+t,this.height-=i+i,this.right=this.x+this.width-e,this.bottom=this.y+this.height-e,this},t.Rect.prototype.resizeTo=function(t,i){return this.width=t,this.height=i,this.right=this.x+this.width-e,this.bottom=this.y+this.height-e,this},t.Rect.prototype.draw=function(){return t.context.strokeStyle="red",t.context.strokeRect(this.x-.5,this.y-.5,this.width,this.height),this},t.Rect.prototype.collidePoint=function(t,e){return t>=this.x&&t<=this.right&&e>=this.y&&e<=this.bottom},t.Rect.prototype.collideRect=function(t){return(this.x>=t.x&&this.x<=t.right||t.x>=this.x&&t.x<=this.right)&&(this.y>=t.y&&this.y<=t.bottom||t.y>=this.y&&t.y<=this.bottom)},t.Rect.prototype.toString=function(){return"[Rect "+this.x+", "+this.y+", "+this.width+", "+this.height+"]"},t}(jaws||{});"undefined"!=typeof module&&"exports"in module&&(module.exports=jaws.Rect);var jaws=function(jaws){return jaws.Sprite=function(t){return this instanceof arguments.callee?(this.set(t),void(this.context=t.context?t.context:jaws.context)):new arguments.callee(t)},jaws.Sprite.prototype.default_options={x:0,y:0,alpha:1,angle:0,flipped:!1,anchor_x:0,anchor_y:0,image:null,image_path:null,anchor:null,scale_image:null,damping:1,scale_x:1,scale_y:1,scale:1,color:"#ddd",width:16,height:16,_constructor:null,context:null,data:null},jaws.Sprite.prototype.set=function(t){if(jaws.isString(this.image)&&(this.image_path=this.image),jaws.parseOptions(this,t,this.default_options),this.scale&&(this.scale_x=this.scale_y=this.scale),this.image&&this.setImage(this.image),this.scale_image&&this.scaleImage(this.scale_image),this.anchor&&this.setAnchor(this.anchor),!this.image&&this.color&&this.width&&this.height){var e=document.createElement("canvas"),i=e.getContext("2d");e.width=this.width,e.height=this.height,i.fillStyle=this.color,i.fillRect(0,0,this.width,this.height),this.image=e}return this.cacheOffsets(),this},jaws.Sprite.prototype.clone=function(object){var constructor=this._constructor?eval(this._constructor):this.constructor,new_sprite=new constructor(this.attributes());return new_sprite._constructor=this._constructor||this.constructor.name,new_sprite},jaws.Sprite.prototype.setImage=function(t){var e=this;return jaws.isDrawable(t)?(this.image=t,this.cacheOffsets()):(jaws.assets.isLoaded(t)?(this.image=jaws.assets.get(t),this.cacheOffsets()):(jaws.log.warn("Image '"+t+"' not preloaded with jaws.assets.add(). Image and a working sprite.rect() will be delayed."),jaws.assets.load(t,{onload:function(){e.image=jaws.assets.get(t),e.cacheOffsets()}})),this)},jaws.Sprite.prototype.stepToWhile=function(t,e,i){var s=1,o=t<this.x?-s:s,n=e<this.y?-s:s;t=parseInt(t),e=parseInt(e);for(var a=!1,r=!1;;)if(a===!1&&(this.x!=t&&(this.x+=o),i(this)||(this.x-=o,a=!0)),r===!1&&(this.y!=e&&(this.y+=n),i(this)||(this.y-=n,r=!0)),(a||this.x==t)&&(r||this.y==e))return{x:a,y:r}},jaws.Sprite.prototype.stepWhile=function(t,e,i){return this.stepToWhile(this.x+t,this.y+e,i)},jaws.Sprite.prototype.flip=function(){return this.flipped=this.flipped?!1:!0,this},jaws.Sprite.prototype.flipTo=function(t){return this.flipped=t,this},jaws.Sprite.prototype.rotate=function(t){return this.angle+=t,this},jaws.Sprite.prototype.rotateTo=function(t){return this.angle=t,this},jaws.Sprite.prototype.moveTo=function(t,e){return jaws.isArray(t)&&void 0===e&&(e=t[1],t=t[0]),this.x=t,this.y=e,this},jaws.Sprite.prototype.move=function(t,e){return jaws.isArray(t)&&void 0===e&&(e=t[1],t=t[0]),t&&(this.x+=t),e&&(this.y+=e),this},jaws.Sprite.prototype.scaleAll=function(t){return this.scale_x*=t,this.scale_y*=t,this.cacheOffsets()},jaws.Sprite.prototype.scaleTo=function(t){return this.scale_x=this.scale_y=t,this.cacheOffsets()},jaws.Sprite.prototype.scaleWidth=function(t){return this.scale_x*=t,this.cacheOffsets()},jaws.Sprite.prototype.scaleHeight=function(t){return this.scale_y*=t,this.cacheOffsets()},jaws.Sprite.prototype.setX=function(t){return this.x=t,this},jaws.Sprite.prototype.setY=function(t){return this.y=t,this},jaws.Sprite.prototype.setTop=function(t){return this.y=t+this.top_offset,this},jaws.Sprite.prototype.setBottom=function(t){return this.y=t-this.bottom_offset,this},jaws.Sprite.prototype.setLeft=function(t){return this.x=t+this.left_offset,this},jaws.Sprite.prototype.setRight=function(t){return this.x=t-this.right_offset,this},jaws.Sprite.prototype.setWidth=function(t){return this.scale_x=t/this.image.width,this.cacheOffsets()},jaws.Sprite.prototype.setHeight=function(t){return this.scale_y=t/this.image.height,this.cacheOffsets()},jaws.Sprite.prototype.resize=function(t,e){return jaws.isArray(t)&&void 0===e&&(e=t[1],t=t[0]),this.scale_x=(this.width+t)/this.image.width,this.scale_y=(this.height+e)/this.image.height,this.cacheOffsets()},jaws.Sprite.prototype.resizeTo=function(t,e){return jaws.isArray(t)&&void 0===e&&(e=t[1],t=t[0]),this.scale_x=t/this.image.width,this.scale_y=e/this.image.height,this.cacheOffsets()},jaws.Sprite.prototype.setAnchor=function(t){var e={top_left:[0,0],left_top:[0,0],center_left:[0,.5],left_center:[0,.5],bottom_left:[0,1],left_bottom:[0,1],top_center:[.5,0],center_top:[.5,0],center_center:[.5,.5],center:[.5,.5],bottom_center:[.5,1],center_bottom:[.5,1],top_right:[1,0],right_top:[1,0],center_right:[1,.5],right_center:[1,.5],bottom_right:[1,1],right_bottom:[1,1]};return(a=e[t])&&(this.anchor_x=a[0],this.anchor_y=a[1],this.image&&this.cacheOffsets()),this},jaws.Sprite.prototype.cacheOffsets=function(){return this.image?(this.width=this.image.width*this.scale_x,this.height=this.image.height*this.scale_y,this.left_offset=this.width*this.anchor_x,this.top_offset=this.height*this.anchor_y,this.right_offset=this.width*(1-this.anchor_x),this.bottom_offset=this.height*(1-this.anchor_y),this.cached_rect&&this.cached_rect.resizeTo(this.width,this.height),this):void 0},jaws.Sprite.prototype.rect=function(){return!this.cached_rect&&this.width&&(this.cached_rect=new jaws.Rect(this.x,this.y,this.width,this.height)),this.cached_rect&&this.cached_rect.moveTo(this.x-this.left_offset,this.y-this.top_offset),this.cached_rect},jaws.Sprite.prototype.draw=function(){return this.image?(this.context.save(),this.context.translate(this.x,this.y),0!=this.angle&&jaws.context.rotate(this.angle*Math.PI/180),this.flipped&&this.context.scale(-1,1),this.context.globalAlpha=this.alpha,this.context.translate(-this.left_offset,-this.top_offset),this.context.drawImage(this.image,0,0,this.width,this.height),this.context.restore(),this):this},jaws.Sprite.prototype.scaleImage=function(t){return this.image?(this.setImage(jaws.retroScaleImage(this.image,t)),this):void 0},jaws.Sprite.prototype.asCanvasContext=function(){var t=document.createElement("canvas");t.width=this.width,t.height=this.height;var e=t.getContext("2d");return jaws.context&&(e.mozImageSmoothingEnabled=jaws.context.mozImageSmoothingEnabled),e.drawImage(this.image,0,0,this.width,this.height),e},jaws.Sprite.prototype.asCanvas=function(){var t=document.createElement("canvas");t.width=this.width,t.height=this.height;var e=t.getContext("2d");return jaws.context&&(e.mozImageSmoothingEnabled=jaws.context.mozImageSmoothingEnabled),e.drawImage(this.image,0,0,this.width,this.height),t},jaws.Sprite.prototype.toString=function(){return"[Sprite "+this.x.toFixed(2)+", "+this.y.toFixed(2)+", "+this.width+", "+this.height+"]"},jaws.Sprite.prototype.attributes=function(){var t={};return t._constructor=this._constructor||"jaws.Sprite",t.x=parseFloat(this.x.toFixed(2)),t.y=parseFloat(this.y.toFixed(2)),t.image=this.image_path,t.alpha=this.alpha,t.flipped=this.flipped,t.angle=parseFloat(this.angle.toFixed(2)),t.scale_x=this.scale_x,t.scale_y=this.scale_y,t.anchor_x=this.anchor_x,t.anchor_y=this.anchor_y,null!==this.data&&(t.data=jaws.clone(this.data)),t},jaws.Sprite.parse=function(objects){function parseArray(array){array.forEach(function(data){var constructor=data._constructor?eval(data._constructor):data.constructor;if(jaws.isFunction(constructor)){jaws.log.info("Creating "+data._constructor+"("+data.toString()+")",!0);var object=new constructor(data);object._constructor=data._constructor||data.constructor.name,sprites.push(object)}})}var sprites=[];return jaws.isArray(objects)?objects.every(function(t){return t._constructor})?parseArray(objects):sprites=objects:jaws.isString(objects)&&(parseArray(JSON.parse(objects)),jaws.log.info(objects)),sprites},jaws.Sprite.prototype.toJSON=function(){return JSON.stringify(this.attributes())},jaws}(jaws||{});"undefined"!=typeof module&&"exports"in module&&(module.exports=jaws.Sprite);var jaws=function(t){function e(t,e,i,s,o){var n=document.createElement("canvas");n.width=s,n.height=o;var a=n.getContext("2d");return a.drawImage(t,e,i,s,o,0,0,n.width,n.height),n}return t.SpriteSheet=function(i){if(!(this instanceof arguments.callee))return new arguments.callee(i);if(t.parseOptions(this,i,this.default_options),t.isString(this.image)&&!i.frame_size){var s=new RegExp("_(\\d+)x(\\d+)","g"),o=s.exec(this.image);this.frame_size=[],this.frame_size[0]=parseInt(o[1]),this.frame_size[1]=parseInt(o[2])}if(this.image=t.isDrawable(this.image)?this.image:t.assets.data[this.image],this.scale_image){var n=t.isDrawable(this.image)?this.image:t.assets.get(this.image);this.frame_size[0]*=this.scale_image,this.frame_size[1]*=this.scale_image,this.image=t.retroScaleImage(n,this.scale_image)}if(this.frames=[],"down"==this.orientation)for(var a=this.offset;a<this.image.width;a+=this.frame_size[0])for(var r=0;r<this.image.height;r+=this.frame_size[1])this.frames.push(e(this.image,a,r,this.frame_size[0],this.frame_size[1]));else for(var r=this.offset;r<this.image.height;r+=this.frame_size[1])for(var a=0;a<this.image.width;a+=this.frame_size[0])this.frames.push(e(this.image,a,r,this.frame_size[0],this.frame_size[1]))},t.SpriteSheet.prototype.default_options={image:null,orientation:"down",frame_size:[32,32],offset:0,scale_image:null},t.SpriteSheet.prototype.toString=function(){return"[SpriteSheet "+this.frames.length+" frames]"},t}(jaws||{}),jaws=function(t){return t.Animation=function(e){if(!(this instanceof arguments.callee))return new arguments.callee(e);if(t.parseOptions(this,e,this.default_options),e.sprite_sheet){var i=new t.SpriteSheet({image:e.sprite_sheet,scale_image:this.scale_image,frame_size:this.frame_size,orientation:this.orientation,offset:this.offset});this.frames=i.frames,this.frame_size=i.frame_size}if(e.scale_image){var s=t.isDrawable(e.sprite_sheet)?e.sprite_sheet:t.assets.get(e.sprite_sheet);this.frame_size[0]*=e.scale_image,this.frame_size[1]*=e.scale_image,e.sprite_sheet=t.retroScaleImage(s,e.scale_image)}if(this.current_tick=(new Date).getTime(),this.last_tick=(new Date).getTime(),this.sum_tick=0,e.subsets){this.subsets={};for(subset in e.subsets)start_stop=e.subsets[subset],this.subsets[subset]=this.slice(start_stop[0],start_stop[1])}},t.Animation.prototype.default_options={frames:[],subsets:[],frame_duration:100,index:0,loop:1,bounce:0,frame_direction:1,frame_size:null,orientation:"down",on_end:null,offset:0,scale_image:null,sprite_sheet:null},t.Animation.prototype.subset=function(t){return this.subsets[t]},t.Animation.prototype.update=function(){return this.current_tick=(new Date).getTime(),this.sum_tick+=this.current_tick-this.last_tick,this.last_tick=this.current_tick,this.sum_tick>this.frame_duration&&(this.index+=this.frame_direction,this.sum_tick=0),(this.index>=this.frames.length||this.index<0)&&(this.bounce?(this.frame_direction=-this.frame_direction,this.index+=2*this.frame_direction):this.loop?this.index=this.frame_direction<0?this.frames.length-1:0:(this.index-=this.frame_direction,this.on_end&&(this.on_end(),this.on_end=null))),this
},t.Animation.prototype.slice=function(e,i){var s={};return s.frame_duration=this.frame_duration,s.loop=this.loop,s.bounce=this.bounce,s.on_end=this.on_end,s.frame_direction=this.frame_direction,s.frames=this.frames.slice().slice(e,i),new t.Animation(s)},t.Animation.prototype.next=function(){return this.update(),this.frames[this.index]},t.Animation.prototype.atLastFrame=function(){return this.index==this.frames.length-1},t.Animation.prototype.atFirstFrame=function(){return 0==this.index},t.Animation.prototype.currentFrame=function(){return this.frames[this.index]},t.Animation.prototype.toString=function(){return"[Animation, "+this.frames.length+" frames]"},t}(jaws||{});if("undefined"!=typeof require)var jaws=require("./core.js");var jaws=function(t){function e(t,e){for(var i=function(e){return void 0!==t.isSpriteList?t.at(e):t[e]},s=[],o=new Array(e),n=0;e>n;n++)o[n]=n;for(var n=e-1,a=t.length;n>=0;a=t.length){for(s.push(o.map(i));n>=0&&o[n]===a-1;)n--,a--;if(n>=0){o[n]+=1;for(var r=n+1;e>r;r++)o[r]=o[r-1]+1;n=e-1}}return s}return t.collideOneWithOne=function(e,i){return e.radius&&i.radius&&e!==i&&t.collideCircles(e,i)?!0:e.rect&&i.rect&&e!==i&&t.collideRects(e.rect(),i.rect())?!0:!1},t.collideOneWithMany=function(e,i,s){var o=[];if(s){for(var n=0;n<i.length;n++)t.collideOneWithOne(e,i[n])&&(s(e,i[n]),o.push(i[n]));return o}return i.filter(function(i){return t.collideOneWithOne(e,i)})},t.collideManyWithMany=function(i,s,o){var n=[];return i===s?e(i,2).forEach(function(e){t.collideOneWithOne(e[0],e[1])&&(o?o(e[0],e[1]):n.push([e[0],e[1]]))}):i.forEach(function(e){s.forEach(function(i){t.collideOneWithOne(e,i)&&(o?o(e,i):n.push([e,i]))})}),n},t.collideCircles=function(e,i){return t.distanceBetween(e,i)<e.radius+i.radius},t.collideRects=function(t,e){return(t.x>=e.x&&t.x<=e.right||e.x>=t.x&&e.x<=t.right)&&(t.y>=e.y&&t.y<=e.bottom||e.y>=t.y&&e.y<=t.bottom)},t.distanceBetween=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},t.collide=function(e,i,s){if((e.rect||e.radius)&&i.forEach)return t.collideOneWithMany(e,i,s).length>0;if(e.forEach&&i.forEach)return t.collideManyWithMany(e,i,s).length>0;if(e.forEach&&(i.rect||i.radius))return t.collideOneWithMany(i,e,s).length>0;if(e.rect&&i.rect||e.radius&&i.radius){var o=t.collideOneWithOne(e,i);if(!s||!o)return o;s(e,i)}},t}(jaws||{}),jaws=function(t){return t.PixelMap=function(e){return this instanceof arguments.callee?(this.options=e,this.scale=e.scale||1,this.x=e.x||0,this.y=e.y||0,e.image?(this.setContext(e.image),e.scale_image&&this.setContext(t.retroScaleImage(this.context.canvas,e.scale_image)),this.width=this.context.canvas.width*this.scale,this.height=this.context.canvas.height*this.scale):t.log.warn("PixelMap needs an image to work with"),this.named_colors=[],void this.update()):new arguments.callee(e)},t.PixelMap.prototype.setContext=function(e){var e=t.isDrawable(e)?e:t.assets.get(e);this.context=t.imageToCanvasContext(e)},t.PixelMap.prototype.update=function(t,e,i,s){if((void 0===t||0>t)&&(t=0),(void 0===e||0>e)&&(e=0),(void 0===i||i>this.width)&&(i=this.width),(void 0===s||s>this.height)&&(s=this.height),0==arguments.length)this.data=this.context.getImageData(t,e,i,s).data;else for(var o=this.context.getImageData(t,e,i,s).data,n=0,a=4*this.width,r=e*this.width*4+4*t,h=4*i,c=0;s>c;c++){for(var l=0;h>l;l++)this.data[r+l]=o[n++];r+=a}},t.PixelMap.prototype.draw=function(){t.context.drawImage(this.context.canvas,this.x,this.y,this.width,this.height)},t.PixelMap.prototype.namedColorAtRect=function(t,e){for(var i=t.x,s=t.y;i<t.right-1;i++)if(this.namedColorAt(i,s)==e||void 0===e)return this.namedColorAt(i,s);for(;s<t.bottom-1;s++)if(this.namedColorAt(i,s)==e||void 0===e)return this.namedColorAt(i,s);for(;i>t.x;i--)if(this.namedColorAt(i,s)==e||void 0===e)return this.namedColorAt(i,s);for(;s>t.y;s--)if(this.namedColorAt(i,s)==e||void 0===e)return this.namedColorAt(i,s);return!1},t.PixelMap.prototype.at=function(t,e){t=parseInt(t),e=parseInt(e),0>e&&(e=0);var i=e*this.width*4+4*t,s=this.data[i],o=this.data[i+1],n=this.data[i+2],a=this.data[i+3];return[s,o,n,a]},t.PixelMap.prototype.namedColorAt=function(t,e){for(var i=this.at(t,e),s=0;s<this.named_colors.length;s++){var o=this.named_colors[s].name,n=this.named_colors[s].color;if(n[0]==i[0]&&n[1]==i[1]&&n[2]==i[2]&&n[3]==i[3])return o}},t.PixelMap.prototype.nameColor=function(t,e){this.named_colors.push({name:e,color:t})},t}(jaws||{}),jaws=function(t){return t.Parallax=function(e){return this instanceof arguments.callee?void t.parseOptions(this,e,this.default_options):new arguments.callee(e)},t.Parallax.prototype.default_options={width:function(){return t.width},height:function(){return t.height},scale:1,repeat_x:null,repeat_y:null,camera_x:0,camera_y:0,layers:[]},t.Parallax.prototype.draw=function(){for(var t,e,i=0;i<this.layers.length;i++)for(t=this.layers[i],e=this.repeat_x?-(this.camera_x/t.damping%t.width):-(this.camera_x/t.damping),t.y=this.repeat_y?-(this.camera_y/t.damping%t.height):-(this.camera_y/t.damping),t.x=e;t.y<this.height;){for(;t.x<this.width&&(t.x+t.width>=0&&t.y+t.height>=0&&t.draw(),t.x=t.x+t.width,this.repeat_x););if(t.y=t.y+t.height,t.x=e,!this.repeat_y)break}},t.Parallax.prototype.addLayer=function(e){var i=new t.ParallaxLayer(e);i.scaleAll(this.scale),this.layers.push(i)},t.Parallax.prototype.toString=function(){return"[Parallax "+this.x+", "+this.y+". "+this.layers.length+" layers]"},t.ParallaxLayer=function(e){return this instanceof arguments.callee?(this.damping=e.damping||0,void t.Sprite.call(this,e)):new arguments.callee(e)},t.ParallaxLayer.prototype=t.Sprite.prototype,t}(jaws||{}),jaws=function(jaws){return jaws.Text=function(t){return this instanceof arguments.callee?(this.set(t),t.context&&(this.context=t.context),void(t.context||jaws.context&&(this.context=jaws.context))):new arguments.callee(t)},jaws.Text.prototype.default_options={x:0,y:0,alpha:1,angle:0,anchor_x:0,anchor_y:0,anchor:"top_left",damping:1,style:"normal",fontFace:"serif",fontSize:12,color:"black",textAlign:"start",textBaseline:"alphabetic",text:"",wordWrap:!1,width:function(){return jaws.width},height:function(){return jaws.height},shadowColor:null,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,_constructor:null},jaws.Text.prototype.set=function(t){return jaws.parseOptions(this,t,this.default_options),this.anchor&&this.setAnchor(this.anchor),this.cacheOffsets(),this},jaws.Text.prototype.clone=function(){var constructor=this._constructor?eval(this._constructor):this.constructor,new_sprite=new constructor(this.attributes());return new_sprite._constructor=this._constructor||this.constructor.name,new_sprite},jaws.Text.prototype.rotate=function(t){return this.angle+=t,this},jaws.Text.prototype.rotateTo=function(t){return this.angle=t,this},jaws.Text.prototype.moveTo=function(t,e){return this.x=t,this.y=e,this},jaws.Text.prototype.move=function(t,e){return t&&(this.x+=t),e&&(this.y+=e),this},jaws.Text.prototype.setX=function(t){return this.x=t,this},jaws.Text.prototype.setY=function(t){return this.y=t,this},jaws.Text.prototype.setTop=function(t){return this.y=t+this.top_offset,this},jaws.Text.prototype.setBottom=function(t){return this.y=t-this.bottom_offset,this},jaws.Text.prototype.setLeft=function(t){return this.x=t+this.left_offset,this},jaws.Text.prototype.setRight=function(t){return this.x=t-this.right_offset,this},jaws.Text.prototype.setWidth=function(t){return this.width=t,this.cacheOffsets(),this},jaws.Text.prototype.setHeight=function(t){return this.height=t,this.cacheOffsets(),this},jaws.Text.prototype.resize=function(t,e){return this.width+=t,this.height+=e,this.cacheOffsets(),this},jaws.Text.prototype.resizeTo=function(t,e){return this.width=t,this.height=e,this.cacheOffsets(),this},jaws.Text.prototype.setAnchor=function(t){var e={top_left:[0,0],left_top:[0,0],center_left:[0,.5],left_center:[0,.5],bottom_left:[0,1],left_bottom:[0,1],top_center:[.5,0],center_top:[.5,0],center_center:[.5,.5],center:[.5,.5],bottom_center:[.5,1],center_bottom:[.5,1],top_right:[1,0],right_top:[1,0],center_right:[1,.5],right_center:[1,.5],bottom_right:[1,1],right_bottom:[1,1]};return e.hasOwnProperty(t)&&(this.anchor_x=e[t][0],this.anchor_y=e[t][1],this.cacheOffsets()),this},jaws.Text.prototype.cacheOffsets=function(){return this.left_offset=this.width*this.anchor_x,this.top_offset=this.height*this.anchor_y,this.right_offset=this.width*(1-this.anchor_x),this.bottom_offset=this.height*(1-this.anchor_y),this.cached_rect&&this.cached_rect.resizeTo(this.width,this.height),this},jaws.Text.prototype.rect=function(){return!this.cached_rect&&this.width&&(this.cached_rect=new jaws.Rect(this.x,this.y,this.width,this.height)),this.cached_rect&&this.cached_rect.moveTo(this.x-this.left_offset,this.y-this.top_offset),this.cached_rect},jaws.Text.prototype.draw=function(){this.context.save(),0!==this.angle&&this.context.rotate(this.angle*Math.PI/180),this.context.globalAlpha=this.alpha,this.context.translate(-this.left_offset,-this.top_offset),this.context.fillStyle=this.color,this.context.font=this.style+" "+this.fontSize+"px "+this.fontFace,this.context.textBaseline=this.textBaseline,this.context.textAlign=this.textAlign,this.shadowColor&&(this.context.shadowColor=this.shadowColor),this.shadowBlur&&(this.context.shadowBlur=this.shadowBlur),this.shadowOffsetX&&(this.context.shadowOffsetX=this.shadowOffsetX),this.shadowOffsetY&&(this.context.shadowOffsetY=this.shadowOffsetY);var t=this.y,e=this.x;if(this.wordWrap)for(var i=this.text.split(" "),s="",o=0;o<i.length;o++){var n=s+i[o]+" ",a=this.context.measureText(n);this.y<t+this.height&&(a.width>this.width?(this.context.fillText(s,this.x,this.y),s=i[o]+" ",this.y+=this.fontSize):s=n,this.context.fillText(s,this.x,this.y))}else if(this.context.measureText(this.text).width<this.width)this.context.fillText(this.text,this.x,this.y);else for(var i=this.text.split(" "),s=" ",o=0;o<i.length;o++){var n=s+i[o]+" ";this.context.measureText(n).width<Math.abs(this.width-this.x)&&(this.context.fillText(n,this.x,this.y),s=i[o]+" ",s=n)}return this.y=t,this.x=e,this.context.restore(),this},jaws.Text.prototype.asCanvasContext=function(){var t=document.createElement("canvas");t.width=this.width,t.height=this.height;var e=t.getContext("2d");e.mozImageSmoothingEnabled=jaws.context.mozImageSmoothingEnabled,this.context.fillStyle=this.color,this.context.font=this.style+this.fontSize+"px "+this.fontFace,this.context.textBaseline=this.textBaseline,this.context.textAlign=this.textAlign,this.shadowColor&&(this.context.shadowColor=this.shadowColor),this.shadowBlur&&(this.context.shadowBlur=this.shadowBlur),this.shadowOffsetX&&(this.context.shadowOffsetX=this.shadowOffsetX),this.shadowOffsetY&&(this.context.shadowOffsetY=this.shadowOffsetY);var i=this.y,s=this.x;if(this.wordWrap)for(var o=this.text.split(" "),n="",a=0;a<o.length;a++){var r=n+o[a]+" ",h=this.context.measureText(r);this.y<i+this.height&&(h.width>this.width?(this.context.fillText(n,this.x,this.y),n=o[a]+" ",this.y+=this.fontSize):n=r,this.context.fillText(n,this.x,this.y))}else if(this.context.measureText(this.text).width<this.width)this.context.fillText(this.text,this.x,this.y);else for(var o=this.text.split(" "),n=" ",a=0;a<o.length;a++){var r=n+o[a]+" ";this.context.measureText(r).width<Math.abs(this.width-this.x)&&(this.context.fillText(r,this.x,this.y),n=o[a]+" ",n=r)}return this.y=i,this.x=s,e},jaws.Text.prototype.asCanvas=function(){var t=document.createElement("canvas");t.width=this.width,t.height=this.height;var e=t.getContext("2d");e.mozImageSmoothingEnabled=jaws.context.mozImageSmoothingEnabled,this.context.fillStyle=this.color,this.context.font=this.style+this.fontSize+"px "+this.fontFace,this.context.textBaseline=this.textBaseline,this.context.textAlign=this.textAlign,this.shadowColor&&(this.context.shadowColor=this.shadowColor),this.shadowBlur&&(this.context.shadowBlur=this.shadowBlur),this.shadowOffsetX&&(this.context.shadowOffsetX=this.shadowOffsetX),this.shadowOffsetY&&(this.context.shadowOffsetY=this.shadowOffsetY);var i=this.y,s=this.x;if(this.wordWrap)for(var o=this.text.split(" "),n="",a=0;a<o.length;a++){var r=n+o[a]+" ",h=e.measureText(r);this.y<i+this.height&&(h.width>this.width?(e.fillText(n,this.x,this.y),n=o[a]+" ",this.y+=this.fontSize):n=r,e.fillText(n,this.x,this.y))}else if(e.measureText(this.text).width<this.width)this.context.fillText(this.text,this.x,this.y);else for(var o=this.text.split(" "),n=" ",a=0;a<o.length;a++){var r=n+o[a]+" ";e.measureText(r).width<Math.abs(this.width-this.x)&&(e.fillText(r,this.x,this.y),n=o[a]+" ",n=r)}return this.y=i,this.x=s,t},jaws.Text.prototype.toString=function(){return"[Text "+this.x.toFixed(2)+", "+this.y.toFixed(2)+", "+this.width+", "+this.height+"]"},jaws.Text.prototype.attributes=function(){var t=this.options;return t._constructor=this._constructor||"jaws.Text",t.x=parseFloat(this.x.toFixed(2)),t.y=parseFloat(this.y.toFixed(2)),t.text=this.text,t.alpha=this.alpha,t.angle=parseFloat(this.angle.toFixed(2)),t.anchor_x=this.anchor_x,t.anchor_y=this.anchor_y,t.style=this.style,t.fontSize=this.fontSize,t.fontFace=this.fontFace,t.color=this.color,t.textAlign=this.textAlign,t.textBaseline=this.textBaseline,t.wordWrap=this.wordWrap,t.width=this.width,t.height=this.height,t},jaws.Text.prototype.toJSON=function(){return JSON.stringify(this.attributes())},jaws}(jaws||{});if("undefined"!=typeof module&&"exports"in module&&(module.exports=jaws.Text),"undefined"!=typeof require)var jaws=require("./core.js");var jaws=function(t){return t.QuadTree=function(e){this.depth=arguments[1]||0,this.bounds=e||new t.Rect(0,0,t.width,t.height),this.nodes=[],this.objects=[]},t.QuadTree.prototype.clear=function(){this.objects=[];for(var t=0;t<this.nodes.length;t++)"undefined"!=typeof this.nodes[t]&&(this.nodes[t].clear(),delete this.nodes[t])},t.QuadTree.prototype.split=function(){var e=Math.round(this.bounds.width/2),i=Math.round(this.bounds.height/2),s=this.bounds.x,o=this.bounds.y;this.nodes[0]=new t.QuadTree(new t.Rect(s+e,o,e,i),this.depth+1),this.nodes[1]=new t.QuadTree(new t.Rect(s,o,e,i),this.depth+1),this.nodes[2]=new t.QuadTree(new t.Rect(s,o+i,e,i),this.depth+1),this.nodes[3]=new t.QuadTree(new t.Rect(s+e,o+i,e,i),this.depth+1)},t.QuadTree.prototype.getIndex=function(t){var e=-1,i=this.bounds.x+this.bounds.width/2,s=this.bounds.y+this.bounds.height/2,o=t.y<s&&t.y+t.height<s,n=t.y>s;return t.x<i&&t.x+t.width<i?o?e=1:n&&(e=2):t.x>i&&(o?e=0:n&&(e=3)),e},t.QuadTree.prototype.insert=function(t){if(t.hasOwnProperty("x")||t.hasOwnProperty("y")||t.hasOwnProperty("width")||t.hasOwnProperty("height")){if("undefined"!=typeof this.nodes[0]){var e=this.getIndex(t);if(-1!==e)return void this.nodes[e].insert(t)}this.objects.push(t),"undefined"==typeof this.nodes[0]&&this.split();for(var i=0;i<this.objects.length;){var e=this.getIndex(this.objects[i]);-1!==e?this.nodes[e].insert(this.objects.splice(i,1)[0]):i++}}},t.QuadTree.prototype.retrieve=function(t){if(t.hasOwnProperty("x")||t.hasOwnProperty("y")||t.hasOwnProperty("width")||t.hasOwnProperty("height")){var e=this.getIndex(t),i=this.objects;if("undefined"!=typeof this.nodes[0])if(-1!==e)i=i.concat(this.nodes[e].retrieve(t));else for(var s=0;s<this.nodes.length;s++)i=i.concat(this.nodes[s].retrieve(t));return i}},t.QuadTree.prototype.collide=function(e,i,s){var o=!1,n=new t.QuadTree,a=[];return e.forEach||(a.push(e),e=a),i.forEach||(a=[],a.push(i),i=a),i.forEach(function(t){n.insert(t)}),e.forEach(function(e){t.collide(e,n.retrieve(e),s)&&(o=!0)}),n.clear(),o},t}(jaws||{});"undefined"!=typeof module&&"exports"in module&&(module.exports=jaws.QuadTree),window.addEventListener("load",function(){jaws.onload&&jaws.onload()},!1);</script><script type="text/javascript">(function () {
          return (function() {
            var screen_x1, screen_y1, sqrt;
            screen_x1 = 120;
            screen_y1 = 180;
            sqrt = Math.sqrt;

            /*
             * an ad-hoc redux of hammer.js
            hammerLet = do(window, navigator)@>
              mobile_regex: mobile_regex = /mobile|tablet|ip(ad|hone|od)|android/i
              support_touch: support_touch = ('ontouchstart' in window)
              prefixed: prefixed =
                global: window
                get: (sym)@>
                  { global } = @g
                  for v in @vendors
                    return r if (r = global[v + sym])?
                  undefined
                vendors: [ 'webkit', 'moz', 'MS', 'ms', 'o' ]
              PointerEvent: PointerEvent ? prefixed.run(window, 'PointerEvent')?
              suppourt_touch_only: support_touch && mobile_regex.test(navigator.userAgent)
             */
            jaws.onload = function() {
              var Demo, game, gameloop;
              Demo = (function() {
                var AiVaquita, Bubble, ColorPlane, EvilBubble, GenericPlane, GrumpyBubble, HappyBubble, ParallaxPlane, SeamlessPlane, Sprite, Stilla, Vaquita, Vilma, WaterPlane, downKey, encounter, leftKey, rightKey, spaceKey, upKey, waterscape, _ref1;

                Demo.prototype.keyCodes = (_ref1 = jaws.keyCodes, leftKey = _ref1.left, rightKey = _ref1.right, upKey = _ref1.up, downKey = _ref1.down, spaceKey = _ref1.space, _ref1);

                Demo.prototype.Sprite = Sprite = (function(_super) {
                  __extends(_Class, _super);

                  function _Class() {
                    _Class.__super__.constructor.call(this, {
                      image: this.image,
                      x: 0,
                      y: 0,
                      scale: 2
                    });
                  }

                  _Class.prototype.draw = function() {
                    this.flipped = this.lr >= 0;
                    this.x = (screen_x1 + this.px + this.lr) * 2;
                    this.y = (screen_y1 + this.py - this.tb) * 2;
                    return _Class.__super__.draw.call(this);
                  };

                  _Class.prototype.cr = 4;

                  _Class.prototype.sqrt = Math.sqrt;

                  _Class.prototype.collide = (function(x) {
                    x.coffee = "(o)@>\n              { px, py, cr } = o\n              opx = o.px; opy = o.py; ocr = o.cr\n              dx = px - opx\n              dy = py - opy\n              dc = cr + ocr\n              if (d = dx * dx + dy * dy) <= dc * dc\n                { sqrt } = @\n                if false\n                  py = opy\n                  px = opx - dc\n                else\n                  d = sqrt d\n                  if d < 0.1\n                    dy = -1\n                    d = dx * dx + dy * dy\n                    d = sqrt d\n                  d = dc / sqrt(d)\n                  py = opy + dy * d\n                  px = opx + dx * d\n                @px = px | 0\n                @py = py | 0\n                \n          ";
                    return x;
                  })(function(o) {
                    var cr, d, dc, dx, dy, ocr, opx, opy, px, py, sqrt;
                    px = o.px, py = o.py, cr = o.cr;
                    opx = o.px;
                    opy = o.py;
                    ocr = o.cr;
                    dx = px - opx;
                    dy = py - opy;
                    dc = cr + ocr;
                    if ((d = dx * dx + dy * dy) <= dc * dc) {
                      sqrt = this.sqrt;
                      if (false) {
                        py = opy;
                        px = opx - dc;
                      } else {
                        d = sqrt(d);
                        if (d < 0.1) {
                          dy = -1;
                          d = dx * dx + dy * dy;
                          d = sqrt(d);
                        }
                        d = dc / sqrt(d);
                        py = opy + dy * d;
                        px = opx + dx * d;
                      }
                      this.px = px | 0;
                      return this.py = py | 0;
                    }
                  });

                  return _Class;

                })(jaws.Sprite);

                Demo.prototype.Bubble = Bubble = Sprite;

                Demo.prototype.HappyBubble = HappyBubble = (function(_super) {
                  __extends(_Class, _super);

                  _Class.prototype.image = happybubble0;

                  function _Class() {
                    this.lr = 3;
                    this.tb = 3;
                    _Class.__super__.constructor.call(this);
                  }

                  _Class.prototype.draw = function() {
                    this.py--;
                    return _Class.__super__.draw.call(this);
                  };

                  return _Class;

                })(Bubble);

                Demo.prototype.GrumpyBubble = GrumpyBubble = (function(_super) {
                  __extends(_Class, _super);

                  _Class.prototype.image = grumpybubble0;

                  function _Class() {
                    this.lr = 6;
                    this.tb = 6;
                    _Class.__super__.constructor.call(this);
                  }

                  _Class.prototype.draw = function() {
                    this.py -= 3;
                    return _Class.__super__.draw.call(this);
                  };

                  return _Class;

                })(Bubble);

                Demo.prototype.EvilBubble = EvilBubble = (function(_super) {
                  __extends(_Class, _super);

                  _Class.prototype.image = evilbubble0;

                  function _Class() {
                    this.lr = 12;
                    this.tb = 12;
                    _Class.__super__.constructor.call(this);
                  }

                  _Class.prototype.draw = function() {
                    this.py -= 8;
                    return _Class.__super__.draw.call(this);
                  };

                  return _Class;

                })(Bubble);

                Demo.prototype.Stilla = Stilla = (function(_super) {
                  __extends(_Class, _super);

                  _Class.prototype.image = stilla0;

                  _Class.prototype.Bubble = _Class.Bubble;

                  function _Class() {
                    this.lr = 12;
                    this.tb = 12;
                    _Class.__super__.constructor.call(this);
                  }

                  return _Class;

                })(Bubble);

                Demo.prototype.Vaquita = Vaquita = (function(_super) {
                  __extends(_Class, _super);

                  _Class.prototype.twist = [pixyvaquita_twist_l, pixyvaquita_twist_r];

                  function _Class() {
                    this.lr = 18;
                    this.tb = 5;
                    _Class.__super__.constructor.call(this);
                  }

                  _Class.prototype.draw = function() {
                    if (this.vx < 0) {
                      this.lr = -18;
                    } else if (this.vx > 0) {
                      this.lr = 18;
                    }
                    return _Class.__super__.draw.call(this);
                  };

                  return _Class;

                })(Sprite);

                Demo.prototype.AiVaquita = AiVaquita = (function(_super) {
                  __extends(_Class, _super);

                  function _Class() {
                    this.image = pixyvaquita;
                    this.time = 0;
                    _Class.__super__.constructor.call(this);
                  }

                  _Class.prototype.beat_lr = 0;

                  _Class.prototype.draw = function() {
                    var rx, ry, s, vx, vy, y;
                    vx = this.vx + Math.floor(Math.random() * 3) - 1;
                    vy = this.vy + Math.floor(Math.random() * 3) - 1;
                    x = this.px;
                    y = this.py;
                    rx = 0.5 * x / screen_x1;
                    ry = 0.5 * y / screen_y1;
                    if ((s = vx * vx + vy * vy * 2) > 6) {
                      vx = Math.round(vx * 0.8 - rx);
                      vy = Math.round(vy * 0.8 - ry);
                    }
                    this.px += this.vx = vx;
                    this.py += this.vy = vy;
                    if ((this.time++ % 3) === 0) {
                      if (this.image !== pixyvaquita) {
                        this.image = pixyvaquita;
                      } else if (vx * vx + vy * vy > 2) {
                        this.image = this.twist[this.beat_lr++ & 1];
                      }
                    }
                    return _Class.__super__.draw.call(this);
                  };

                  return _Class;

                })(Vaquita);

                Demo.prototype.Vilma = Vilma = (function(_super) {
                  __extends(_Class, _super);

                  function _Class(game) {
                    var _ref2, _ref3;
                    this.game = game;
                    this.image = pixyvaquita;
                    this.time = 0;
                    _Class.__super__.constructor.call(this);
                    this.fpx = (_ref2 = this.px) != null ? _ref2 : 0;
                    this.fpy = (_ref3 = this.py) != null ? _ref3 : 0;
                    this.touch = this.game.touchInput;
                  }

                  _Class.prototype.beat_lr = 0;

                  _Class.prototype.move = function() {
                    var aq, ax, ay, itx, ity, touch, tx, ty, vx, vy;
                    touch = this.touch;
                    tx = touch.tx, ty = touch.ty;
                    itx = (tx >= 2 ? 2 : tx <= -2 ? -2 : 0);
                    ity = (ty >= 2 ? 2 : ty <= -2 ? -2 : 0);
                    touch.tx = tx * 0.9 - itx;
                    touch.ty = ty * 0.9 - ity;
                    ax = (jaws.pressed[leftKey] ? -1 : 0) + (jaws.pressed[rightKey] ? 1 : 0) - itx / 2;
                    ay = (jaws.pressed[upKey] ? -1 : 0) + (jaws.pressed[downKey] ? 1 : 0) - ity / 2;
                    if ((aq = ax * ax + ay * ay) > 1) {
                      aq = sqrt(aq);
                      ax /= aq;
                      ay /= aq;
                    }
                    ax *= 0.618;
                    ay *= 0.618;
                    vx = this.vx;
                    vy = this.vy;
                    if (ax * vx < 0) {
                      vx = 0;
                    } else {
                      vx += ax;
                      vx *= 0.9;
                    }
                    if (ay * vy < 0) {
                      vy = 0;
                    } else {
                      vy += ay;
                      vy *= 0.9;
                    }
                    this.vx = vx;
                    this.vy = vy;
                    this.px = (this.fpx += this.vx);
                    return this.py = (this.fpy += this.vy);
                  };

                  _Class.prototype.draw = function() {
                    var vx, vy;
                    vx = this.vx, vy = this.vy;
                    if ((this.time++ % 3) === 0) {
                      if (this.image !== pixyvaquita) {
                        this.image = pixyvaquita;
                      } else if (vx * vx + (vy * vy / 4) > 1) {
                        this.image = this.twist[this.beat_lr++ & 1];
                      }
                    }
                    return _Class.__super__.draw.call(this);
                  };

                  return _Class;

                })(Vaquita);

                Demo.prototype.addVaquita = function() {
                  var angle, v;
                  angle = Math.random() * 6.28;
                  v = new AiVaquita;
                  v.vx = 0;
                  v.vy = 0;
                  v.px = Math.floor(Math.sin(angle) * 300);
                  v.py = Math.floor(Math.cos(angle) * 300);
                  v.draw();
                  return this.vaquitas.push(v);
                };

                Demo.prototype.addStilla = (function(x) {
                  x.coffee = "(x, y)@>\n            return if @stilla?\n            v = new @Stilla\n            v.px = x\n            v.py = y\n            @stilla = v\n          ";
                  return x;
                })(function(x, y) {
                  var v;
                  if (this.stilla != null) {
                    return;
                  }
                  v = new this.Stilla;
                  v.px = x;
                  v.py = y;
                  return this.stilla = v;
                });

                Demo.prototype.addInto = (function(x) {
                  x.coffee = "(n, v, x, y)@>\n              v.vx = 0\n              v.vy = 0\n              v.px = x\n              v.py = y\n              b = @[n]\n              if (i = b.indexOf(null)) >= 0\n                b[i] = v\n              else\n                b.push v\n              v.draw()\n          ";
                  return x;
                })(function(n, v, x, y) {
                  var b, i;
                  v.vx = 0;
                  v.vy = 0;
                  v.px = x;
                  v.py = y;
                  b = this[n];
                  if ((i = b.indexOf(null)) >= 0) {
                    b[i] = v;
                  } else {
                    b.push(v);
                  }
                  return v.draw();
                });

                function Demo(vaquitas, cameos, stilla) {
                  this.vaquitas = vaquitas != null ? vaquitas : [];
                  this.cameos = cameos != null ? cameos : [];
                  this.stilla = stilla != null ? stilla : null;
                }

                Demo.prototype.encounters = {
                  __proto__: {
                    encounter: encounter = {
                      add: (function(x) {
                        x.coffee = "(game, x, y)@> game.addInto('cameos', new @creature(), x, y)";
                        return x;
                      })(function(game, x, y) {
                        return game.addInto('cameos', new this.creature(), x, y);
                      }),
                      vy: 0
                    },
                    random: Math.random,
                    log: Math.log,
                    exp: Math.exp,
                    pow: Math.pow,
                    poissonSample: (function(x) {
                      x.coffee = "(m)@>\n                { exp, random } = @\n                pgen = (m)->\n                    x = 0\n                    p = exp(-m)\n                    s = p\n                    u = random()\n                    while u > s\n                        x++\n                        p = p * m / x\n                        s += p\n                    x\n                s = 0\n                while m > 50\n                  s += pgen 50\n                  m -= 50\n                s + pgen m\n              ";
                      return x;
                    })(function(m) {
                      var exp, pgen, random, s;
                      exp = this.exp, random = this.random;
                      pgen = function(m) {
                        var p, s, u, x;
                        x = 0;
                        p = exp(-m);
                        s = p;
                        u = random();
                        while (u > s) {
                          x++;
                          p = p * m / x;
                          s += p;
                        }
                        return x;
                      };
                      s = 0;
                      while (m > 50) {
                        s += pgen(50);
                        m -= 50;
                      }
                      return s + pgen(m);
                    }),
                    generate: (function(x) {
                      x.coffee = "(game,left,top,width,height,vx,vvy)@>\n                { probability, random } = @\n                genRect = (m,left,top,width,height)=>\n                  c = m.p * width * height\n                  # c = 0\n                  c = @poissonSample(c)\n                  # c = 0 # if c > 1000\n                  # c-- if random() > 0.15\n                  while c-- > 0\n                    m.add?( game, left + ((random() * width)|0), top + ((random() * height)|0) )\n                    1\n                if vx * vx >= width * width\n                  for k,v of @\n                    genRect(v, left, top, width, height)\n                else for k,v of @\n                  vy = vvy - v.vy\n                  if vy * vy >= height * height\n                    genRect(v, left, top, width, height)\n                  else if vx > 0\n                    if vy > 0\n                      genRect(v, left, top + height - vy, width, vy)\n                      genRect(v, left + width - vx, top, vx, height - vy)\n                    else if vy < 0\n                      genRect(v, left, top, width, -vy)\n                      genRect(v, left + width - vx, top - vy, vx, height + vy)\n                    else\n                      genRect(v, left + width, top, vx, height)\n                  else if vx < 0\n                    if vy > 0\n                      genRect(v, left, top + height - vy, width, vy)\n                      genRect(v, left, top, -vx, height - vy)\n                    else if vy < 0\n                      genRect(v, left, top, width, -vy)\n                      genRect(v, left, top - vy, -vx, height + vy)\n                    else\n                      genRect(v, left, top, -vx, height)\n                  else if vy > 0\n                    genRect(v, left, top + height - vy, width, vy)\n                  else if vy < 0\n                    genRect(v, left, top, width, -vy)\n            ";
                      return x;
                    })(function(game, left, top, width, height, vx, vvy) {
                      var genRect, k, probability, random, v, vy, _results, _results1;
                      probability = this.probability, random = this.random;
                      genRect = (function(_this) {
                        return function(m, left, top, width, height) {
                          var c, _results;
                          c = m.p * width * height;
                          c = _this.poissonSample(c);
                          _results = [];
                          while (c-- > 0) {
                            if (typeof m.add === "function") {
                              m.add(game, left + ((random() * width) | 0), top + ((random() * height) | 0));
                            }
                            _results.push(1);
                          }
                          return _results;
                        };
                      })(this);
                      if (vx * vx >= width * width) {
                        _results = [];
                        for (k in this) {
                          v = this[k];
                          _results.push(genRect(v, left, top, width, height));
                        }
                        return _results;
                      } else {
                        _results1 = [];
                        for (k in this) {
                          v = this[k];
                          vy = vvy - v.vy;
                          if (vy * vy >= height * height) {
                            _results1.push(genRect(v, left, top, width, height));
                          } else if (vx > 0) {
                            if (vy > 0) {
                              genRect(v, left, top + height - vy, width, vy);
                              _results1.push(genRect(v, left + width - vx, top, vx, height - vy));
                            } else if (vy < 0) {
                              genRect(v, left, top, width, -vy);
                              _results1.push(genRect(v, left + width - vx, top - vy, vx, height + vy));
                            } else {
                              _results1.push(genRect(v, left + width, top, vx, height));
                            }
                          } else if (vx < 0) {
                            if (vy > 0) {
                              genRect(v, left, top + height - vy, width, vy);
                              _results1.push(genRect(v, left, top, -vx, height - vy));
                            } else if (vy < 0) {
                              genRect(v, left, top, width, -vy);
                              _results1.push(genRect(v, left, top - vy, -vx, height + vy));
                            } else {
                              _results1.push(genRect(v, left, top, -vx, height));
                            }
                          } else if (vy > 0) {
                            _results1.push(genRect(v, left, top + height - vy, width, vy));
                          } else if (vy < 0) {
                            _results1.push(genRect(v, left, top, width, -vy));
                          } else {
                            _results1.push(void 0);
                          }
                        }
                        return _results1;
                      }
                    })
                  },
                  happybubble: {
                    __proto__: encounter,
                    p: 1 / 1000,
                    creature: HappyBubble,
                    vy: -1
                  },
                  grumpybubble: {
                    __proto__: encounter,
                    p: 1 / 9000,
                    creature: GrumpyBubble,
                    vy: -3
                  },
                  evilbubble: {
                    __proto__: encounter,
                    p: 1 / 18000,
                    creature: EvilBubble,
                    vy: -8
                  },
                  stilla: {
                    __proto__: encounter,
                    p: 1 / 40000,
                    add: (function(x) {
                      x.coffee = "(game, x, y)@> game.addStilla(x, y)";
                      return x;
                    })(function(game, x, y) {
                      return game.addStilla(x, y);
                    })
                  }
                };

                Demo.prototype.touchInput = {
                  tx: 0,
                  ty: 0,
                  ongoing: {},
                  __proto__: {
                    "eval": eval,
                    start: (function(x) {
                      x.coffee = "(ev,el)@>\n                { ongoing } = @\n                for t in ev.changedTouches\n                  { identifier, pageX, pageY } = t\n                  ongoing[identifier] =\n                    px: pageX\n                    py: pageY\n              ";
                      return x;
                    })(function(ev, el) {
                      var identifier, ongoing, pageX, pageY, t, _i, _len, _ref, _results;
                      ongoing = this.ongoing;
                      _ref = ev.changedTouches;
                      _results = [];
                      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
                        t = _ref[_i];
                        identifier = t.identifier, pageX = t.pageX, pageY = t.pageY;
                        _results.push(ongoing[identifier] = {
                          px: pageX,
                          py: pageY
                        });
                      }
                      return _results;
                    }),
                    move: (function(x) {
                      x.coffee = "(ev,el)@>\n                { ongoing } = @\n                for t in ev.changedTouches\n                  { identifier, pageX, pageY } = t\n                  o = ongoing[identifier]\n                  @tx += pageX - o.px\n                  @ty += pageY - o.py\n                  o.px = pageX\n                  o.py = pageY\n              ";
                      return x;
                    })(function(ev, el) {
                      var identifier, o, ongoing, pageX, pageY, t, _i, _len, _ref, _results;
                      ongoing = this.ongoing;
                      _ref = ev.changedTouches;
                      _results = [];
                      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
                        t = _ref[_i];
                        identifier = t.identifier, pageX = t.pageX, pageY = t.pageY;
                        o = ongoing[identifier];
                        this.tx += pageX - o.px;
                        this.ty += pageY - o.py;
                        o.px = pageX;
                        _results.push(o.py = pageY);
                      }
                      return _results;
                    }),
                    end: (function(x) {
                      x.coffee = "(ev,el)@>\n                { ongoing } = @\n                for t in ev.changedTouches\n                  { identifier } = t\n                  delete ongoing[identifier]\n              ";
                      return x;
                    })(function(ev, el) {
                      var identifier, ongoing, t, _i, _len, _ref, _results;
                      ongoing = this.ongoing;
                      _ref = ev.changedTouches;
                      _results = [];
                      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
                        t = _ref[_i];
                        identifier = t.identifier;
                        _results.push(delete ongoing[identifier]);
                      }
                      return _results;
                    }),
                    handle: function(name) {
                      var touchInput;
                      touchInput = this;
                      return function(event) {
                        var err;
                        event.preventDefault();
                        event.stopPropagation();
                        try {
                          return touchInput[name](event, this);
                        } catch (_error) {
                          err = _error;
                          return alert(err.toString());
                        }
                      };
                    }
                  }
                };

                Demo.prototype.ColorPlane = ColorPlane = (function() {
                  return {
                    document: document,
                    init: (function(x) {
                      x.coffee = "@>\n              { color } = @\n              if color and typeof color is 'string'\n                e = @document.createElement \"canvas\"\n                e.width   = @w\n                e.height  = @h\n                ctx = e.getContext '2d'\n                @color = ctx.fillStyle = color\n            ";
                      return x;
                    })(function() {
                      var color, ctx, e;
                      color = this.color;
                      if (color && typeof color === 'string') {
                        e = this.document.createElement("canvas");
                        e.width = this.w;
                        e.height = this.h;
                        ctx = e.getContext('2d');
                        return this.color = ctx.fillStyle = color;
                      }
                    }),
                    frame: (function(x) {
                      x.coffee = "(t)@>\n              # t.save()\n              t.fillStyle = @color\n              t.fillRect 0,0,1024,1024\n              # t.restore()\n          ";
                      return x;
                    })(function(t) {
                      t.fillStyle = this.color;
                      return t.fillRect(0, 0, 1024, 1024);
                    })
                  };
                })();

                Demo.prototype.GenericPlane = GenericPlane = {
                  document: document,
                  init: (function(x) {
                    x.coffee = "@>\n              { document } = @\n              e = document.createElement \"canvas\"\n              e.width   = @w\n              e.height  = @h\n              @ctx = e.getContext '2d'\n          ";
                    return x;
                  })(function() {
                    var document, e;
                    document = this.document;
                    e = document.createElement("canvas");
                    e.width = this.w;
                    e.height = this.h;
                    return this.ctx = e.getContext('2d');
                  })
                };

                Demo.prototype.ParallaxPlane = ParallaxPlane = {
                  __proto__: GenericPlane,
                  ParallaxPlaneSuper: GenericPlane,
                  lower: null,
                  logscale: 2,
                  x: 0,
                  y: 0,
                  fx: 0,
                  fy: 0,
                  frame: (function(x) {
                    x.coffee = "(t,dx,dy)@>\n              { fx, fy, x, y, logscale, w, h, ctx } = @\n              nfx = fx + dx\n              nfy = fy + dy\n              nx = nfx >> logscale\n              ny = nfy >> logscale\n              if nx isnt x\n                if nx >= w\n                  nx -= w\n                  nfx -= w << logscale\n                else if nx < 0\n                  nx += w\n                  nfx += w << logscale\n                @x = nx\n              if ny isnt y\n                if ny >= h\n                  ny -= h\n                  nfy -= h << logscale\n                else if ny < 0\n                  ny += h\n                  nfy += h << logscale\n                @y = ny\n              @fx = nfx\n              @fy = nfy\n              @lower?.frame t, dx >> logscale, dy >> logscale\n              { canvas } = ctx\n              t.drawImage canvas,  nx,      ny\n              t.drawImage canvas,  nx - w,  ny\n              t.drawImage canvas,  nx,      ny - h\n              t.drawImage canvas,  nx - w,  ny - h\n            ";
                    return x;
                  })(function(t, dx, dy) {
                    var canvas, ctx, fx, fy, h, logscale, nfx, nfy, nx, ny, w, x, y, _ref;
                    fx = this.fx, fy = this.fy, x = this.x, y = this.y, logscale = this.logscale, w = this.w, h = this.h, ctx = this.ctx;
                    nfx = fx + dx;
                    nfy = fy + dy;
                    nx = nfx >> logscale;
                    ny = nfy >> logscale;
                    if (nx !== x) {
                      if (nx >= w) {
                        nx -= w;
                        nfx -= w << logscale;
                      } else if (nx < 0) {
                        nx += w;
                        nfx += w << logscale;
                      }
                      this.x = nx;
                    }
                    if (ny !== y) {
                      if (ny >= h) {
                        ny -= h;
                        nfy -= h << logscale;
                      } else if (ny < 0) {
                        ny += h;
                        nfy += h << logscale;
                      }
                      this.y = ny;
                    }
                    this.fx = nfx;
                    this.fy = nfy;
                    if ((_ref = this.lower) != null) {
                      _ref.frame(t, dx >> logscale, dy >> logscale);
                    }
                    canvas = ctx.canvas;
                    t.drawImage(canvas, nx, ny);
                    t.drawImage(canvas, nx - w, ny);
                    t.drawImage(canvas, nx, ny - h);
                    return t.drawImage(canvas, nx - w, ny - h);
                  }),
                  init: (function(x) {
                    x.coffee = "@>\n              @lower?.init()\n              @ParallaxPlaneSuper.init.call @\n          ";
                    return x;
                  })(function() {
                    var _ref;
                    if ((_ref = this.lower) != null) {
                      _ref.init();
                    }
                    return this.ParallaxPlaneSuper.init.call(this);
                  })
                };

                Demo.prototype.SeamlessPlane = SeamlessPlane = {
                  withRect: (function(x) {
                    x.coffee = "(rx,ry,rw,rh,cb)@>\n              { w, h } = @\n              if (ex = rx + rw) > w\n                if (ey = ry + rh) > h\n                  cb  rx,  ry,  w - rx,  h - ry, 0,      0\n                  cb  0,   ry,  ex - w,  h - ry, w - rx, 0\n                  cb  rx,  0,   w - rx,  ey - h, 0,      h - ry\n                  cb  0,   0,   ex - w,  ey - h, w - rx, h - ry\n                else\n                  cb rx, ry, w - rx, rh, 0,      0\n                  cb 0,  ry, ex - w, rh, w - rx, 0\n              else\n                if (ey = ry + rh) > h\n                  cb rx, ry, rw, h - ry, 0, 0\n                  cb rx, 0,  rw, ey - h, 0, h - ry\n                else\n                  cb rx, ry, rw, rh, 0, 0\n            ";
                    return x;
                  })(function(rx, ry, rw, rh, cb) {
                    var ex, ey, h, w;
                    w = this.w, h = this.h;
                    if ((ex = rx + rw) > w) {
                      if ((ey = ry + rh) > h) {
                        cb(rx, ry, w - rx, h - ry, 0, 0);
                        cb(0, ry, ex - w, h - ry, w - rx, 0);
                        cb(rx, 0, w - rx, ey - h, 0, h - ry);
                        return cb(0, 0, ex - w, ey - h, w - rx, h - ry);
                      } else {
                        cb(rx, ry, w - rx, rh, 0, 0);
                        return cb(0, ry, ex - w, rh, w - rx, 0);
                      }
                    } else {
                      if ((ey = ry + rh) > h) {
                        cb(rx, ry, rw, h - ry, 0, 0);
                        return cb(rx, 0, rw, ey - h, 0, h - ry);
                      } else {
                        return cb(rx, ry, rw, rh, 0, 0);
                      }
                    }
                  }),
                  __proto__: ParallaxPlane
                };

                Demo.prototype.WaterPlane = WaterPlane = (function() {
                  var waterscapeSuper;
                  return {
                    waterscapeSuper: waterscapeSuper = SeamlessPlane,
                    __proto__: waterscapeSuper,
                    random: Math.random,
                    sqrt: Math.sqrt,
                    colors: ["cyan", "blue"],
                    randomStuff: (function(x) {
                      x.coffee = "@>\n              { random, sqrt, ctx } = @\n              s = sqrt(15000 / (random() * 50 + 1)) | 0\n              @withRect (random() * @w | 0), (random() * @h | 0), s, s >> 2, (x,y,w,h)->\n                ctx.fillRect x,y,w,h\n              @\n            ";
                      return x;
                    })(function() {
                      var ctx, random, s, sqrt;
                      random = this.random, sqrt = this.sqrt, ctx = this.ctx;
                      s = sqrt(15000 / (random() * 50 + 1)) | 0;
                      this.withRect(random() * this.w | 0, random() * this.h | 0, s, s >> 2, function(x, y, w, h) {
                        return ctx.fillRect(x, y, w, h);
                      });
                      return this;
                    }),
                    init: (function(x) {
                      x.coffee = "@>\n              { lower, w, h, moltf, colors } = @\n              if lower?\n                lower.w ?= w\n                lower.h ?= h\n                lower.moltf ?= moltf >> lower.logscale if moltf?\n              @waterscapeSuper.init.call @\n              { ctx } = @\n              for k,v of colors\n                ctx.fillStyle = v\n                colors[k] = ctx.fillStyle\n              ctx.globalAlpha = 0.1\n              if true\n                x = 200\n                while x-- > 0\n                  @randomStuff()\n            ";
                      return x;
                    })(function() {
                      var colors, ctx, h, k, lower, moltf, v, w, x, _results;
                      lower = this.lower, w = this.w, h = this.h, moltf = this.moltf, colors = this.colors;
                      if (lower != null) {
                        if (lower.w == null) {
                          lower.w = w;
                        }
                        if (lower.h == null) {
                          lower.h = h;
                        }
                        if (moltf != null) {
                          if (lower.moltf == null) {
                            lower.moltf = moltf >> lower.logscale;
                          }
                        }
                      }
                      this.waterscapeSuper.init.call(this);
                      ctx = this.ctx;
                      for (k in colors) {
                        v = colors[k];
                        ctx.fillStyle = v;
                        colors[k] = ctx.fillStyle;
                      }
                      ctx.globalAlpha = 0.1;
                      if (true) {
                        x = 200;
                        _results = [];
                        while (x-- > 0) {
                          _results.push(this.randomStuff());
                        }
                        return _results;
                      }
                    }),
                    waterscapeSuperFrame: waterscapeSuper.frame,
                    frame: (function(x) {
                      x.coffee = "(t)@>\n              { ctx, moltf, random } = @\n              \n              ctx.fillStyle = @colors[ random() * 1.2 | 0 ]\n              @randomStuff() while moltf-- > 0\n\n              # t.save()\n              t.globalAlpha = @alpha\n              @waterscapeSuperFrame.apply @, arguments\n              # t.restore()\n            ";
                      return x;
                    })(function(t) {
                      var ctx, moltf, random;
                      ctx = this.ctx, moltf = this.moltf, random = this.random;
                      ctx.fillStyle = this.colors[random() * 1.2 | 0];
                      while (moltf-- > 0) {
                        this.randomStuff();
                      }
                      t.globalAlpha = this.alpha;
                      return this.waterscapeSuperFrame.apply(this, arguments);
                    }),
                    logscale: 0
                  };
                })();

                Demo.prototype.waterscape = waterscape = (function() {
                  return {
                    __proto__: WaterPlane,
                    logscale: 0,
                    moltf: 12,
                    colors: ["#051555", "#33ddff"],
                    alpha: 0.3,
                    lower: {
                      logscale: 2,
                      __proto__: WaterPlane,
                      colors: ["#000033", "#001155"],
                      alpha: 0.2,
                      lower: {
                        color: "#051555",
                        __proto__: ColorPlane
                      }
                    }
                  };
                })();

                Demo.prototype.bluescape = {
                  __proto__: SeamlessPlane,
                  bluescapeSuper: SeamlessPlane,
                  lower: waterscape,
                  frame: (function(x) {
                    x.coffee = "(t,sx,sy)@>\n              { ctx, random, w, h } = @\n\n              x = @x + sx\n              x = (x + w) % w\n              y = (y + h) % h\n              @x = x\n              y = @y + sy\n              y += h while y < 0\n              y -= h while y >= h\n              @y = y\n              # i = ctx.getImageData(0,0,@w,@h)\n\n              ctx.save()\n              @lower.frame ctx, sx, sy\n              ctx.restore()\n              # t.save()\n              # t.globalCompositeOperation = 'copy'\n\n              t.drawImage ctx.canvas, 0,0,w,h, 0,0,w*4,h*4\n              \n              # t.drawImage ctx.canvas, 0,0,w>>2,h>>2, 0,0,w*2,h*2\n\n              # t.drawImage ctx.canvas, 0,0,w>>2,h>>2, 0,0,w*2,h>>2\n              # t.drawImage t.canvas, 0,0,w*2,h>>2, 0,0,w*2,h*2\n\n              # t.restore()\n              # @withRect x, y, rx*2, ry*2, (x,y,w,h,ox,oy)-> t.drawImage c, x,y,w,h, ox*2,oy*2,w*2,h*2\n              # t.drawImage c, 0, 0, \n              # t.fillColor = if random() > 0.5 then \"#104080\" else \"#155590\"\n              # t.fillRect 0, 0, 100, 100\n              # t.clearRect 0, 0, 100, 100\n              # t.drawImage t, 0, 0, 100, 100, 50, 50, 100, 100\n            ";
                    return x;
                  })(function(t, sx, sy) {
                    var ctx, h, random, w, x, y;
                    ctx = this.ctx, random = this.random, w = this.w, h = this.h;
                    x = this.x + sx;
                    x = (x + w) % w;
                    y = (y + h) % h;
                    this.x = x;
                    y = this.y + sy;
                    while (y < 0) {
                      y += h;
                    }
                    while (y >= h) {
                      y -= h;
                    }
                    this.y = y;
                    ctx.save();
                    this.lower.frame(ctx, sx, sy);
                    ctx.restore();
                    return t.drawImage(ctx.canvas, 0, 0, w, h, 0, 0, w * 4, h * 4);
                  }),
                  init: (function(x) {
                    x.coffee = "@>\n              { w, h, lower } = @\n\n              @w = w\n              @h = h\n\n              lower.w = (w >> 2) * 5\n              lower.h = (h >> 2) * 5\n\n              @bluescapeSuper.init.call @\n\n              { ctx } = @\n\n              # ctx.fillStyle = \"#0099dd\"\n              # ctx.fillRect 0, 0, @w, @h\n              \n          ";
                    return x;
                  })(function() {
                    var ctx, h, lower, w;
                    w = this.w, h = this.h, lower = this.lower;
                    this.w = w;
                    this.h = h;
                    lower.w = (w >> 2) * 5;
                    lower.h = (h >> 2) * 5;
                    this.bluescapeSuper.init.call(this);
                    return ctx = this.ctx, this;
                  })
                };

                Demo.prototype.setup = function() {
                  var bluescape, radx, rady, tend, touchInput, v;
                  bluescape = this.bluescape, radx = this.radx, rady = this.rady;
                  bluescape.w = radx;
                  bluescape.h = rady;
                  bluescape.init();
                  v = new Vilma(this);
                  v.px = 0;
                  v.py = 0;
                  v.vx = 0;
                  v.vy = 0;
                  this.vilma = v;
                  this.encounters.generate(this, -radx, -rady, radx * 2, rady * 2, radx * 2, 0);
                  touchInput = this.touchInput;
                  touchInput.game = this;
                  x = document.body;
                  x.addEventListener("touchmove", touchInput.handle('move'), true);
                  x.addEventListener("touchstart", touchInput.handle('start'), true);
                  tend = touchInput.handle('end');
                  x.addEventListener("touchend", tend, true);
                  x.addEventListener("touchleave", tend, true);
                  x.addEventListener("touchcancel", tend, true);
                  return this.collisions.setup(radx, rady);
                };

                Demo.prototype.radx = screen_x1;

                Demo.prototype.rady = screen_y1;

                Demo.prototype.rad = screen_x1 * screen_x1 + screen_y1 * screen_y1;

                Demo.prototype.collisions = {
                  Array: Array,
                  setup: (function(x) {
                    x.coffee = "(radx, rady)@>\n              # Setup the collision detection subsystem\n              # Assumes:\n              # - radx and rady are multiples of 8\n              w = @w = (radx >> 2)\n              h = @h = (rady >> 2)\n              @b = new @Array(w * h)\n              @o = (w >> 1) * h + (h >> 1) + 1\n              @l = [ ]\n            ";
                    return x;
                  })(function(radx, rady) {
                    var h, w;
                    w = this.w = radx >> 2;
                    h = this.h = rady >> 2;
                    this.b = new this.Array(w * h);
                    this.o = (w >> 1) * h + (h >> 1) + 1;
                    return this.l = [];
                  }),
                  a: (function(x) {
                    x.coffee = "(o)@>\n              # Add a collision subject\n              # Assumes:\n              # - all the corners of the object's collision area are in the viewing area\n              # - the object's collision radius is <= 8\n              { l, b, w } = @\n              i = @o + (o.py >> 3) * @w + (o.px >> 3)\n              @b[i-1] = @b[i+1] = @b[i] = o\n              i -= w\n              @b[i-1] = @b[i+1] = @b[i] = o\n              i += w << 1\n              @b[i-1] = @b[i+1] = @b[i] = o\n              @l.push o\n              \n              # o.crad\n            ";
                    return x;
                  })(function(o) {
                    var b, i, l, w;
                    l = this.l, b = this.b, w = this.w;
                    i = this.o + (o.py >> 3) * this.w + (o.px >> 3);
                    this.b[i - 1] = this.b[i + 1] = this.b[i] = o;
                    i -= w;
                    this.b[i - 1] = this.b[i + 1] = this.b[i] = o;
                    i += w << 1;
                    this.b[i - 1] = this.b[i + 1] = this.b[i] = o;
                    return this.l.push(o);
                  }),
                  q: (function(x) {
                    x.coffee = "(o)@>\n              # Quick collision test\n              # Test collisions of object against previously added collision subjects\n              # For this to work correctly:\n              # - the object should have a collision radius <= 4,\n              # - have a center in the viewing area\n              @b[@o + (o.py >> 3) * @w + (o.px >> 3)]?.collide(o)\n            # t2: (o)@>\n            # Like above but for objects with a collision radius <= 8\n            ";
                    return x;
                  })(function(o) {
                    var _ref;
                    return (_ref = this.b[this.o + (o.py >> 3) * this.w + (o.px >> 3)]) != null ? _ref.collide(o) : void 0;
                  }),
                  clear: (function(x) {
                    x.coffee = "@>\n              @b = new @Array(@b.length) # Discrete board for detecting collisions\n              @l = [ ] # List of collisions targets\n          ";
                    return x;
                  })(function() {
                    this.b = new this.Array(this.b.length);
                    return this.l = [];
                  })
                };

                Demo.prototype.draw = (function(x) {
                  x.coffee = "@>\n            { jaws, spaceKey, radx, rady, vilma, vaquitas, cameos, stilla, rad, collisions } = @\n            @addVaquita() if (!(@gameloop.ticks & 0x7f) and vaquitas.length < 7) or jaws.pressed[spaceKey]\n            vilma.fpx += vilma.px\n            vilma.fpy += vilma.py\n            vilma.move()\n            { px, py } = vilma\n            vilma.fpx = 0\n            vilma.fpy = 0\n            vilma.px = 0\n            vilma.py = 0\n            px = px | 0\n            py = py | 0\n            @bluescape.frame jaws.context, -px, -py\n            collisions.a vilma\n            for v in vaquitas\n              x = v.px -= px\n              y = v.py -= py\n              v.draw()\n              if (x >= -radx) and (x < radx) and (y >= -rady) and (y < rady)\n                collisions.a v\n            vilma.draw()\n            if stilla?\n              x = stilla.px -= px\n              y = stilla.py -= py\n              if x * x + y * y > rad * 16\n                @stilla = null\n              else\n                stilla.draw(collisions)\n                if (x >= -radx) and (x < radx) and (y >= -rady) and (y < rady)\n                  collisions.a stilla\n            for k,v of cameos\n              continue unless v?\n              x = v.px -= px\n              y = v.py -= py\n              if (x < -radx) or (x >= radx) or (y < -rady) or (y >= rady)\n                cameos[k] = null\n              else\n                v.draw()\n                collisions.q v\n            @encounters.generate(@,-radx, -rady, radx * 2, rady * 2, px, py)\n            collisions.clear()\n              \n            if (@gameloop.ticks & 0xff) is 0xff\n              fps.innerHTML = \"#{@gameloop.fps} fps\"\n          ";
                  return x;
                })(function() {
                  var cameos, collisions, jaws, k, px, py, rad, radx, rady, spaceKey, stilla, v, vaquitas, vilma, x, y, _i, _len;
                  jaws = this.jaws, spaceKey = this.spaceKey, radx = this.radx, rady = this.rady, vilma = this.vilma, vaquitas = this.vaquitas, cameos = this.cameos, stilla = this.stilla, rad = this.rad, collisions = this.collisions;
                  if ((!(this.gameloop.ticks & 0x7f) && vaquitas.length < 7) || jaws.pressed[spaceKey]) {
                    this.addVaquita();
                  }
                  vilma.fpx += vilma.px;
                  vilma.fpy += vilma.py;
                  vilma.move();
                  px = vilma.px, py = vilma.py;
                  vilma.fpx = 0;
                  vilma.fpy = 0;
                  vilma.px = 0;
                  vilma.py = 0;
                  px = px | 0;
                  py = py | 0;
                  this.bluescape.frame(jaws.context, -px, -py);
                  collisions.a(vilma);
                  for (_i = 0, _len = vaquitas.length; _i < _len; _i++) {
                    v = vaquitas[_i];
                    x = v.px -= px;
                    y = v.py -= py;
                    v.draw();
                    if ((x >= -radx) && (x < radx) && (y >= -rady) && (y < rady)) {
                      collisions.a(v);
                    }
                  }
                  vilma.draw();
                  if (stilla != null) {
                    x = stilla.px -= px;
                    y = stilla.py -= py;
                    if (x * x + y * y > rad * 16) {
                      this.stilla = null;
                    } else {
                      stilla.draw(collisions);
                      if ((x >= -radx) && (x < radx) && (y >= -rady) && (y < rady)) {
                        collisions.a(stilla);
                      }
                    }
                  }
                  for (k in cameos) {
                    v = cameos[k];
                    if (v == null) {
                      continue;
                    }
                    x = v.px -= px;
                    y = v.py -= py;
                    if ((x < -radx) || (x >= radx) || (y < -rady) || (y >= rady)) {
                      cameos[k] = null;
                    } else {
                      v.draw();
                      collisions.q(v);
                    }
                  }
                  this.encounters.generate(this, -radx, -rady, radx * 2, rady * 2, px, py);
                  collisions.clear();
                  if ((this.gameloop.ticks & 0xff) === 0xff) {
                    return fps.innerHTML = "" + this.gameloop.fps + " fps";
                  }
                });

                Demo.prototype.jaws = jaws;

                Demo.prototype.spaceKey = spaceKey;

                return Demo;

              })();
              if (true) {
                jaws.init();
                jaws.setupInput();
                window.game = game = new Demo;
                gameloop = new jaws.GameLoop(game, {
                  fps: 24
                });
                return (game.gameloop = gameloop).start();
              } else {
                return jaws.start(Demo, {
                  fps: 25
                });
              }
            };
            return window.addEventListener('load', (function(e) {
              if (window.applicationCache) {
                return window.applicationCache.addEventListener('updateready', (function(e) {
                  window.applicationCache.swapCache();
                  if (confirm('A new version of this site is available. Load it?')) {
                    return window.location.reload();
                  }
                }), false);
              }
            }), false);
          })();
        })();
</script></body></html>