From a4bb28727dc26d844ca7dd90bf91676511006349 Mon Sep 17 00:00:00 2001 From: sky Date: Tue, 2 Jan 2024 17:38:21 -0500 Subject: [PATCH] a few fixes, new game --- .../05b55dd4ac5dfd6b612d7a81923abb23.svg | 1 + .../083bfcfa18e5c5ca335fcdb525011740.svg | 1 + .../0f81679330324b675c4c8d0e7f204f43.svg | 1 + .../187385325a0ecd47149469b48e71e390.svg | 1 + .../27ca16619680d41cd7fc9b521ba99b69.svg | 1 + .../375aed5f67144a7cc4573d4bdb45d415.svg | 1 + .../7615745eed53fe195a20523ea5415db7.svg | 1 + .../7ce62f3b427d2e9c35234618ffa957d1.svg | 1 + .../88afda9805de2898ba809d7a95dad66b.svg | 1 + .../8a2f9fe2f680d7212a3c8ccdaa1b1be9.svg | 1 + .../9fa96a6d5530f0b96c521a1facc01934.svg | 1 + .../a2cecf1b8952d304a6b783135a7e4a2a.svg | 1 + .../bc50f82af4a96914bc2268699f1c9760.svg | 1 + bit-planes/bitplanes.png | Bin 0 -> 7412 bytes .../d05bb93fed7c4efcd74b1209b20d1341.svg | 1 + .../dda3b76e5f5d5ada75f7ed77a029c45d.svg | 1 + .../e38779734ef72069a74dc27428ce036b.svg | 1 + .../e6f45c5d0ad8e1b1a7a607a78897f56b.svg | 1 + .../ea9ab4eafa32d808a21401f86824b120.svg | 1 + .../ece21c104322781c96226d8acc53490f.svg | 1 + bit-planes/index.html | 112 +++++ bit-planes/index.js | 1 + bit-planes/styles.css | 419 ++++++++++++++++++ games.json | 5 + index.html | 17 +- js/games.js | 319 ++++++------- js/main.js | 8 +- js/search.js | 44 +- settings.html | 10 +- themes.css | 7 + 30 files changed, 785 insertions(+), 176 deletions(-) create mode 100644 bit-planes/05b55dd4ac5dfd6b612d7a81923abb23.svg create mode 100644 bit-planes/083bfcfa18e5c5ca335fcdb525011740.svg create mode 100644 bit-planes/0f81679330324b675c4c8d0e7f204f43.svg create mode 100644 bit-planes/187385325a0ecd47149469b48e71e390.svg create mode 100644 bit-planes/27ca16619680d41cd7fc9b521ba99b69.svg create mode 100644 bit-planes/375aed5f67144a7cc4573d4bdb45d415.svg create mode 100644 bit-planes/7615745eed53fe195a20523ea5415db7.svg create mode 100644 bit-planes/7ce62f3b427d2e9c35234618ffa957d1.svg create mode 100644 bit-planes/88afda9805de2898ba809d7a95dad66b.svg create mode 100644 bit-planes/8a2f9fe2f680d7212a3c8ccdaa1b1be9.svg create mode 100644 bit-planes/9fa96a6d5530f0b96c521a1facc01934.svg create mode 100644 bit-planes/a2cecf1b8952d304a6b783135a7e4a2a.svg create mode 100644 bit-planes/bc50f82af4a96914bc2268699f1c9760.svg create mode 100644 bit-planes/bitplanes.png create mode 100644 bit-planes/d05bb93fed7c4efcd74b1209b20d1341.svg create mode 100644 bit-planes/dda3b76e5f5d5ada75f7ed77a029c45d.svg create mode 100644 bit-planes/e38779734ef72069a74dc27428ce036b.svg create mode 100644 bit-planes/e6f45c5d0ad8e1b1a7a607a78897f56b.svg create mode 100644 bit-planes/ea9ab4eafa32d808a21401f86824b120.svg create mode 100644 bit-planes/ece21c104322781c96226d8acc53490f.svg create mode 100644 bit-planes/index.html create mode 100644 bit-planes/index.js create mode 100644 bit-planes/styles.css diff --git a/bit-planes/05b55dd4ac5dfd6b612d7a81923abb23.svg b/bit-planes/05b55dd4ac5dfd6b612d7a81923abb23.svg new file mode 100644 index 00000000..93d34e74 --- /dev/null +++ b/bit-planes/05b55dd4ac5dfd6b612d7a81923abb23.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bit-planes/083bfcfa18e5c5ca335fcdb525011740.svg b/bit-planes/083bfcfa18e5c5ca335fcdb525011740.svg new file mode 100644 index 00000000..c4472b09 --- /dev/null +++ b/bit-planes/083bfcfa18e5c5ca335fcdb525011740.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bit-planes/0f81679330324b675c4c8d0e7f204f43.svg b/bit-planes/0f81679330324b675c4c8d0e7f204f43.svg new file mode 100644 index 00000000..01aed824 --- /dev/null +++ b/bit-planes/0f81679330324b675c4c8d0e7f204f43.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bit-planes/187385325a0ecd47149469b48e71e390.svg b/bit-planes/187385325a0ecd47149469b48e71e390.svg new file mode 100644 index 00000000..04687a88 --- /dev/null +++ b/bit-planes/187385325a0ecd47149469b48e71e390.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bit-planes/27ca16619680d41cd7fc9b521ba99b69.svg b/bit-planes/27ca16619680d41cd7fc9b521ba99b69.svg new file mode 100644 index 00000000..a018eec8 --- /dev/null +++ b/bit-planes/27ca16619680d41cd7fc9b521ba99b69.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bit-planes/375aed5f67144a7cc4573d4bdb45d415.svg b/bit-planes/375aed5f67144a7cc4573d4bdb45d415.svg new file mode 100644 index 00000000..2255b2cb --- /dev/null +++ b/bit-planes/375aed5f67144a7cc4573d4bdb45d415.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bit-planes/7615745eed53fe195a20523ea5415db7.svg b/bit-planes/7615745eed53fe195a20523ea5415db7.svg new file mode 100644 index 00000000..cfab749d --- /dev/null +++ b/bit-planes/7615745eed53fe195a20523ea5415db7.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bit-planes/7ce62f3b427d2e9c35234618ffa957d1.svg b/bit-planes/7ce62f3b427d2e9c35234618ffa957d1.svg new file mode 100644 index 00000000..0ecea65a --- /dev/null +++ b/bit-planes/7ce62f3b427d2e9c35234618ffa957d1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bit-planes/88afda9805de2898ba809d7a95dad66b.svg b/bit-planes/88afda9805de2898ba809d7a95dad66b.svg new file mode 100644 index 00000000..bd7a3af3 --- /dev/null +++ b/bit-planes/88afda9805de2898ba809d7a95dad66b.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bit-planes/8a2f9fe2f680d7212a3c8ccdaa1b1be9.svg b/bit-planes/8a2f9fe2f680d7212a3c8ccdaa1b1be9.svg new file mode 100644 index 00000000..3bc59336 --- /dev/null +++ b/bit-planes/8a2f9fe2f680d7212a3c8ccdaa1b1be9.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bit-planes/9fa96a6d5530f0b96c521a1facc01934.svg b/bit-planes/9fa96a6d5530f0b96c521a1facc01934.svg new file mode 100644 index 00000000..c84b4274 --- /dev/null +++ b/bit-planes/9fa96a6d5530f0b96c521a1facc01934.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bit-planes/a2cecf1b8952d304a6b783135a7e4a2a.svg b/bit-planes/a2cecf1b8952d304a6b783135a7e4a2a.svg new file mode 100644 index 00000000..887f6d5b --- /dev/null +++ b/bit-planes/a2cecf1b8952d304a6b783135a7e4a2a.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bit-planes/bc50f82af4a96914bc2268699f1c9760.svg b/bit-planes/bc50f82af4a96914bc2268699f1c9760.svg new file mode 100644 index 00000000..edd1e3ff --- /dev/null +++ b/bit-planes/bc50f82af4a96914bc2268699f1c9760.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bit-planes/bitplanes.png b/bit-planes/bitplanes.png new file mode 100644 index 0000000000000000000000000000000000000000..91d64a46010fa899de43cdc2baa94af5a0b91a7a GIT binary patch literal 7412 zcmdT}Td)<##>N$F@8)@o(Io)@)R77@AGCdQ z4g>u>jcvSl9#$V6eFBp492|hq zE741GmP%SYp%tHIJ=_?_5FVd`8<%urXa|D7THy;nLg0FwNfw3j2 zlO)~+J?bH|4uQfuT@P4x6Ye9+lHAEmx_$qDwTMjiJlO{t1=HS$8Mk9EJ40-IKb zmZ;%po(zvyo$2xIx9@-n67h%p>w7|9Oft0Yx?|hNokwfdYV_{WwxdOl>%2>&#_F&N zvR~|n8PQq;e%VDWrQ=NGGDfKGMrU@?|7d$CBq-P)-Gk3&e9NZCSD(B&{PFo{$u_~R z{#xQcN(p~k6*p+pWCD>PX5#r|m(R6N2C%1vFHg9U4(mO%^}{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1-#*H818MG-%A01}-i%B>a znZDaZ#_^7LM(3BLTR+L!OjrWs#kUhp;~E8o2? z3S!|&vaL(k(l*ZKKsQx|lcm)O2G2(hMjM#)^r}r=%Opb@Cs4CI7Ye}`I)N17gJnu@ z+0U!3k|i8?Tgtk4x8$I9kl~qY3ZCuh-S_3=yib1~CCK>Uww$H7MA5-|$3c@Xm88Sa zHRR%bX1ifW_jHn?DOaL5mnVG1#YnqzUFUOC9GU2!U3NUw^!Y#)T)6s_2&K@n+sF?q z$E(&ZjTv%E$4wmGZ(kgVQet<6gD|WmrjrcYYb`%{$(!zS(=N2kGk^UT!>l=d`P;J0 zi@BR3FarK<%&GiJR85fsueK2G^qss@Jmb^v!r=CbMriX9&m{*3 \ No newline at end of file diff --git a/bit-planes/dda3b76e5f5d5ada75f7ed77a029c45d.svg b/bit-planes/dda3b76e5f5d5ada75f7ed77a029c45d.svg new file mode 100644 index 00000000..0a55887e --- /dev/null +++ b/bit-planes/dda3b76e5f5d5ada75f7ed77a029c45d.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bit-planes/e38779734ef72069a74dc27428ce036b.svg b/bit-planes/e38779734ef72069a74dc27428ce036b.svg new file mode 100644 index 00000000..33cc813f --- /dev/null +++ b/bit-planes/e38779734ef72069a74dc27428ce036b.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bit-planes/e6f45c5d0ad8e1b1a7a607a78897f56b.svg b/bit-planes/e6f45c5d0ad8e1b1a7a607a78897f56b.svg new file mode 100644 index 00000000..2015170e --- /dev/null +++ b/bit-planes/e6f45c5d0ad8e1b1a7a607a78897f56b.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bit-planes/ea9ab4eafa32d808a21401f86824b120.svg b/bit-planes/ea9ab4eafa32d808a21401f86824b120.svg new file mode 100644 index 00000000..05634095 --- /dev/null +++ b/bit-planes/ea9ab4eafa32d808a21401f86824b120.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bit-planes/ece21c104322781c96226d8acc53490f.svg b/bit-planes/ece21c104322781c96226d8acc53490f.svg new file mode 100644 index 00000000..7fe7fa75 --- /dev/null +++ b/bit-planes/ece21c104322781c96226d8acc53490f.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/bit-planes/index.html b/bit-planes/index.html new file mode 100644 index 00000000..f171b932 --- /dev/null +++ b/bit-planes/index.html @@ -0,0 +1,112 @@ + + + + + + + Bit Planes + + +
+
+ + + +

+ + Bit Planes + +

+

+ Controls:
+

+
    +
  • Arrows — thrust level.
  • +
  • Arrows — elevator controls.
  • +
  • Space — fire a gun. X — deploy a missile.
  • +
  • C — catapult / parachute and get new plane at the barn.
  • +
+ +
+ +

+ Game mode: +

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ +
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ + + + + + + + + diff --git a/bit-planes/index.js b/bit-planes/index.js new file mode 100644 index 00000000..f26f6b29 --- /dev/null +++ b/bit-planes/index.js @@ -0,0 +1 @@ +!function(M){var j={};function t(L){if(j[L])return j[L].exports;var N=j[L]={i:L,l:!1,exports:{}};return M[L].call(N.exports,N,N.exports,t),N.l=!0,N.exports}t.m=M,t.c=j,t.d=function(M,j,L){t.o(M,j)||Object.defineProperty(M,j,{enumerable:!0,get:L})},t.r=function(M){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(M,"__esModule",{value:!0})},t.t=function(M,j){if(1&j&&(M=t(M)),8&j)return M;if(4&j&&"object"==typeof M&&M&&M.__esModule)return M;var L=Object.create(null);if(t.r(L),Object.defineProperty(L,"default",{enumerable:!0,value:M}),2&j&&"string"!=typeof M)for(var N in M)t.d(L,N,function(j){return M[j]}.bind(null,N));return L},t.n=function(M){var j=M&&M.__esModule?function(){return M.default}:function(){return M};return t.d(j,"a",j),j},t.o=function(M,j){return Object.prototype.hasOwnProperty.call(M,j)},t.p="",t(t.s=87)}([function(M,j,t){"use strict";function L(M,j){return{x:M,y:j}}function N(M){return L(M.x,M.y)}t.d(j,"s",(function(){return L})),t.d(j,"c",(function(){return N})),t.d(j,"g",(function(){return i})),t.d(j,"d",(function(){return u})),t.d(j,"f",(function(){return e})),t.d(j,"a",(function(){return I})),t.d(j,"r",(function(){return D})),t.d(j,"e",(function(){return g})),t.d(j,"l",(function(){return a})),t.d(j,"n",(function(){return y})),t.d(j,"m",(function(){return T})),t.d(j,"o",(function(){return A})),t.d(j,"k",(function(){return n})),t.d(j,"j",(function(){return c})),t.d(j,"b",(function(){return o})),t.d(j,"p",(function(){return S})),t.d(j,"h",(function(){return z})),t.d(j,"i",(function(){return r})),t.d(j,"q",(function(){return s}));const i=()=>L(0,0);function u(M,j){return 0==j?i():L(M.x/j,M.y/j)}function e(M){return L(-M.x,-M.y)}function I(...M){let j=0,t=0;for(let L of M)j+=L.x,t+=L.y;return L(j,t)}function D(M,j){return L(M.x-j.x,M.y-j.y)}function g(M,j){return L(M.x*j,M.y*j)}const a=c(3),y=c(5),T=(c(10),c(30)),A=c(50),n=(c(60),c(90),c(130),c(150),c(180));function c(M){return M*Math.PI/180}function o(M,j){let t=Math.atan2(M.y,M.x)-Math.atan2(j.y,j.x);return t>Math.PI?t-=2*Math.PI:t<=-Math.PI&&(t+=2*Math.PI),t}function S(M,j){const t=Math.cos(j),N=Math.sin(j);return L(M.x*t-M.y*N,M.x*N+M.y*t)}function z(M){return Math.sqrt(M.x**2+M.y**2)}function r(M){return u(M,z(M))}function s(M,j){const t=M.x-j.x,L=M.y-j.y;return Math.sqrt(t*t+L*L)}},function(M,j,t){"use strict";t.d(j,"m",(function(){return L})),t.d(j,"l",(function(){return N})),t.d(j,"d",(function(){return i})),t.d(j,"e",(function(){return u})),t.d(j,"h",(function(){return e})),t.d(j,"f",(function(){return I})),t.d(j,"b",(function(){return D})),t.d(j,"i",(function(){return g})),t.d(j,"k",(function(){return a})),t.d(j,"a",(function(){return y})),t.d(j,"n",(function(){return T})),t.d(j,"c",(function(){return A})),t.d(j,"j",(function(){return n})),t.d(j,"g",(function(){return c}));const L=4,N=100,i=1.5,u=5,e=3,I=15,D=7,g=2,a=17,y=9.81,T=1e3,A=80,n=8,c=60},function(M,j,t){"use strict";t.d(j,"a",(function(){return L}));class L{constructor(M,j,t,L=1,N=window.devicePixelRatio||1){this.width=j,this.height=t,this.scale=L,this.dpr=N,this.width*=this.scale,this.height*=this.scale,this.canvas=document.createElement("canvas"),this.canvas.width=this.width*this.dpr,this.canvas.height=this.height*this.dpr;const i=new Image;i.onload=()=>{this.canvas.getContext("2d").drawImage(i,0,0,this.width*this.dpr,this.height*this.dpr)},i.src=M}drawMiddle(M){M.drawImage(this.canvas,-this.width/2,-this.height/2,this.width,this.height)}draw(M){M.drawImage(this.canvas,0,0,this.width,this.height)}}j.b={pointerUp:new L(t(26),12,6),pointerDown:new L(t(27),12,6),bullet:new L(t(28),5,5),plane1:new L(t(29),36,22),plane2:new L(t(30),36,22),pilot:new L(t(31),8,11),puff:new L(t(32),10,8),explosion:[new L(t(33),20,21),new L(t(34),42,40),new L(t(35),86,72),new L(t(36),130,120),new L(t(37),173,137),new L(t(38),100,95),new L(t(39),94,84),new L(t(40),86,78),new L(t(41),76,69)],ground:new L(t(42),192,32),groundObjects:[new L(t(43),36,25),new L(t(44),43,28)],clouds:[new L(t(45),310,100),new L(t(46),169,81),new L(t(47),459,119),new L(t(48),214,111),new L(t(49),272,165),new L(t(50),385,177),new L(t(51),508,148),new L(t(52),187,99),new L(t(53),213,133)],groundhit:[new L(t(54),30,31),new L(t(55),30,31),new L(t(56),30,31),new L(t(57),30,31),new L(t(58),30,31),new L(t(59),30,31),new L(t(60),30,31),new L(t(61),30,31),new L(t(62),30,31),new L(t(63),30,31),new L(t(64),30,31),new L(t(65),30,31)],missile:new L(t(66),17,9),missileFire:[new L(t(67),5,6),new L(t(68),5,5)],barn:new L(t(69),100,42,2),forest:new L(t(70),1367,392,1,1),forest2:new L(t(71),1367,392,1,1),cow:new L(t(25),66,62,.3),cowRunning:[new L(t(72),68,59,.3),new L(t(73),67,62,.3),new L(t(74),68,65,.3),new L(t(75),73,59,.3)],cowDead:new L(t(76),70,40,.3),ui:{targetMark:new L(t(77),16,16),skull:new L(t(78),16,16)},parachute:new L(t(79),53,36),angel:new L(t(80),13,11)}},function(M,j,t){"use strict";t.d(j,"g",(function(){return N})),t.d(j,"h",(function(){return i})),t.d(j,"f",(function(){return u})),t.d(j,"c",(function(){return e})),t.d(j,"e",(function(){return D})),t.d(j,"a",(function(){return g})),t.d(j,"b",(function(){return a})),t.d(j,"d",(function(){return y}));var L=t(0);function N(){return window.performance&&window.performance.now?window.performance.now():Date.now()}function i(M,j){return M-j?M:0}function u(M,j){let t;const L=()=>{M(),t=null};return function(){t||(t=window.setTimeout(L,j))}}function e(M,j,t){if(M.x\n\n \n \n \n \n \n ${j?'':""}\n \n \n \n \n \n \n \n \n \n \n`);return new L.a(t,36,22)}var i=t(13),u=t(1),e=t(0);class I extends i.a{constructor(M){super(N(M),Object(e.s)(0,-1),Object(e.s)(0,-1)),this.lastSmoke=0,this.elevator=0,this.thrust=0,this.landed=!1,this.life=u.h,this.missiles=u.i,this.maxMissiles=u.i,this.ammo=0,this.maxAmmo=0,this.gunReloading=!1,this.missileReloading=!1,this.color="black",this.color=M,this.thrust=0,this.radius=20,this.circles=[{v:Object(e.s)(-12,-9),r:2},{v:Object(e.s)(-8,-9),r:2},{v:Object(e.s)(-5,-9),r:2},{v:Object(e.s)(-10,0),r:5},{v:Object(e.s)(-5,0),r:5},{v:Object(e.s)(0,0),r:4.5},{v:Object(e.s)(0,-5),r:3},{v:Object(e.s)(6,0),r:3.5},{v:Object(e.s)(10,-1),r:3.5},{v:Object(e.s)(15,-2),r:3},{v:Object(e.s)(14,-5),r:4},{v:Object(e.s)(-9,8),r:2.5}]}get player(){return this._player}set player(M){this._player=M,this.team=null==M?void 0:M.team}catapultPilot(){this._player=void 0,this.thrust=0,this.elevator=0,this.sprite=N(this.color,!1)}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return u}));var L=t(13),N=t(2),i=t(0);class u extends L.a{constructor(M){super(N.b.missile,Object(i.s)(-1,0),Object(i.s)(0,-1)),this.source=M,this.elevator=0,this.thrust=0,this.justDeployed=!0,this.radius=8,this.mass=.1,this.circles=[{v:Object(i.s)(-5,0),r:2},{v:Object(i.s)(-2,0),r:2},{v:Object(i.s)(2,0),r:2},{v:Object(i.s)(5,0),r:2}]}}},function(M,j,t){"use strict";t.d(j,"g",(function(){return I})),t.d(j,"f",(function(){return D})),t.d(j,"d",(function(){return g})),t.d(j,"e",(function(){return a})),t.d(j,"a",(function(){return y})),t.d(j,"b",(function(){return T})),t.d(j,"c",(function(){return A}));var L=t(1),N=t(10),i=t(2),u=t(3),e=t(0);function I(M,j){const t=Object(u.g)();if(t-j.lastSmoke>80){j.lastSmoke=t;let L=1;5==j.life&&(L=.05),4==j.life&&(L=.1),3==j.life&&(L=.2),2==j.life&&(L=.4),1==j.life&&(L=.7);const u=new N.f(i.b.puff);u.position=Object(e.c)(j.position),u.velocity=Object(e.a)(j.velocity,Object(e.e)(Object(e.f)(Object(e.i)(j.forward)),20)),u.angle=2*Math.PI*Math.random(),u.scale=1+.5*Math.random(),u.opacity=L+.2*Math.random(),M.particles.add(u)}}function D(M,j){const t=new N.f(i.b.puff);let L=Object(e.r)(j.position,j.previous),u=Object(e.h)(L);for(L=Object(e.i)(L);u>0;)t.position=Object(e.a)(j.previous,Object(e.e)(L,.1),Object(e.e)(j.forward,-10)),t.velocity=Object(e.e)(Object(e.f)(Object(e.i)(j.forward)),10),t.angle=2*Math.PI*Math.random(),t.scale=1+.5*Math.random(),t.scaleRate=.3,t.opacity=.5+.2*Math.random(),t.opacityRate=.1,M.particles.add(t),u-=1}function g(M,j,t=!1){const L=new N.a(i.b.explosion);L.frameDuration=50,L.position=Object(e.s)(j.position.x,t?M.ground:j.position.y),L.velocity=t?Object(e.s)(0,-2):Object(e.e)(j.velocity,.5),M.particles.add(L)}function a(M,j){const t=new N.a(i.b.groundhit);t.frameDuration=50,t.position=Object(e.s)(j.position.x,M.ground-15),M.particles.add(t)}function y(M,j){function t(t=-5,L=1){const i=new N.e;i.position=Object(e.c)(j.position),i.position.x+=j.sprite.width/2,i.velocity=Object(e.p)(Object(e.s)(0,-5),Math.PI/L/2-Math.random()*Math.PI/L),i.color="#d80004",i.size=1+Math.floor(3*Math.random()),M.particles.add(i)}let L=20;for(;L-- >0;)t();const i=setInterval(()=>t(-20,30),300);setTimeout(()=>clearInterval(i),1e4)}function T(M,j){function t(t=-5,L=1){const i=new N.e;i.position=Object(e.c)(j.position),i.position.x+=j.sprite.width/2,i.velocity=Object(e.p)(Object(e.s)(0,-5),Math.PI/L/2-Math.random()*Math.PI/L),i.velocity=Object(e.a)(i.velocity,j.velocity),i.color="#d80004",i.size=1+Math.floor(3*Math.random()),M.particles.add(i)}let L=20;for(;L-- >0;)t()}function A(M,j){const t=new N.c(i.b.angel);t.duration=2*L.n,t.position=Object(e.s)(j.position.x,j.position.y),t.velocity=Object(e.s)(0,-8),M.particles.add(t)}},function(M,j,t){"use strict";function L(M){try{return localStorage.getItem(M)}catch(M){return null}}function N(M,j){try{return localStorage.setItem(M,j)}catch(M){return null}}t.d(j,"a",(function(){return L})),t.d(j,"b",(function(){return N})),t.d(j,"c",(function(){return i}));let i={bullets:0,missiles:0,killed:0,deaths:0,cowKilled:0};try{let M=JSON.parse(L("stats")||"{}");i=Object.assign(Object.assign({},i),M)}finally{}setInterval(()=>{N("stats",JSON.stringify(i))},1e3)},function(M,j,t){"use strict";t.d(j,"b",(function(){return u})),t.d(j,"a",(function(){return e}));var L=t(13),N=t(2),i=t(0);class u extends L.a{constructor(M){super(N.b.pilot,Object(i.s)(0,-1),Object(i.s)(0,-1)),this.plane=M,this.landed=!1,this.color="black",this.mass=.5,this.hasParachute=!0,this.radius=5,this.circles=[{v:Object(i.s)(0,0),r:3},{v:Object(i.s)(0,3),r:2}]}deployParachute(M){this.hasParachute&&!this.landed&&(this.hasParachute=!1,this.parachute=new e(this),this.updateParachute(),M.add(this.parachute))}updateParachute(){this.parachute&&(this.parachute.move(Object(i.a)(this.position,Object(i.s)(this.velocity.x>0?-1:1,-22))),this.parachute.angle=this.velocity.x>0?-i.l:i.l)}}class e extends L.a{constructor(M){super(N.b.parachute,Object(i.s)(0,-1),Object(i.s)(0,-1)),this.load=M,this.radius=25,this.circles=[{v:Object(i.s)(0,-8),r:9},{v:Object(i.s)(-10,-8),r:8},{v:Object(i.s)(10,-8),r:8},{v:Object(i.s)(-20,-5),r:6},{v:Object(i.s)(20,-5),r:6}]}}},function(M,j,t){"use strict";t.d(j,"f",(function(){return e})),t.d(j,"h",(function(){return I})),t.d(j,"g",(function(){return D})),t.d(j,"b",(function(){return g})),t.d(j,"a",(function(){return a})),t.d(j,"d",(function(){return T})),t.d(j,"c",(function(){return A})),t.d(j,"i",(function(){return z})),t.d(j,"e",(function(){return r}));var L=t(1),N=t(2),i=t(7),u=t(3);function e(M,j){j.sort((M,j)=>M.points()-j.points());for(let t=0;t{M.font="bold 22px monospace",M.fillStyle=""+j.color,M.fillText(j.points.toString(),20+t,10)};L(j,10),L(t,60);const i=(j,t=0)=>{j.members.sort((M,j)=>j.points()-M.points());for(let L=0;L{for(let L=0;L{M.classList.add("hide")},7e3),setTimeout(()=>{M.parentElement.removeChild(M)},7300)}function T(M,j,t='
'){const L=document.createElement("div");L.innerHTML=`${M.html()} ${t} ${j.html()}`,Object(u.a)(".log").appendChild(L),y(L),j.team&&j.team==M.team||M==j?M.kills--:M.kills++,j.deaths++,M.isHuman&&i.c.killed++,j.isHuman&&i.c.deaths++}function A(M){const j=document.createElement("div");j.innerHTML=`${g} ${M.html()}`,Object(u.a)(".log").appendChild(j),y(j),M.deaths++,M.isHuman&&i.c.deaths++}let n,c,o,S;function z(M){const j=o.offsetHeight-S.offsetHeight;if(2==M.maxMissiles){let j=[...c.querySelectorAll(".missile")];for(let t=0;tL.f)n.innerText=""+M.ammo;else{let j=[...n.querySelectorAll(".ammo")];for(let t=0;t{n=Object(u.a)(".ammo-capacity"),c=Object(u.a)(".missile-capacity"),o=Object(u.a)(".thrust"),S=Object(u.a)(".thrust-level")})},function(M,j,t){"use strict";t.d(j,"e",(function(){return u})),t.d(j,"f",(function(){return e})),t.d(j,"b",(function(){return I})),t.d(j,"d",(function(){return D})),t.d(j,"a",(function(){return g})),t.d(j,"c",(function(){return a})),t.d(j,"g",(function(){return y}));var L=t(0),N=t(3),i=t(1);class u{constructor(){this.color="#000000",this.size=1,this.position=Object(L.g)(),this.velocity=Object(L.g)()}getX(){return this.position.x}getY(){return this.position.y}}class e extends u{constructor(M){super(),this.sprite=M,this.angle=0,this.opacity=1,this.scale=1,this.scaleRate=.8,this.opacityRate=.3,this.size=0}}class I extends u{constructor(M){super(),this.sprite=M}}class D extends u{constructor(M){super(),this.sprite=M}}class g extends u{constructor(M){super(),this.sprites=M,this.frame=0,this.frameDuration=100,this.size=0,this.timeSinceFrameShown=Object(N.g)()}}class a extends u{constructor(M){super(),this.sprite=M,this.duration=i.n,this.size=0,this.createdAt=Object(N.g)()}}function y(M,j){for(let t of M.particles){const u=Object(L.s)(0,t.size);t.velocity.x+=i.m*u.x*j,t.velocity.y+=i.m*u.y*j,t.position.x+=i.m*t.velocity.x*j,t.position.y+=i.m*t.velocity.y*j,t instanceof e&&(t.angle+=j,t.scale+=i.m*t.scaleRate*j,t.opacity-=i.m*t.opacityRate*j,t.opacity<0&&M.particles.delete(t)),t instanceof g&&Object(N.g)()-t.timeSinceFrameShown>=t.frameDuration&&(t.frame++,t.timeSinceFrameShown=Object(N.g)(),t.frame>=t.sprites.length&&M.particles.delete(t)),t instanceof a&&Object(N.g)()-t.createdAt>=t.duration&&M.particles.delete(t),t.position.x<0&&(t.position.x=M.width),t.position.x>M.width&&(t.position.x=0),t.position.y>M.ground&&M.particles.delete(t)}}},function(M,j,t){"use strict";t.d(j,"b",(function(){return L})),t.d(j,"a",(function(){return I}));var L,N=t(2),i=t(0),u=t(3),e=t(13);!function(M){M[M.Left=0]="Left",M[M.Right=1]="Right"}(L||(L={}));class I extends e.a{constructor(){super(N.b.cow),this.t2=0,this.frame=0,this.running=!1,this.direction=Math.random()>.5?L.Left:L.Right,this.dead=!1,this.landed=!1,this.angle=0,this.radius=10,this.mass=20,this.circles=[{v:Object(i.s)(-5,-1),r:6},{v:Object(i.s)(5,-1),r:6}]}draw(M){const j=Object(u.g)();j-this.t2>100&&(this.frame++,this.t2=j),M.save(),this.direction==L.Left&&M.scale(-1,1),this.dead?N.b.cowDead.drawMiddle(M):this.running?N.b.cowRunning[this.frame%N.b.cowRunning.length].drawMiddle(M):this.sprite.drawMiddle(M),M.restore()}}},function(M,j,t){"use strict";t.d(j,"b",(function(){return u})),t.d(j,"a",(function(){return e}));var L=t(8),N=t(4),i=t(1);class u{constructor(M){this.color=M,this.name="",this.members=[],this.startingPosition=0,this.points=100,this.count=6}}class e{constructor(M,j,t){this.name=M,this.color=j,this.object=t,this.kills=0,this.deaths=0,this.maxAmmo=i.f,this.maxMissiles=i.i,this.number=0,this.isHuman=!1,this.disableAI=()=>{}}join(M){this.team=M,M.members.push(this)}toString(){return this.name}html(){return`${this.name}`}points(){return this.kills}control(M){this.object=M,M.player=this}hasPlane(){if(this.object&&this.object instanceof N.a)return this.object}hasPilot(){if(this.object&&this.object instanceof L.b)return this.object}inGame(){return void 0!==this.object}detach(){this.object=void 0}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return N}));var L=t(0);class N{constructor(M,j=Object(L.s)(1,0),t=Object(L.s)(0,1)){this.sprite=M,this.forward=j,this.normal=t,this.mass=1,this.angle=0,this.radius=1,this.previous=Object(L.g)(),this.position=Object(L.g)(),this.velocity=Object(L.g)(),this.force=Object(L.g)(),this.circles=[],this.timeouts=[],this.intervals=[]}move(M){this.position=M,this.previous=Object(L.c)(M)}getX(M){return this.position.x*M+this.previous.x*(1-M)}getY(M){return this.position.y*M+this.previous.y*(1-M)}setTimeout(M,j){const t=window.setTimeout(M,j);return this.timeouts.push(t),t}timeout(M,j){return this.setTimeout(j,M)}setInterval(M,j){const t=window.setInterval(M,j);return this.intervals.push(t),t}interval(M,j){return this.setInterval(j,M)}destroy(){for(let M of this.timeouts)clearTimeout(M);for(let M of this.intervals)clearInterval(M)}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return y})),t.d(j,"c",(function(){return T})),t.d(j,"d",(function(){return c})),t.d(j,"e",(function(){return o})),t.d(j,"b",(function(){return S}));var L=t(1),N=t(0),i=t(3),u=t(4);var e=t(15),I=t(5),D=t(8),g=t(7),a=t(9);function y(M,j,t){let N=Object(i.f)(()=>{let M=j.hasPlane();M&&Object(a.i)(M)},30),u=!1,e=!1,I=!1,D=!1,y=!1;return setInterval(()=>{let t=j.hasPlane();if(t)u&&(c(M,t),g.c.bullets++,N()),e&&(t.thrust-=2,t.thrust<0&&(t.thrust=0),N()),I&&(t.thrust+=2,t.thrust>L.k&&(t.thrust=L.k),N()),t.elevator=D&&!y?-1:!D&&y?1:0;else{const M=j.hasPilot();M&&(M.landed&&(D&&!y?M.velocity.x=-10:!D&&y&&(M.velocity.x=10)),M.parachute&&(D&&!y?M.velocity.x=-20:!D&&y&&(M.velocity.x=20)),M.landed&&I&&(M.landed=!1,M.velocity.y=-10))}},L.c),document.addEventListener("keydown",L=>{if(t.thrustLevers.up.includes(L.code))I=!0;else if(t.thrustLevers.down.includes(L.code))e=!0;else if(t.elevator.up.includes(L.code))D=!0;else if(t.elevator.down.includes(L.code))y=!0;else if(L.code===t.fire)u=!0;else if(L.code===t.missile){let t=j.hasPlane();t&&(o(M,t),g.c.missiles++,N())}else{if(L.code!==t.catapult)return;if(j.hasPlane())S(M,j);else{let t=j.hasPilot();t&&t.deployParachute(M)}}L.preventDefault()},!0),document.addEventListener("keyup",M=>{if(t.thrustLevers.up.includes(M.code))I=!1;else if(t.thrustLevers.down.includes(M.code))e=!1;else if(t.elevator.up.includes(M.code))D=!1;else if(t.elevator.down.includes(M.code))y=!1;else{if(M.code!==t.fire)return;u=!1}M.preventDefault()},!0),function(M){j=M}}function T(M,j){for(let t of M)t instanceof u.a?A(t,j):t instanceof I.a&&n(t,j)}function A(M,j){const t=Object(N.h)(M.velocity);let i=1-t/(L.l*L.d);t>L.l&&(i=1-1/L.d),M.angle+=i*L.e*M.elevator*j,M.angle<0&&(M.angle+=2*Math.PI),M.angle>2*Math.PI&&(M.angle-=2*Math.PI)}function n(M,j){const t=Object(N.h)(M.velocity);let i=1-t/(L.l*L.d);t>L.l&&(i=1-1/1.5),M.angle+=10*i*M.elevator*j}function c(M,j){if(M.has(j)){if(j.ammo>0){j.ammo--;const t=function(M){const j=new e.a(M);return j.move(Object(N.a)(M.position,Object(N.e)(M.forward,M.radius+5))),j.velocity=Object(N.a)(Object(N.c)(M.velocity),Object(N.e)(M.forward,120)),j}(j);M.add(t)}0!==j.ammo||j.gunReloading||(j.gunReloading=!0,j.setTimeout(()=>{j.ammo=j.maxAmmo,j.gunReloading=!1},3*L.n))}}function o(M,j){if(M.has(j)){if(j.missiles>0){j.missiles--;const t=function(M){const j=new I.a(M);return j.move(Object(N.a)(M.position,Object(N.e)(M.normal,-12))),j.angle=M.angle,j.velocity=Object(N.a)(Object(N.c)(M.velocity),Object(N.e)(M.normal,-20)),j.forward=Object(N.c)(M.forward),j.normal=Object(N.c)(M.normal),j}(j);j.timeout(L.n,()=>t.justDeployed=!1),function(M,j){function t(){var t,L;if(M.has(j))if(void 0!==j.target)if(M.has(j.target)){const t=Object(i.c)(j.position,j.target.position,M),L=Object(N.b)(Object(N.r)(t,j.position),j.forward);j.elevator=Math.sign(L)>0?1:-1,Object(N.a)(j.position,Object(N.e)(j.velocity,4)).y>M.ground&&(j.elevator=Math.sign(j.forward.x)>0?-1:1)}else j.target=void 0,j.elevator=0;else{let i,e=700;for(let I of M)if(I instanceof u.a){if(I===j.source)continue;if(void 0!==(null===(t=I.player)||void 0===t?void 0:t.team)&&void 0!==(null===(L=j.source.player)||void 0===L?void 0:L.team)&&I.player.team===j.source.player.team)continue;const M=Object(N.q)(j.position,I.position);M{clearInterval(M),j.thrust=0},12*L.n)}),500),j.target=void 0}(M,t),M.add(t)}0!==j.missiles||j.missileReloading||(j.missileReloading=!0,j.setTimeout(()=>{j.missiles=j.maxMissiles,j.missileReloading=!1},10*L.n))}}function S(M,j){let t=j.hasPlane();if(t){t.catapultPilot();let L=new D.b(t);L.color=j.color,L.player=j,L.move(Object(N.a)(t.position,Object(N.e)(t.normal,5))),L.velocity=Object(N.a)(t.velocity,Object(N.p)(Object(N.e)(t.normal,20),N.m)),M.add(L),j.control(L)}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return u}));var L=t(13),N=t(2),i=t(0);class u extends L.a{constructor(M){super(N.b.bullet,Object(i.s)(1,0),Object(i.s)(0,1)),this.source=M,this.radius=2.5,this.circles=[{v:Object(i.s)(0,0),r:2.5}]}}},function(M,j,t){"use strict";function L(M,j){const t=j.getContext("2d"),L={offsetX:0,offsetY:0,width:j.width,height:j.height,cameraScale:M};function N(){let M=(window.devicePixelRatio||1)/L.cameraScale,{width:N,height:i}=j.getBoundingClientRect();N*=L.cameraScale,i*=L.cameraScale,j.width=N*M,j.height=i*M,L.width=N,L.height=i,t.scale(M,M)}return N(),window.addEventListener("resize",N,!1),window.addEventListener("orientationchange",N,!1),[L,t]}function N(M,j,t,L){const N=Math.floor(M.width/2),i=Math.floor(M.height/2),u=t.hasPlane()||t.hasPilot();if(!u)return;const e=u.getX(L),I=u.getY(L);e>M.offsetX+M.width-N&&(M.offsetX=e-M.width+N),eM.offsetY+i&&(M.offsetY=I-i),Ij.width&&(M.offsetX=j.width-M.width),M.offsetY+M.height>j.height&&(M.offsetY=j.height-M.height)}t.d(j,"b",(function(){return L})),t.d(j,"a",(function(){return N}))},function(M,j,t){"use strict";t.d(j,"a",(function(){return I}));var L=t(13),N=t(1),i=t(2),u=t(0),e=t(4);class I extends L.a{constructor(M,j){super(i.b.barn,Object(u.s)(1,0),Object(u.s)(0,1)),this.radius=100,this.circles=[{v:Object(u.s)(0,50),r:90}],this.move(Object(u.s)(M,j-this.sprite.height/2+2))}newPlane(M,j){j.waitingForPlane||(j.waitingForPlane=window.setTimeout(()=>{let t=j.player;if(!M.has(j))return;if(!t)return;const L=new e.a(t.color);L.life=N.h,L.ammo=L.maxAmmo=t.maxAmmo,L.missiles=L.maxMissiles=t.maxMissiles,L.landed=!0,L.move(Object(u.s)(j.position.x,M.ground)),j.player=void 0,j.destroy(),M.delete(j),t.control(L),M.add(L)},N.n))}}},function(M,j,t){"use strict";t.d(j,"b",(function(){return a})),t.d(j,"a",(function(){return y}));var L=t(10),N=t(2),i=t(0),u=t(4),e=t(11);function I(M,j){let t;j.setInterval(()=>{t=function(t){let L,N=t;for(let t of M)if(t instanceof u.a){const M=Object(i.q)(j.position,t.position);M{t||(j.running=Math.random()<.1)},1e3+2e3*Math.random()),j.setInterval(()=>{t||(j.direction=Math.random()<.5?e.b.Left:e.b.Right)},1e3+4e3*Math.random())}var D=t(1),g=t(6);function a(M){for(let j=0;j<120;j++){const t=new L.b(N.b.clouds[j%9]);let u=M.height;for(;u>M.height-500;)u=M.height*Math.random();let e=1e3;t.position=Object(i.s)((e+M.width)*Math.random()-e/2,u),M.clouds.push(t)}for(let j=0,t=10;t=0;M--)j();M.onCowKill=t=>{if(t.dead)return;t.destroy(),t.dead=!0;let i=new L.d(N.b.cowDead);i.position=t.position,i.position.y=M.ground-i.sprite.height+2,M.groundObjects.add(i),setTimeout(j,10*D.n),setTimeout(()=>M.groundObjects.delete(i),30*D.n),Object(g.a)(M,t)}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return T})),t.d(j,"b",(function(){return n}));var L=t(1),N=t(14),i=t(15),u=t(17),e=t(5),I=t(8),D=t(4),g=t(3),a=t(0);const y={missileChance:.03};function T(M,j,t={}){let i=Object.assign(Object.assign({},y),t),I=[],T=[];const o=(M,j)=>{let t=window.setTimeout(j,M);return I.push(t),t},S=(M,j)=>{let t=window.setInterval(j,M);return T.push(t),t};let z=!0;const r=M=>{const t=j.hasPlane();t&&z&&(t.elevator=M)},s=Object(g.f)(()=>{const t=j.hasPlane();t&&Object(N.e)(M,t)},1.5*L.n);function x(){j.target=void 0;const M=j.hasPlane();M&&(M.elevator=0)}function w(M){M.velocity.y=-10,M.landed=!1}let l,O;return S(L.c,()=>{var t,L,I;const y=j.hasPilot();if(y){let j;M.ground-y.position.y<300&&y.deployParachute(M);for(let t of M.barns)(!j||Math.abs(j.position.x-y.position.x)>Math.abs(t.position.x-y.position.x))&&(j=t);y.landed&&j&&(y.position.xj.position.x?(y.velocity.x=-10,Math.random()<.02&&w(y)):y.velocity.x=0)}const T=j.hasPlane();if(T){if(1==T.life&&M.barns.size>0){let t,L=1/0;for(let j of M.barns){let M=Object(a.q)(j.position,T.position);Ma.l&&r(Math.sign(L)>0?1:-1),j.target instanceof u.a)return;if(j.target instanceof D.a&&L0||c(t,j.team)||Object(N.d)(M,T)}T.ammo<=3&&Object(N.d)(M,T),j.target instanceof e.a&&0===j.target.thrust&&x()}else x();else{let N=A(M,T,M=>c(M,j.team));if(N){const M=Object(a.b)(Object(a.r)(N.position,T.position),T.forward),t=Object(a.q)(T.position,N.position);(Math.abs(M)0?1:-1)}}}}),S(2*L.n,()=>{const t=j.hasPlane();if(!t)return;let N=S(L.c,()=>{if(void 0!==j.target){let L=A(M,t,M=>c(M,j.team));if(L){const M=Object(a.b)(Object(a.r)(L.position,t.position),t.forward),N=Object(a.q)(t.position,L.position),i=Object(a.q)(t.position,j.target.position);(Math.abs(M)clearInterval(N))}),S(10*L.n,()=>{var t,L,N;if(j.hasPlane()&&(!(null===(L=null===(t=j.team)||void 0===t?void 0:t.leader)||void 0===L?void 0:L.hasPlane())||(null===(N=j.team)||void 0===N?void 0:N.leader)===j)&&void 0===j.target){let t=A(M,j.object,M=>c(M,j.team),M.width);t&&(j.target=t)}}),S(5*L.n,()=>{var t,N,i;if(!j.object)return;let u=j.object;if((void 0===(null===(N=null===(t=j.team)||void 0===t?void 0:t.leader)||void 0===N?void 0:N.object)||(null===(i=j.team)||void 0===i?void 0:i.leader)===j)&&void 0===j.target){let j=Object(a.s)(Math.floor(Math.random()*M.width),Math.floor(Math.random()*(M.ground-100))),t=S(30,()=>{const M=Object(a.b)(Object(a.r)(j,u.position),u.forward);Math.abs(M)>a.l&&r(Math.sign(M)>0?1:-1)});o(2*L.n,()=>{clearInterval(t)})}}),S(30,()=>{const t=j.hasPlane();t&&(Object(a.a)(t.position,Object(a.e)(t.velocity,4)).y>M.ground&&(r(Math.sign(t.forward.x)>0?-1:1),clearTimeout(l),l=o(200,()=>t.elevator=0)),t.position.y>M.ground-30&&(r(Math.sign(t.forward.x)>0?-1:1),clearTimeout(O),O=o(200,()=>t.elevator=0)),t.landed&&(t.elevator=0,t.thrust=L.k,z&&(z=!1,o(L.n,()=>z=!0))),0===t.thrust&&(t.thrust=L.k))}),function(){for(let M of I)clearTimeout(M);for(let M of T)clearInterval(M)}}function A(M,j,t,L=2e3){let N;if(void 0!==j){for(let i of M)if(i!==j&&!(i instanceof e.a&&i.source===j)&&!t(i)&&(i instanceof D.a||i instanceof I.b||i instanceof e.a&&i.target===j&&i.thrust>0)){const M=Object(a.q)(j.position,i.position);MM instanceof i.a)){let u,e=L;for(let L of M){if(L===j)continue;if(N(L))continue;const M=Object(a.q)(j.position,L.position),i=Object(a.b)(Object(a.r)(L.position,j.position),j.forward);M{},this.onCowKill=M=>{},this.width=M.width,this.height=M.height,this.ground=M.ground,this.stratosphere=M.stratosphere}*[Symbol.iterator](){yield*this.barns,yield*this.bodies,yield*this.bullets,yield*this.pilots}add(M){M instanceof L.a?this.bullets.add(M):M instanceof i.b?this.pilots.add(M):M instanceof N.a?this.barns.add(M):this.bodies.add(M)}has(M){return M instanceof L.a?this.bullets.has(M):M instanceof i.b?this.pilots.has(M):M instanceof N.a?this.barns.has(M):this.bodies.has(M)}delete(M){M instanceof L.a?this.bullets.delete(M):M instanceof i.b?this.pilots.delete(M):this.bodies.delete(M),M.destroy()}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return Y}));var L=t(14),N=t(10),i=t(11),u=t(5),e=t(4),I=t(2),D=t(3),g=t(0);function a(M,j,t,L,a){var A;let n=t.stratosphere-j.offsetY;n<0?n=0:(M.fillStyle="#1f4752",M.fillRect(0,0,j.width,n)),M.fillStyle="#9be2fe",M.fillRect(0,n,j.width,j.height),function(M,j,t){if(t.stratosphere>j.offsetY){let L=900;const N=-j.offsetY-L+t.stratosphere+4;M.save(),M.translate(0,N);let i=M.createLinearGradient(0,0,0,L);i.addColorStop(0,"#1f4752"),i.addColorStop(1,"#9be2fe"),M.fillStyle=i,M.fillRect(0,0,j.width,L),M.restore()}}(M,j,t),y(M,j,t,I.b.forest2,1.05,50),y(M,j,t,I.b.forest,1.02,100),function(M,j,t){for(let L of t.groundObjects){const t=L.position.x-j.offsetX,N=L.position.y-j.offsetY;t+L.sprite.width<0||t-L.sprite.width>j.width||(M.save(),M.translate(t,N),L.sprite.draw(M),M.restore())}}(M,j,t),function(M,j,t){const L=t.height-j.offsetY-I.b.ground.height;if(L0;)I.b.ground.draw(M),M.translate(I.b.ground.width-1,0);M.restore()}}(M,j,t),function(M,j,t){for(let L of t.clouds){const t=L.position.x-j.offsetX,N=L.position.y-j.offsetY;t+L.sprite.width<0||t-L.sprite.width>j.width||(M.save(),M.translate(t,N),M.globalAlpha=.8,L.sprite.draw(M),M.restore())}}(M,j,t);for(let N of t){const t=N.getX(L)-j.offsetX,D=N.getY(L)-j.offsetY;if(!(t+N.radius<0||t-N.radius>j.width)){if(M.save(),D+N.radius<0)(N instanceof e.a||N instanceof u.a)&&(M.translate(Math.floor(t),3),I.b.pointerUp.drawMiddle(M));else if(D-N.radius>j.height)(N instanceof e.a||N instanceof u.a)&&(M.translate(Math.floor(t),j.height-3),I.b.pointerDown.drawMiddle(M));else{if(M.translate(t,D),M.rotate(N.angle),N instanceof i.a?N.draw(M):N.sprite.drawMiddle(M),window.showCircles){for(let{v:j,r:t}of N.circles)M.beginPath(),M.fillStyle="rgba(255,45,247,0.5)",M.arc(j.x,j.y,t,0,2*Math.PI),M.fill();M.beginPath(),M.arc(0,0,N.radius,0,2*Math.PI),M.stroke()}if(window.showVectors&&(M.save(),M.rotate(-N.angle),M.beginPath(),M.moveTo(0,0),M.lineTo(20*N.forward.x,20*N.forward.y),M.strokeStyle="blue",M.stroke(),M.beginPath(),M.moveTo(0,0),M.lineTo(20*N.normal.x,20*N.normal.y),M.strokeStyle="green",M.stroke(),M.restore()),N instanceof u.a&&N.thrust>0&&(M.translate(10,0),I.b.missileFire[Math.random()<.5?0:1].drawMiddle(M)),window.showTarget&&N instanceof e.a&&void 0!==(null===(A=N.player)||void 0===A?void 0:A.target)){M.save(),M.rotate(-N.angle);let j=Object(g.r)(N.player.target.position,N.position);j=Object(g.r)(j,Object(g.e)(Object(g.i)(j),N.player.target.radius)),M.strokeStyle="#ff0101",M.lineWidth=2,T(M,0,0,j.x,j.y),M.restore()}if(N instanceof e.a&&void 0!==N.pointTo){M.save(),M.rotate(-N.angle);let j=Object(g.r)(N.pointTo.position,N.position);j=Object(g.r)(j,Object(g.e)(Object(g.i)(j),N.pointTo.radius)),M.strokeStyle="#009a04",M.lineWidth=2,T(M,0,0,j.x,j.y),M.restore()}}M.restore()}}for(let L of t.particles){const t=L.getX()-j.offsetX,i=L.getY()-j.offsetY;M.save(),M.translate(t,i),L instanceof N.f?(M.rotate(L.angle),M.globalAlpha=L.opacity,M.scale(L.scale,L.scale),L.sprite.drawMiddle(M)):L instanceof N.a?L.sprites[L.frame].drawMiddle(M):L instanceof N.b?L.sprite.drawMiddle(M):L instanceof N.c?(M.globalAlpha=1-Math.min(1,Math.abs((Object(D.g)()-L.createdAt)/L.duration)),L.sprite.drawMiddle(M)):(M.fillStyle=L.color,M.fillRect(0,0,L.size,L.size)),M.restore()}a(M)}function y(M,j,t,L,N,i){const u=t.height-j.offsetY-L.height+i;if(u0;)L.draw(M),M.translate(L.width,0);M.restore()}}function T(M,j,t,L,N){M.beginPath();const i=L-j,u=N-t,e=Math.atan2(u,i);M.moveTo(j,t),M.lineTo(L,N),M.lineTo(L-10*Math.cos(e-Math.PI/6),N-10*Math.sin(e-Math.PI/6)),M.moveTo(L,N),M.lineTo(L-10*Math.cos(e+Math.PI/6),N-10*Math.sin(e+Math.PI/6)),M.stroke()}Object.assign(window,{showCircles:!1,showVectors:!1,showTarget:!1});var A=t(6),n=t(15),c=t(8),o=t(7),S=t(9);function z(M,j){const t=Object(g.h)(j.velocity);if(j.landed)t>45&&(j.landed=!1);else if(s(j,M.ground)){const t=j.angle;if(j.velocity.y<40&&(t=j)return!0;return!1}function x(M,j){if(w(M.position,M.radius,j.position,j.radius))for(let{v:t,r:L}of M.circles){t=Object(g.a)(Object(g.p)(t,M.angle),M.position);for(let{v:M,r:N}of j.circles)if(M=Object(g.a)(Object(g.p)(M,j.angle),j.position),w(t,L,M,N))return!0}return!1}function w(M,j,t,L){const N=j+L,i=M.x-t.x,u=M.y-t.y;return N*N>i*i+u*u}var l=t(1);function O(M,j){!function(M){var j;for(let j of M)if(j.position.y+j.radius>=M.ground){if(j instanceof e.a){z(M,j);continue}if(s(j,M.ground)){if(j instanceof n.a){Object(A.e)(M,j),M.delete(j);continue}if(j instanceof u.a){Object(A.d)(M,j,!0),M.delete(j);continue}j instanceof i.a&&(j.landed=!0),j instanceof c.b&&(j.landed=!0,Object(g.h)(j.velocity)>40?(Object(A.e)(M,j),Object(A.c)(M,j),M.onCrash(j),M.delete(j),j.player&&Object(S.c)(j.player)):j.parachute&&(M.delete(j.parachute),j.parachute=void 0)),j instanceof c.a&&M.delete(j)}}for(let j of M.bodies)for(let L of M.bodies)j!==L&&x(j,L)&&(t(j,L)||t(L,j));function t(j,t){var L,N,I,D;if(j instanceof u.a&&t instanceof u.a)return Object(A.d)(M,j),Object(A.d)(M,t),M.delete(j),M.delete(t),!0;if(j instanceof e.a&&t instanceof u.a)return(!t.justDeployed||t.source!==j)&&((!t.justDeployed||void 0===(null===(L=t.source.player)||void 0===L?void 0:L.team)||void 0===(null===(N=j.player)||void 0===N?void 0:N.team)||t.source.player.team!==j.player.team)&&(r(M,j),M.delete(t),t.source.player&&j.player&&Object(S.d)(t.source.player,j.player,S.a),!0));if(j instanceof e.a&&t instanceof i.a)return(null===(I=j.player)||void 0===I?void 0:I.isHuman)&&o.c.cowKilled++,M.onCowKill(t),M.delete(t),!0;if(j instanceof u.a&&t instanceof i.a)return(null===(D=j.source.player)||void 0===D?void 0:D.isHuman)&&o.c.cowKilled++,Object(A.d)(M,t),M.onCowKill(t),M.delete(j),M.delete(t),!0;if(j instanceof c.a){if(t instanceof e.a&&j.load.plane!==t)return M.delete(j),j.load.parachute=void 0,!0;if(t instanceof u.a)return M.delete(j),j.load.parachute=void 0,!0}return!1}let L=[...M.bullets];for(let M=0;M0){let t=2*N*e/(j.mass+M.mass);j.velocity.x-=t*M.mass*i.x,j.velocity.y-=t*M.mass*i.y,M.velocity.x+=t*j.mass*i.x,M.velocity.y+=t*j.mass*i.y}j.position=Object(g.a)(j.position,Object(g.e)(i,j.radius/2)),M.position=Object(g.a)(M.position,Object(g.e)(i,-M.radius/2))}}for(let t of M.bullets){for(let L of M.bodies)x(t,L)&&(L instanceof e.a&&(L.life-=1,0==L.life&&(r(M,L),t.source.player&&L.player&&Object(S.d)(t.source.player,L.player)),M.bullets.delete(t)),L instanceof u.a&&(Object(A.d)(M,L),M.delete(t),M.delete(L)),L instanceof i.a&&((null===(j=t.source.player)||void 0===j?void 0:j.isHuman)&&o.c.cowKilled++,M.onCowKill(L),M.delete(t),M.delete(L)),L instanceof c.a&&(M.delete(L),L.load.parachute=void 0));for(let j of M.pilots)x(t,j)&&(M.onCrash(j),M.delete(t),M.delete(j),Object(A.b)(M,j),Object(A.c)(M,j),t.source.player&&j.player&&Object(S.d)(t.source.player,j.player))}for(let j of M.barns)for(let t of M.pilots)x(j,t)&&j.newPlane(M,t);for(let j of M.pilots)for(let t of M.bodies)x(j,t)&&(t instanceof e.a&&j.plane!==t&&!t.landed&&(M.onCrash(j),M.delete(j),Object(A.b)(M,j),Object(A.c)(M,j),t.player&&j.player&&Object(S.d)(t.player,j.player,S.b)),t instanceof u.a&&(Object(A.d)(M,t),M.onCrash(j),M.delete(j),M.delete(t),Object(A.b)(M,j),Object(A.c)(M,j),t.source.player&&j.player&&Object(S.d)(t.source.player,j.player,S.a)))}(M);for(let t of M){t.forward=Object(g.s)(Math.sin(-t.angle-Math.PI/2),Math.cos(-t.angle-Math.PI/2)),t.normal=Object(g.s)(Math.sin(-t.angle+Math.PI),Math.cos(-t.angle+Math.PI)),t instanceof u.a&&(C(t,M),t.thrust>0&&Object(A.f)(M,t)),t instanceof e.a&&(E(t,M),t.lifeM.width&&(t.previous.x=t.position.x=0)}}function C(M,j){const t=Object(g.h)(M.velocity),L=Object(g.s)(0,M.mass*l.a),N=Object(g.e)(M.forward,M.thrust),i=Object(g.e)(Object(g.i)(Object(g.f)(M.velocity)),2**(t-1.2*l.l));M.force=Object(g.a)(L,N,i)}function E(M,j){const t=Object(g.h)(M.velocity),L=Object(g.b)(M.forward,M.velocity),N=Object(g.s)(0,M.mass*l.a);let i=Object(g.e)(M.forward,M.thrust),u=Object(g.e)(M.normal,t*Object(D.h)(L,Object(g.j)(50))),e=Object(g.e)(Object(g.i)(Object(g.f)(M.velocity)),2**(t-l.l));M.position.y.25&&(n=.25),g=A,I+=n,Object(L.c)(t,n);I>=y;)O(t,y),I-=y;Object(N.g)(t,y);const c=I/y;i(M,c),a(j,M,t,c,u)}(),function(){cancelAnimationFrame(e)}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return i}));var L=t(3);const N=["#f36a20","#dbaf02","#70ba01","#49da9a","#34bbe6","#4380db","#261fe6","#d23be7","#ff0786"];function i(){return Object(L.e)([...N])}},function(M,j,t){var L,N,i={},u=(L=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===N&&(N=L.apply(this,arguments)),N}),e=function(M,j){return j?j.querySelector(M):document.querySelector(M)},I=function(M){var j={};return function(M,t){if("function"==typeof M)return M();if(void 0===j[M]){var L=e.call(this,M,t);if(window.HTMLIFrameElement&&L instanceof window.HTMLIFrameElement)try{L=L.contentDocument.head}catch(M){L=null}j[M]=L}return j[M]}}(),D=null,g=0,a=[],y=t(83);function T(M,j){for(var t=0;t=0&&a.splice(j,1)}function o(M){var j=document.createElement("style");if(void 0===M.attrs.type&&(M.attrs.type="text/css"),void 0===M.attrs.nonce){var L=function(){0;return t.nc}();L&&(M.attrs.nonce=L)}return S(j,M.attrs),n(M,j),j}function S(M,j){Object.keys(j).forEach((function(t){M.setAttribute(t,j[t])}))}function z(M,j){var t,L,N,i;if(j.transform&&M.css){if(!(i="function"==typeof j.transform?j.transform(M.css):j.transform.default(M.css)))return function(){};M.css=i}if(j.singleton){var u=g++;t=D||(D=o(j)),L=x.bind(null,t,u,!1),N=x.bind(null,t,u,!0)}else M.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(t=function(M){var j=document.createElement("link");return void 0===M.attrs.type&&(M.attrs.type="text/css"),M.attrs.rel="stylesheet",S(j,M.attrs),n(M,j),j}(j),L=l.bind(null,t,j),N=function(){c(t),t.href&&URL.revokeObjectURL(t.href)}):(t=o(j),L=w.bind(null,t),N=function(){c(t)});return L(M),function(j){if(j){if(j.css===M.css&&j.media===M.media&&j.sourceMap===M.sourceMap)return;L(M=j)}else N()}}M.exports=function(M,j){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(j=j||{}).attrs="object"==typeof j.attrs?j.attrs:{},j.singleton||"boolean"==typeof j.singleton||(j.singleton=u()),j.insertInto||(j.insertInto="head"),j.insertAt||(j.insertAt="bottom");var t=A(M,j);return T(t,j),function(M){for(var L=[],N=0;N1&&n.c.deaths>1&&n.c.cowKilled>1){if(document.querySelector(".stats").innerHTML=`\n You fired ${n.c.bullets.toLocaleString()} bullets \n and ${n.c.missiles.toLocaleString()} missiles\n and destroyed ${n.c.killed.toLocaleString()} planes,\n and unfortunately died ${n.c.deaths.toLocaleString()} times.
\n Also inadvertently you killed ${n.c.cowKilled.toLocaleString()} cow cows. \n `,n.c.killed>1e3){let M=document.createElement("div");M.innerHTML='\n \n ';let j=document.querySelector(".game-modes");j&&j.appendChild(M)}}let M=document.getElementsByName("nickname")[0];M.value=Object(n.a)("nickname")||"",M.addEventListener("keyup",j=>Object(n.b)("nickname",M.value));let j=location.search.match(/mode=([\w-]+)/);if(j){let M=j[1],t=document.getElementsByName("mode");for(let j=0,L=t.length;j{const t=j.player;if(!t)return;const L=new y.a(t.color);L.life=e.h,L.ammo=L.maxAmmo=t.maxAmmo,L.landed=!0,L.ammo=0,L.move(Object(o.s)(M.width/2+(1200*Math.random()-600),M.ground)),t.control(L),M.add(L)},2e3)},Object(a.b)(M);let j=Object(N.a)();for(let t=0;t{Object(u.a)(j,M,M.players[0],t)},M=>{});return function(){n();for(let j of M.players)j.disableAI()}}();Object(z.a)("#game").addEventListener("submit",M=>{M.preventDefault();let j="death-match",t=document.getElementsByName("mode");for(let M=0,L=t.length;M{const t=j.player;if(!t)return;if(t.inGame())return;const L=new y.a(t.color);L.life=e.h,L.ammo=L.maxAmmo=t.maxAmmo,L.landed=!0,L.move(Object(o.s)(M.width*Math.random(),M.ground)),t.control(L),M.add(L)},2e3))},Object(a.b)(M),Object(a.a)(M);let j=new g.a(M.width/2+110,M.ground);M.add(j);const t=new y.a("#ff0015"),z=new T.a(Object(n.a)("nickname")||"YOU","#ff0015",t);z.isHuman=!0,z.control(t),M.players.push(z),z.maxAmmo=e.f,t.maxAmmo=e.f,t.ammo=e.f,t.landed=!0,t.move(Object(o.s)(M.width/2,M.ground)),M.add(t),Object(D.a)(M,z,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"});let r=Object(N.a)();for(let j=0;j{Object(u.a)(j,M,z,t)},j=>{Object(c.f)(j,M.players)}),Object(c.e)(M)}();break;case"teams":!function(){const M=new S.a({width:15e3,height:4e3,ground:0,stratosphere:50});M.ground=M.height-A.b.ground.height,M.players=[],Object(a.b)(M),Object(a.a)(M);const j=new T.b("#fd6a79");j.name="Red",j.startingPosition=12e3;const t=new T.b("#145ece");t.name="Blue",t.startingPosition=2e3;let N=location.search.match(/count=([0-9]+)vs([0-9]+)/);N&&(j.count=parseInt(N[1]),t.count=parseInt(N[2]));let z=new g.a(j.startingPosition,M.ground),r=new g.a(t.startingPosition,M.ground);M.add(z),M.add(r);let s=new y.a("#ff0015"),x=new T.a(Object(n.a)("nickname")||"YOU",s.color,s);x.isHuman=!0,x.join(j),s.player=x,M.players.push(x),x.maxAmmo=e.f,s.maxAmmo=e.f,s.ammo=e.f,s.landed=!0,s.move(Object(o.s)(j.startingPosition-130,M.ground)),M.add(s),Object(D.a)(M,x,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"});let w=!1;M.onCrash=function(j){j.player&&(j.player.detach(),setTimeout(()=>{const t=j.player;if(!t)return;if(t.inGame())return;let L=t.team;if(!L)return;L.points--,L.points<=0&&setTimeout(()=>{w||(w=!0,alert((null==L?void 0:L.name)+" team loses\n\n ¯\\_(ツ)_/¯"),location.href="?mode=teams")},2*e.n);const N=new y.a(t.color);N.life=e.h,N.ammo=N.maxAmmo=t.maxAmmo,N.landed=!0,N.move(Object(o.s)(L.startingPosition,M.ground)),t.control(N),M.add(N)},6e3))};for(let t=1;t{Object(u.a)(j,M,x,t)},M=>{Object(c.h)(M,j,t)}),Object(c.e)(M)}();break;case"duel":!function(){const M=new S.a({width:15e3,height:4e3,ground:0,stratosphere:50});M.ground=M.height-A.b.ground.height,M.players=[],M.onCrash=function(j){j.player&&(j.player.detach(),setTimeout(()=>{const t=j.player;if(!t)return;if(t.inGame())return;const L=new y.a(t.color);L.life=e.h,L.ammo=L.maxAmmo=t.maxAmmo,L.landed=!0,L.move(Object(o.s)(M.width*Math.random(),M.ground)),t.control(L),M.add(L)},2e3))},Object(a.b)(M),Object(a.a)(M);let j=new g.a(M.width/2+110,M.ground);M.add(j);const t=new y.a("#ff0015"),N=new T.a(Object(n.a)("nickname")||"YOU","#ff0015",t);N.isHuman=!0,N.control(t),M.players.push(N),N.maxAmmo=e.f,t.maxAmmo=e.f,t.ammo=e.f,t.landed=!0,t.move(Object(o.s)(M.width/2,M.ground)),M.add(t),Object(D.a)(M,N,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"});{const j=i.a.pop()||"no name",t="#145ece",N=new y.a(t),u=new T.a(j,t,N);N.player=u,M.players.push(u),u.maxAmmo=e.f,N.maxAmmo=e.f,N.ammo=e.f,N.landed=!0,N.move(Object(o.s)(M.width*Math.random(),M.ground)),M.add(N),u.disableAI=Object(L.a)(M,u,{missileChance:.3})}const z=document.querySelector("#canvas"),[r,s]=Object(u.b)(1.25,z);Object(I.a)(r,s,M,(j,t)=>{Object(u.a)(j,M,N,t)},j=>{Object(c.f)(j,M.players)}),Object(c.e)(M)}();break;case"survival":!function(){const M=new S.a({width:15e3,height:4e3,ground:0,stratosphere:50});M.ground=M.height-A.b.ground.height,M.players=[],Object(a.b)(M),Object(a.a)(M);let j=new g.a(M.width/2+110,M.ground);M.add(j);const t=new URLSearchParams(window.location.search);let z,r=parseInt(t.get("size")||"2"),s=Object(N.a)(),x=new T.b("#ff0015"),w=new y.a(x.color),l=new T.a(Object(n.a)("nickname")||"YOU",x.color,w);l.join(x),l.isHuman=!0,l.control(w),M.players.push(l),w.ammo=w.maxAmmo=l.maxAmmo=100,w.missiles=w.maxMissiles=l.maxMissiles=10,w.landed=!0,w.move(Object(o.s)(M.width/2-100,M.ground)),M.add(w),Object(D.a)(M,l,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"});let O=()=>{z=new T.b(s.pop()||"black");for(let j=0;j{alert(`Good run! But ${r} opponents turned out to be too much for you.\n\n (╯°□°)╯︵ ┻━┻`),location.href="?mode=survival"},3*e.n);else{let M=!0;for(let j of z.members)j.inGame()&&(M=!1);M&&(r++,setTimeout(O,3*e.n))}}},O();const C=document.querySelector("#canvas"),[E,d]=Object(u.b)(1.25,C);Object(I.a)(E,d,M,(j,t)=>{Object(u.a)(j,M,l,t)},M=>{Object(c.g)(M,x,z)}),Object(c.e)(M)}();break;case"swarm":!function(){const M=new S.a({width:15e3,height:4e3,ground:0,stratosphere:50});let j,t;M.ground=M.height-A.b.ground.height,M.players=[],Object(a.b)(M),Object(a.a)(M);const N=new URLSearchParams(window.location.search);j=t=parseInt(N.get("size")||"50");const g=new T.b("#ff0015"),z=new T.b("#145ece");let r=new y.a(g.color),s=new T.a(Object(n.a)("nickname")||"YOU",g.color,r);r.thrust=e.k,s.isHuman=!0,s.join(g),g.leader=s,r.player=s,M.players.push(s),s.maxAmmo=e.f,r.maxAmmo=e.f,r.ammo=e.f,r.move(Object(o.s)(3*M.width/4,M.height/2)),M.add(r);const x=Object(D.a)(M,s,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"}),w=[];let l;M.onCrash=function(M){if(M.player){let j=M.player;if(j.detach(),j.isHuman){let M;for(;M=w.shift();)if(M.hasPlane()){M.disableAI(),x(M),M.isHuman=!0,g.leader=M,s=M;break}}}clearTimeout(l),l=window.setTimeout(()=>{let M=g.members.filter(M=>M.hasPlane()).length,j=z.members.filter(M=>M.hasPlane()).length;0!=M&&0!=j||(0!=M&&0==j&&alert("You won! 🎉"),0==M&&0!=j&&alert("You lose."),0==M&&0==j&&alert("¯\\_(ツ)_/¯"),location.href="?mode=swarm")},5*e.n)};for(let t=1;t{Object(u.a)(j,M,s,t)},M=>{}),Object(c.e)(M)}();break;case"playground":!function(){const M=new S.a({width:15e3,height:4e3,ground:0,stratosphere:50});M.ground=M.height-A.b.ground.height,M.players=[],Object(a.b)(M);const j=new y.a("#ff0015"),t=new T.a("YOU","#ff0015",j);M.players.push(t),t.control(j),j.move(Object(o.s)(M.width/2-200,500)),M.add(j),Object(D.a)(M,t,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"}),j.thrust=e.k;{const j=i.a.pop()||"no name",t="#e2e2e2",N=new y.a(t),u=new T.a(j,t,N);M.players.push(u),u.control(N),N.move(Object(o.s)(M.width/2,500)),M.add(N),N.thrust=e.k,setInterval(()=>{N.pointTo=Object(L.b)(M,N,o.o)},100)}const N=document.querySelector("#canvas"),[g,n]=Object(u.b)(1.25,N);Object(I.a)(g,n,M,(j,L)=>{Object(u.a)(j,M,t,L)},M=>{})}()}}(j)})}))}]); \ No newline at end of file diff --git a/bit-planes/styles.css b/bit-planes/styles.css new file mode 100644 index 00000000..900656bd --- /dev/null +++ b/bit-planes/styles.css @@ -0,0 +1,419 @@ +.ribbon{ + position: absolute; + top: 42px; + width: 200px; + padding: 1px 0; + background: #000; + color: #eee; + + box-shadow: 0 0 10px rgba(0,0,0,0.5); +} + +.ribbon.left{ + left: -42px; + transform: rotate(-45deg); +} + +.ribbon.right{ + right: -42px; + transform: rotate(45deg); +} + +.ribbon a, +.ribbon a:visited, +.ribbon a:active, +.ribbon a:hover{ + display: block; + padding: 1px 0; + height: 24px; + line-height: 24px; + + color: inherit; + text-align: center; + text-decoration: none; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-size: 13px; + font-weight: 500; + + border: 1px solid rgba(255,255,255,0.3); + + text-shadow: 0 0 10px rgba(0,0,0,0.31); +} + +.ribbon.black{ + background: #000; +} + +.ribbon.red{ + background: #c00; +} + +.ribbon.blue{ + background: #09e; +} + +.ribbon.green{ + background: #0a0; +} + +.ribbon.orange{ + background: #d80; +} + +.ribbon.purple{ + background: #c0c; +} + +.ribbon.grey{ + background: #888; +} + +.ribbon.white{ + background: #eee; + color: black; +} +.ribbon.white a{ + border: 2px dotted rgba(100,100,100,0.2); +} + +* { + margin: 0; + padding: 0; +} + +body { + background: #f5f5f5; + font-family: "Cormorant Garamond", serif; + font-size: 18px; +} + +*, *:before, *:after { + box-sizing: inherit; +} + +kbd { + display: inline-block; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-size: 10px; + border: 1px solid gray; + box-shadow: 1px 0 1px 0 #eee, 0 2px 0 2px #ccc, 0 2px 0 3px #444; + border-radius: 3px; + margin: 3px 4px; + padding: 1px 5px; +} + +ul { + list-style: inside circle; +} + +p { + margin: 10px 0; +} + +.btn { + border: none; + display: inline-block; + background: #0a0; + border-radius: 5px; + padding: 5px 17px; + text-decoration: none; + color: #fff; + font-family: "Cormorant Garamond", serif; + font-size: 24px; + font-weight: 700; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + transition: all 0.3s cubic-bezier(.25, .8, .25, 1); + cursor: pointer; + outline: none; +} + +.btn:hover, +.btn:focus { + transform: translateY(-5px); + box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); +} + +img { + max-width: 100%; + width: auto; +} + +main .welcome { + overflow: hidden; + position: relative; + max-width: 800px; + margin: 20px auto; + padding: 40px 50px; + background: #fff; + border-radius: 10px; +} + +main .logo { + display: inline-block; + width: 36px; + height: 22px; + background-size: contain; + background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iMjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNOSAyMGwtMi41LTUuMTYyTTkgMjBsMy41LTUiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIvPjxwYXRoIGQ9Ik0xIDEwLjY0N2g0LjUiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiLz48cGF0aCBkPSJNMS41IDEuNXYxOCIgc3Ryb2tlPSIjNjE2MTYxIiBvcGFjaXR5PSIuODk4IiBzdHJva2UtbGluZWNhcD0ic3F1YXJlIi8+PGNpcmNsZSBzdHJva2U9IiMwMDAiIGZpbGw9IiM4QjU3MkEiIGN4PSIxOCIgY3k9IjYiIHI9IjMiLz48Y2lyY2xlIHN0cm9rZT0iIzAwMCIgZmlsbD0iI0Q4RDhEOCIgY3g9IjkiIGN5PSIxOSIgcj0iMiIvPjxwYXRoIGQ9Ik03IDZoNy41QzE2LjMzMyA4LjQzNCAxOSA4Ljc5IDIxIDZjMy4xMjcgMyA1LjkxNiAyLjM4MiA4LjM2Ni0xLjg1NEMzMC43OTYuMDg5IDM1IDEuMzc2IDM1IDQuMTQ2VjkuNTJjLTcuODEgNC4xMS0xNi42NTUgNS44MzMtMjAuNTMgNi40OC0yLjQ4MS4xLTQuOTctLjI4OC03LjQ3LTEuMTYyVjZ6IiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iMS41IiBmaWxsPSIjODRGMDBEIi8+PHBhdGggZD0iTTE1LjUgMTMuNWwtNC0xMC45MjRNMTEuNSAxMy41bC00LTEwLjkyNCIgc3Ryb2tlPSIjMDAwIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIvPjxwYXRoIGQ9Ik03IDZINC4wNDFjLTEuMzg4IDIuMzQtMS4zODggNi40MzYgMCA5SDdWNnoiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSIxLjUiIGZpbGw9IiMzRUQ1M0UiLz48cmVjdCBzdHJva2U9IiMwMDAiIGZpbGw9IiNGNUE2MjMiIHg9IjQuNSIgeT0iLjUiIHdpZHRoPSIxMCIgaGVpZ2h0PSIyIiByeD0iMSIvPjxyZWN0IHN0cm9rZS1vcGFjaXR5PSIuNSIgc3Ryb2tlPSIjMDAwIiBmaWxsPSIjRjVBNjIzIiB4PSIyOC41IiB5PSI3LjUiIHdpZHRoPSI2IiBoZWlnaHQ9IjIiIHJ4PSIxIi8+PHJlY3QgZmlsbD0iI0MyODIxOSIgeD0iOCIgeT0iMTMiIHdpZHRoPSIxMSIgaGVpZ2h0PSIyIiByeD0iMSIvPjxwYXRoIGZpbGwtb3BhY2l0eT0iLjU0NiIgZmlsbD0iI0ZGRiIgZD0iTTcgOS42MzRWNy41SDMuNDY0TDMgOS42MzR6Ii8+PC9nPjwvc3ZnPg==) no-repeat; +} + +main h1 { + font-weight: 500; + font-size: 48px; + text-align: center; + margin-top: 0; + margin-bottom: 20px; +} + +main h2 { + font-weight: 500; + font-size: 38px; +} + +main form { + margin-top: 20px; +} + +main input[type="text"] { + font-family: "Cormorant Garamond", serif; + font-size: 20px; + outline: none; + padding: 5px; + border-radius: 5px; + border: none; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + transition: all 0.3s cubic-bezier(.25, .8, .25, 1); +} + +main input[type="text"]:focus { + transform: translateY(-5px); + box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); +} + +main .game-modes { + font-size: 20px; +} + +main .game-modes input { + margin-right: 10px; +} + +main form .action { + margin-top: 20px; +} + +main .demo { + margin-top: 40px; +} + +main .stats { + margin-top: 40px; +} + +main em { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-weight: 700; + font-size: 14px; + font-style: normal; +} + +main .demo { + width: 100%; + height: 300px; +} + +@media only screen and (max-width: 500px) { + body { + overflow: hidden; + width: 100vw; + height: 100vh; + } + + main .demo { + width: 100vw !important; + height: 100vh !important; + position: fixed; + top: 0; + left: 0; + z-index: 1000; + margin: 0; + } +} + +#canvas { + display: none; + z-index: 1; + position: absolute; + top: 0; + left: 0; + width: 100vw; + height: 100vh; +} + +.ui { + display: none; + z-index: 2; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + +.cockpit { + display: flex; + align-items: center; + position: absolute; + left: calc(50vw - 90px); + padding: 5px; + background-color: rgba(255, 255, 255, 0.3); + border-radius: 0 0 5px 5px; +} + +.missile-capacity { + margin-right: 10px; + padding-top: 3px; +} + +.missile-capacity .missile { + transform: rotate(-90deg) scale(1.2); + transition: transform 500ms ease-in; +} + +.missile-capacity .missile.hidden { + transform: translateY(-30px) rotate(-90deg); +} + +.missile-capacity{ + display: flex; + font-family: monospace; + color: #364f7f; + font-size: 20px; + margin-left: 4px; + margin-right: 15px; +} + +.ammo-capacity { + display: flex; + font-family: monospace; + color: #364f7f; + font-size: 20px; + margin-left: 13px; + margin-right: 7px; +} + +.ammo-capacity > .ammo { + margin-left: 1px; + transition: transform 50ms ease-in; +} + +.ammo-capacity > .ammo.hidden { + transform: translateY(-30px); +} + +.thrust { + position: relative; + width: 10px; + height: 30px; + border-radius: 4px; + background-image: linear-gradient(179.4deg, rgba(12, 20, 69, 1) -16.9%, rgba(71, 30, 84, 1) 119.9%); +} + +.thrust-level { + position: absolute; + bottom: 0; + left: -6px; + width: 21px; + height: 7px; + border-radius: 10px; + background-image: linear-gradient(179.1deg, rgba(247, 238, 238, 1) -1.9%, rgba(247, 202, 201, 1) 44.9%, rgba(145, 168, 208, 1) 96.1%); + transition: transform 100ms linear; +} + +.minimap { + position: absolute; + width: 300px; + height: 70px; + right: 10px; + top: 10px; +} + +.log { + position: absolute; + top: 90px; + right: 10px; + text-align: right; + font-size: 19px; +} + +.log > div { + overflow: hidden; + max-height: 24px; + margin-bottom: 2px; + transition: max-height 300ms; +} + +.log > div.hide { + max-height: 0; +} + +.message { + display: inline-flex; + flex-direction: row; + align-items: center; + background-color: rgba(255, 255, 255, 0.3); + text-shadow: 0 1px 0 rgb(82, 161, 255); + border-radius: 5px; + padding: 0 3px; +} + +.message > * { + margin-left: 2px; + margin-right: 2px; +} + +.skull { + display: inline-block; + width: 16px; + height: 16px; + background-size: contain; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgaWQ9IkxheWVyXzEiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDI0IDI0OyIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbDpzcGFjZT0icHJlc2VydmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxnIGlkPSJYTUxJRF8xNzE2XyI+PHBhdGggZD0iTTIxLjUsMTAuOTk5YzAtNS4zMzYtNC4zOTktOS42NDUtOS43NjktOS40OTZjLTQuOTkzLDAuMTM4LTkuMTQsNC4zMjktOS4yMyw5LjMyMyAgIGMtMC4wNTgsMy4yNjYsMS41MzcsNi4xNTYsMy45OTgsNy45MXYyLjI2M2MwLDAuODI4LDAuNjcyLDEuN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NDNDI7Ii8+PC9nPjxsaW5lYXJHcmFkaWVudCBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgaWQ9IlhNTElEXzJfIiB4MT0iMi4zNzQ5IiB4Mj0iMjAuNDc1OSIgeTE9IjguMDI4NyIgeTI9IjE2LjQ2OTMiPjxzdG9wIG9mZnNldD0iMCIgc3R5bGU9InN0b3AtY29sb3I6I0ZGRkZGRjtzdG9wLW9wYWNpdHk6MC4yIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdHlsZT0ic3RvcC1jb2xvcjojRkZGRkZGO3N0b3Atb3BhY2l0eTowIi8+PC9saW5lYXJHcmFkaWVudD48cGF0aCBkPSJNMTguOTcyLDMuODMxYy0xLjk1Mi0xLjg5OS00LjU0NS0yLjg5OC03LjI1NC0yLjgyOCAgIGMtNS4yNjQsMC4xNDYtOS42MjIsNC41NDgtOS43MTYsOS44MTRDMS45NDQsMTQuMDI1LDMuNDM1LDE3LjA2LDYsMTguOTg5djIuMDFjMCwxLjEwMywwLjg5NywyLDIsMmg4YzEuMTAzLDAsMi0wLjg5NywyLTJ2LTIuMDEgICBjMi41MS0xLjg4Nyw0LTQuODU1LDQtNy45OUMyMiw4LjI3NSwyMC45MjUsNS43MjksMTguOTcyLDMuODMxeiIgaWQ9IlhNTElEXzE3MjZfIiBzdHlsZT0iZmlsbDp1cmwoI1hNTElEXzJfKTsiLz48L2c+PC9zdmc+) no-repeat center center; +} + +.target { + display: inline-block; + width: 16px; + height: 16px; + background-size: contain; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgaWQ9Ik91dGxpbmVkIiB2aWV3Qm94PSIwIDAgMzIgMzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlLz48ZyBpZD0iRmlsbCI+PHBhdGggZD0iTTI3LDE1QTExLDExLDAsMCwwLDE3LDUuMDVWMkgxNVY1LjA1QTExLDExLDAsMCwwLDUuMDUsMTVIMnYySDUuMDVBMTEsMTEsMCwwLDAsMTUsMjdWMzBoMlYyN0ExMSwxMSwwLDAsMCwyNywxN0gzMFYxNVpNMTYsMjVhOSw5LDAsMSwxLDktOUE5LDksMCwwLDEsMTYsMjVaIi8+PHBhdGggZD0iTTE2LDEyYTQsNCwwLDEsMCw0LDRBNCw0LDAsMCwwLDE2LDEyWm0wLDZhMiwyLDAsMSwxLDItMkEyLDIsMCwwLDEsMTYsMThaIi8+PC9nPjwvc3ZnPg==) no-repeat center center; +} + +.missile { + display: inline-block; + width: 16px; + height: 16px; + background-size: contain; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTdweCIgaGVpZ2h0PSI5cHgiIHZpZXdCb3g9IjAgMCAxNyA5IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPHRpdGxlPm1pc3NpbGVfcmlnaHQ8L3RpdGxlPgogICAgPGcgaWQ9Im1pc3NpbGVfcmlnaHQiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJHcm91cCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoOC41MDAwMDAsIDQuNTAwMDAwKSBzY2FsZSgtMSwgMSkgdHJhbnNsYXRlKC04LjUwMDAwMCwgLTQuNTAwMDAwKSAiPgogICAgICAgICAgICA8cGF0aCBkPSJNMTYuNSwxLjUgTDMuODIwNzMyMzUsMS41IEMxLjgxOTI4MTMyLDIuNDY5Nzk4NjMgMC41OTUyODE1ODEsMy40MDU2NDk1NSAwLjUwNDYxNTcyMiw0LjQyMDA4NDIyIEMwLj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NyAxMiw3IFoiIGlkPSJPdmFsIiBmaWxsLW9wYWNpdHk9IjAuNDMiIGZpbGw9IiNGRkZGRkYiPjwvcGF0aD4KICAgIDwvZz4KPC9zdmc+Cg==) no-repeat center center; +} + +.ammo { + display: inline-block; + width: 6px; + height: 13px; + background-size: contain; + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNnB4IiBoZWlnaHQ9IjEzcHgiIHZpZXdCb3g9IjAgMCA2IDEzIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPHRpdGxlPmFtbW88L3RpdGxlPgogICAgPGcgaWQ9ImFtbW8iIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDMuMDAwMDAwLCA2LjUwMDAwMCkgc2NhbGUoLTEsIDEpIHJvdGF0ZSg5MC4wMDAwMDApIHRyYW5zbGF0ZSgtMy4wMDAwMDAsIC02LjUwMDAwMCkgdHJhbnNsYXRlKC0zLjUwMDAwMCwgMy41MDAwMDApIiBzdHJva2U9IiMwMDAwMDAiPgogICAgICAgICAgICA8cGF0aCBkPSJNMTIuNSwwLjUgTDIuOTMzNTIxNjEsMC41IEMyLjE5NDMyNjcxLDAuNSAxLjYxNTA1OTE5LDAuNzY5MjM5MiAxLjIxMDM0NjA5LDEuMTkyMTIzNzQgQzAuNzM2Mjc5NTg0LDEuNjg3NDc1NjMgMC41LDIuMzgwNzEyOTggMC41LDMuMDY1MjM1NDcgQzAuNSwzLjcyMzk4ODcgMC43MTkxMjU2ODksNC4zODIzNjg1OCAxLjE4NTQyNjQ0LDQuODQ4ODY2OSBDMS41ODc3Nzc0NSw1LjI1MTM4ODM5IDIuMTcyMTI3NTQsNS41IDIuOTMzNTIxNjEsNS41IEwxMi41LDUuNSBMMTIuNSwwLjUgWiIgaWQ9IlJlY3RhbmdsZSIgZmlsbD0iI0QzOUEzQyI+PC9wYXRoPgogICAgICAgICAgICA8bGluZSB4MT0iNCIgeTE9IjIuNzU1NDU1M2UtMTYiIHgyPSI0IiB5Mj0iNSIgaWQ9IkxpbmUiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjwvbGluZT4KICAgICAgICA8L2c+CiAgICAgICAgPHBhdGggZD0iTTQsMS4yMTQ5ODMxOCBDNC4zMzMzMzMzMywxLjIxNDk4MzE4IDQuNjY2NjY2NjcsMS41OTcxOTgyIDUsMi4zNjE2MjgyMiBMNSwxMiBMNCwxMiBMNCwxLjIxNDk4MzE4IFoiIGlkPSJSZWN0YW5nbGUiIGZpbGwtb3BhY2l0eT0iMC40NyIgZmlsbD0iI0ZGRkZGRiI+PC9wYXRoPgogICAgPC9nPgo8L3N2Zz4=) no-repeat center center; +} + +@media screen and (max-width: 900px) { + .minimap { + width: 150px; + } + + .log { + font-size: 12px; + } + + .score-board { + font-size: 12px; + } +} + diff --git a/games.json b/games.json index 2eef0537..b316c90b 100644 --- a/games.json +++ b/games.json @@ -1179,5 +1179,10 @@ "name": "Minecraft Classic", "directory": "mcclassic", "image": "assets/textures/previews/2.png" + }, + { + "name": "Bit Planes", + "directory": "bit-planes", + "image": "bitplanes.png" } ] diff --git a/index.html b/index.html index 43225a72..ae09385e 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,22 @@ - + + diff --git a/js/games.js b/js/games.js index 82771b28..6ae61ee8 100644 --- a/js/games.js +++ b/js/games.js @@ -1,175 +1,192 @@ $.getJSON("/games.json", function (data) { - if (document.readyState === "complete") { + if (document.readyState === "complete") { loadGames(data); } else { - document.addEventListener("DOMContentLoaded", () => { - loadGames(data); - }); + let areGamesReady = setInterval(() => { + if (document.readyState === "complete") { + loadGames(data); + clearInterval(areGamesReady); + } + }, 50); } }); function loadGames(data) { - starredgames = getCookie("starred"); - if (starredgames == "") { - starredgames = []; - } else { - starredgames = JSON.parse(starredgames); - } - console.log(starredgames); - $("#gamesearch").prop({ - placeholder: "Click here to search through our " + data.length + " games!", - }); - data.sort(dynamicSort("name")); - gamelist = data; - for (let i = 0; i < data.length; i++) { - let $element = $("
") - .attr({ - class: "game", - id: data[i].directory, - recommended: data[i].recommended - }) - .data("recommended", data[i].recommended) - .append( - $("").prop({ - src: data[i].directory + "/" + data[i].image, - alt: data[i].name + " logo", - }) - ) - .append($("

").text(data[i].name)) - .append( - $("").prop({ - src: "img/star.svg", - alt: "star", - class: "star", - }) - ); + starredgames = getCookie("starred"); + if (starredgames == "") { + starredgames = []; + } else { + starredgames = JSON.parse(starredgames); + } + $("#gamesearch").prop({ + placeholder: "Click here to search through our " + data.length + " games!", + }); + data.sort(dynamicSort("name")); + gamelist = data; + for (let i = 0; i < data.length; i++) { + let $element = $("
") + .attr({ + class: "game", + id: data[i].directory, + recommended: data[i].recommended, + }) + .data("recommended", data[i].recommended) + .append( + $("").prop({ + src: data[i].directory + "/" + data[i].image, + alt: data[i].name + " logo", + }) + ) + .append($("

").text(data[i].name)) + .append( + $("").prop({ + src: "img/star.svg", + alt: "star", + class: "star", + }) + ); - if (starredgames.includes(data[i].directory)) { - $element.find("img.star").attr("id", "starred"); - $element.find("img.star").attr("src", "img/star-fill.svg"); - let $pinnedelement = $element.clone(); - $("#pinned").append($pinnedelement); - if ($("#pinnedmessage")) { - $("#pinnedmessage").hide(); - } - } + if (starredgames.includes(data[i].directory)) { + $element.find("img.star").attr("id", "starred"); + $element.find("img.star").attr("src", "img/star-fill.svg"); + let $pinnedelement = $element.clone(); + $("#pinned").append($pinnedelement); + if ($("#pinnedmessage")) { + $("#pinnedmessage").hide(); + } + } - $("#games").append($element); - } - $("#games #message").remove(); + $("#games").append($element); + } + $("#games #message").remove(); - // starred games - let starred; - $(document).on("click", ".game", function (event) { - if ($(event.target).is("img.star")) { - if (!$(event.target).attr("id")) { - $(event.target).prop({ id: "starred" }); - $(event.target).prop({ src: "img/star-fill.svg" }); - starred = Cookies.get("starred"); - if (starred) { - starred = JSON.parse(starred); - } else { - starred = []; - } - starred.push($(this).attr("id")); - Cookies.set("starred", JSON.stringify(starred)); - $element = $(this).clone(); - $("#pinned").append($element); - $("#pinnedmessage").hide(); - temp = $("#pinned")[0].childNodes; - pinnedarray = [...temp]; - pinnedarray.sort(dynamicSort("id")); - $("#pinned").empty(); - for (let i = 0; i < pinnedarray.length; i++) { - pinnedarraynodes = pinnedarray[i].childNodes; - pinnedarraynodes = [...pinnedarraynodes]; - let $element = $("
") - .prop({ - class: "game", - id: pinnedarray[i].id, - }) - .append( - $("").prop({ - src: pinnedarraynodes[0].src, - alt: pinnedarraynodes[0].alt, - class: "gameicon", - }) - ) - .append($("

").text(pinnedarraynodes[1].innerHTML)) - .append( - $("").prop({ - src: "img/star-fill.svg", - alt: "star", - class: "star", - id: "starred", - }) - ); - $("#pinned").append($element); - } - } else { - $(event.target).removeAttr("id"); - $(event.target).attr("src", "img/star.svg"); - $thisdiv = "#" + $(this).attr("id"); - $thisdiv = $thisdiv.replace(".", "\\."); - starred = Cookies.get("starred"); - starred = JSON.parse(starred); - ourindex = starred.indexOf($(this).attr("id")); - starred.splice(ourindex, 1); - Cookies.set("starred", JSON.stringify(starred)); - $("#pinned " + $thisdiv).remove(); - if ($("#pinned").is(":empty")) { - $("#pinnedmessage").show(); - } - $($thisdiv + " #starred").attr("src", "img/star.svg"); - $($thisdiv + " #starred").removeAttr("id"); - } - } else { - redirectGame($(this).attr("id")); - } - }); - $(document).on("click", "#game img .star", function (event) { - $(this).prop({ class: "material-symbols-outlined fill" }); - }); + if ((search = 1)) { + var txt = $("#gamesearch").val(); + if (txt == "") { + $("#games .suggest").show(); + } else { + $("#games .suggest").hide(); + } + $("#games .game").hide(); + $("#games .game").each(function () { + if ($(this).text().toUpperCase().indexOf(txt.toUpperCase()) != -1 || $(this).attr("id").toUpperCase().indexOf(txt.toUpperCase()) != -1) { + $(this).show(); + } + }); + } + + // starred games + let starred; + $(document).on("click", ".game", function (event) { + if ($(event.target).is("img.star")) { + if (!$(event.target).attr("id")) { + $(event.target).prop({ id: "starred" }); + $(event.target).prop({ src: "img/star-fill.svg" }); + starred = Cookies.get("starred"); + if (starred) { + starred = JSON.parse(starred); + } else { + starred = []; + } + starred.push($(this).attr("id")); + Cookies.set("starred", JSON.stringify(starred)); + $element = $(this).clone(); + $("#pinned").append($element); + $("#pinnedmessage").hide(); + temp = $("#pinned")[0].childNodes; + pinnedarray = [...temp]; + pinnedarray.sort(dynamicSort("id")); + $("#pinned").empty(); + for (let i = 0; i < pinnedarray.length; i++) { + pinnedarraynodes = pinnedarray[i].childNodes; + pinnedarraynodes = [...pinnedarraynodes]; + let $element = $("
") + .prop({ + class: "game", + id: pinnedarray[i].id, + }) + .append( + $("").prop({ + src: pinnedarraynodes[0].src, + alt: pinnedarraynodes[0].alt, + class: "gameicon", + }) + ) + .append($("

").text(pinnedarraynodes[1].innerHTML)) + .append( + $("").prop({ + src: "img/star-fill.svg", + alt: "star", + class: "star", + id: "starred", + }) + ); + $("#pinned").append($element); + } + } else { + $(event.target).removeAttr("id"); + $(event.target).attr("src", "img/star.svg"); + $thisdiv = "#" + $(this).attr("id"); + $thisdiv = $thisdiv.replace(".", "\\."); + starred = Cookies.get("starred"); + starred = JSON.parse(starred); + ourindex = starred.indexOf($(this).attr("id")); + starred.splice(ourindex, 1); + Cookies.set("starred", JSON.stringify(starred)); + $("#pinned " + $thisdiv).remove(); + if ($("#pinned").is(":empty")) { + $("#pinnedmessage").show(); + } + $($thisdiv + " #starred").attr("src", "img/star.svg"); + $($thisdiv + " #starred").removeAttr("id"); + } + } else { + redirectGame($(this).attr("id")); + } + }); + $(document).on("click", "#game img .star", function (event) { + $(this).prop({ class: "material-symbols-outlined fill" }); + }); } function redirectGame(dir) { - window.location.href = window.location.origin + "/" + dir + "/index.html"; + window.location.href = window.location.origin + "/" + dir + "/index.html"; } function dynamicSort(property) { - var sortOrder = 1; + var sortOrder = 1; - if (property[0] === "-") { - sortOrder = -1; - property = property.substr(1); - } - return function (a, b) { - if (sortOrder == -1) { - return b[property].localeCompare(a[property]); - } else { - return a[property].localeCompare(b[property]); - } - }; + if (property[0] === "-") { + sortOrder = -1; + property = property.substr(1); + } + return function (a, b) { + if (sortOrder == -1) { + return b[property].localeCompare(a[property]); + } else { + return a[property].localeCompare(b[property]); + } + }; } function selectRandomGame() { - redirectGame(gamelist[Math.floor(Math.random() * gamelist.length - 1)].directory); + redirectGame(gamelist[Math.floor(Math.random() * gamelist.length - 1)].directory); } let viewrecommended = 0; function recommendedGames() { - if(viewrecommended == 0) { - $("#games .game").hide(); - $("#games .game").each(function () { - if ($(this).attr("recommended")) { - $(this).show(); - } - }); - $("#recommend").text("Click to view all games again!"); - viewrecommended = 1; - } else { - $("#games .game").hide(); - $("#games .game").show(); - viewrecommended = 0; - $("#recommend").text("Click to view recommended games!"); - } + if (viewrecommended == 0) { + $("#games .game").hide(); + $("#games .game").each(function () { + if ($(this).attr("recommended")) { + $(this).show(); + } + }); + $("#recommend").text("Click to view all games again!"); + viewrecommended = 1; + } else { + $("#games .game").hide(); + $("#games .game").show(); + viewrecommended = 0; + $("#recommend").text("Click to view recommended games!"); + } } diff --git a/js/main.js b/js/main.js index 95895ec7..3a8171d2 100644 --- a/js/main.js +++ b/js/main.js @@ -92,6 +92,10 @@ function copyToClipboard(text) { function setTheme(theme) { localStorage.setItem("selenite.theme", theme); document.body.setAttribute("theme", theme); + if(theme != "custom") { + document.getElementById("customMenu").style.display = "none"; + document.body.style = ""; + } } function setPanicMode() { if (!$("#panic").val().startsWith("https")) { @@ -100,10 +104,6 @@ function setPanicMode() { } document.cookie = "panicurl=" + $("#panic").val(); } -function customTheme() { - const customMenu = document.querySelector("#customMenu"); - customMenu.removeAttribute("display"); -} if (location.hostname.includes(".vercel.app") && (location.hostname.includes("selenite-beta") || location.hostname.includes("space-lovers") || location.hostname.includes("school-education"))) { alert("IMPORTANT:\nVercel links will be taken offline eventually. Please move to a new link. You can find these in the Discord at discord.gg/7jyufnwJNf, or you can try a few of the ones listed\nselenite.cc\nselenite.pages.dev\nselenite.skysthelimit.dev\nall-about-science.onrender.com"); } diff --git a/js/search.js b/js/search.js index 8a4818ec..2546b0cb 100644 --- a/js/search.js +++ b/js/search.js @@ -1,16 +1,30 @@ -$(document).ready(function () { +function searchGames() { + search = 1; + var txt = $("#gamesearch").val(); + if (txt == "") { + $("#games .suggest").show(); + } else { + $("#games .suggest").hide(); + } + $("#games .game").hide(); + $("#games .game").each(function () { + if ($(this).text().toUpperCase().indexOf(txt.toUpperCase()) != -1 || $(this).attr("id").toUpperCase().indexOf(txt.toUpperCase()) != -1) { + $(this).show(); + } + }); +} + + +document.addEventListener("DOMContentLoaded", () => { + let urlParams = new URLSearchParams(window.location.search); + let q = urlParams.get("q"); + if (q) { + document.getElementById("gamesearch").value = q; + searchGames(); + urlParams.delete("q"); + window.history.replaceState({}, document.title, location.pathname); + } $("#gamesearch").on("input propertychange paste", function () { - var txt = $("#gamesearch").val(); - if(txt == "") { - $("#games .suggest").show(); - } else { - $("#games .suggest").hide(); - } - $("#games .game").hide(); - $("#games .game").each(function () { - if (($(this).text().toUpperCase().indexOf(txt.toUpperCase()) != -1) || ($(this).attr("id").toUpperCase().indexOf(txt.toUpperCase()) != -1)) { - $(this).show(); - } - }); - }); -}); + searchGames(); + }); +}); \ No newline at end of file diff --git a/settings.html b/settings.html index 06f139b7..40e6b28b 100644 --- a/settings.html +++ b/settings.html @@ -108,15 +108,15 @@