-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsrc.2797f5c9.js.map
1 lines (1 loc) · 113 KB
/
src.2797f5c9.js.map
1
{"version":3,"sources":["core/state.ts","core/utils.ts","content.json","core/input.ts","core/timers.ts","core/audio.ts","core/entities/fish.ts","core/entities/penguin.ts","core/entities/characters.ts","core/leaderboard.ts","core/logic.ts","core/gui.ts","../node_modules/stats.js/build/stats.min.js","core/main.ts","core/entities/fishingRod.ts","core/cheats.ts","core/StartMenu/FallersRain.ts","index.ts"],"names":["module","exports","real_news","title","content","theme","fake","fake_news"],"mappings":";;AAkDA,IAAA,EAAA,UAAA,GAAA,SAAA,EAAA,GAAA,OAAA,EAAA,mBAAA,QAAA,iBAAA,OAAA,SAAA,SAAA,GAAA,cAAA,GAAA,SAAA,GAAA,OAAA,GAAA,mBAAA,QAAA,EAAA,cAAA,QAAA,IAAA,OAAA,UAAA,gBAAA,IAAA,GAAA,SAAgB,EAAM,GACf,IAAA,EAAc,OAMb,MAJ6B,WAAhC,EAAO,EAAO,iBACjB,EAAO,cAAgB,GAAoB,IAGrC,EAAO,cAPf,OAAA,eAAA,QAAA,aAAA,CAAA,OAAA,IAAA,QAAA,WAAA,EAAA,QAAA,MAAA;;AC6EA,aAzHA,SAAgB,EAAK,EAAY,EAAY,GACrC,OAAA,GAAM,EAAI,GAAK,EAAK,EAO5B,SAAgB,EAAU,GAElB,OADO,IAAI,MAAM,GAQzB,SAAgB,EAAU,GACnB,IAAA,EAAQ,IAAI,MAEX,OADP,EAAM,IAAM,EACL,EAOR,SAAgB,EAAa,GACrB,OAAA,IAAI,QAAQ,SAAC,EAAS,GACtB,IAAA,EAAQ,IAAI,MAClB,EAAM,OAAS,WAAM,OAAA,EAAQ,IAC7B,EAAM,IAAM,IASd,SAAgB,EAAc,EAAiB,GACzC,IAAA,IAAI,EAAI,EAAG,EAAI,EAAM,OAAQ,IAAK,CAGjC,IAFC,IAAA,EAAQ,EAAM,GAEX,EAAI,EAAI,EAAG,GA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,EAhIA,GAkIA,QAAA,QAAA,EAAA,IAAI,EAAY,SAAS,eAAe;;ACnIxC,aAAA,IAAA,EAAA,MAAA,KAAA,gBAAA,WAAA,IAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAAA,OAAA,EAAA,EAAA,IAAA,GAAA,UAAA,GAAA,OAAA,IAAA,EAAA,MAAA,GAAA,EAAA,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,IAAA,IAAA,IAAA,EAAA,UAAA,GAAA,EAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,IAAA,IAAA,EAAA,GAAA,EAAA,GAAA,OAAA,GAAA,OAAA,eAAA,QAAA,aAAA,CAAA,OAAA,IAnDA,IAAA,EAAA,QAAA,gBACA,EAAA,QAAA,gBAGA,EAAA,QAAA,kBAGM,EAAQ,SAAS,eAAe,SACtC,EAAM,MAAQ,OAAO,WAAa,OAAO,iBACzC,EAAM,OAAS,OAAO,YAAc,OAAO,iBAG3C,IAAM,EAAM,EAAM,WAAW,MAG7B,EAAA,MAAM,CACL,QAAQ,EACR,QAAS,EACT,IAAK,EAEL,OAAQ,EACR,OAAQ,EACR,WAAW,EAEX,SAAU,GACV,SAAU,GAEV,KAAM,EACN,MAAO,EACP,UAAW,KACX,gBAAiB,GACjB,iBAAiB,EAEjB,KAAM,EAAA,QAAO,EAAK,EAAA,UAAc,EAAA,YAChC,kBAAmB,EACnB,UAAW,IAIZ,QAAA,gBAGA,QAAA,cAGA,QAAA,eAGA,QAAA,iBAGA,QAAA","file":"src.2797f5c9.js","sourceRoot":"..\\src","sourcesContent":["import { Penguin } from './entities/penguin';\r\nimport { Fish } from './entities/fish';\r\nimport { Characters } from './entities/characters';\r\nimport { FishingRod } from './entities/fishingRod';\r\n\r\n/**\r\n * Possible post themes\r\n */\r\ntype Theme = 'politics' | 'gaming' | 'music' | 'films' | 'education' | 'sport';\r\n\r\n/**\r\n * Sctructure of the news post\r\n */\r\ninterface NewsBlock {\r\n\ttitle: string;\r\n\tcontent: string;\r\n\ttheme: Theme;\r\n\tfake: boolean;\r\n}\r\n\r\n/**\r\n * State of the game\r\n */\r\nexport interface GameState {\r\n\tpaused: boolean;\r\n\telement: HTMLCanvasElement;\r\n\tctx: CanvasRenderingContext2D;\r\n\r\n\tmouseX: number;\r\n\tmouseY: number;\r\n\tmouseDown: boolean;\r\n\r\n\tpenguins: Array<Penguin | Characters>;\r\n\tentities: Array<Fish | FishingRod>;\r\n\r\n\tfish: number;\r\n\ttempo: number;\r\n\trelevance: number;\r\n\tmaximumPenguins: number;\r\n\tserverAvailable: boolean;\r\n\r\n\tnews: NewsBlock[];\r\n\tnewsIndex: number;\r\n\tselectedNewsIndex: number;\r\n}\r\n\r\n/**\r\n * Global state manager\r\n * @param initial Initial state. Will be used if state initialized for the first time.\r\n */\r\nexport function State(initial?: GameState): GameState {\r\n\tconst global: any = window;\r\n\r\n\tif (typeof global.__GameState__ !== 'object') {\r\n\t\tglobal.__GameState__ = initial ? initial : {};\r\n\t}\r\n\r\n\treturn global.__GameState__;\r\n}\r\n","/**\r\n * Linear interpolation function\r\n * @param v0 Range start\r\n * @param v1 Range end\r\n * @param t Position in range ( from 0 to 1 )\r\n */\r\nexport function lerp(v0: number, v1: number, t: number): number {\r\n\treturn v0 * (1 - t) + v1 * t;\r\n}\r\n\r\n/**\r\n * Load audio file\r\n * @param src Audio path\r\n */\r\nexport function loadAudio(src: string): HTMLAudioElement {\r\n\tconst audio = new Audio(src);\r\n\treturn audio;\r\n}\r\n\r\n/**\r\n * Load image\r\n * @param src Image path\r\n */\r\nexport function loadImage(src: string): HTMLImageElement {\r\n\tconst image = new Image();\r\n\timage.src = src;\r\n\treturn image;\r\n}\r\n\r\n/**\r\n * Preload image\r\n * @param src Image path\r\n */\r\nexport function preloadImage(src: string): Promise<HTMLImageElement> {\r\n\treturn new Promise((resolve, reject) => {\r\n\t\tconst image = new Image();\r\n\t\timage.onload = () => resolve(image);\r\n\t\timage.src = src;\r\n\t});\r\n}\r\n\r\n/**\r\n * Sort objects by field.\r\n * @param array Array to sort\r\n * @param field To sort by\r\n */\r\nexport function insertionSort(array: object[], field: string): object[] {\r\n\tfor (let i = 0; i < array.length; i++) {\r\n\t\tconst value = array[i] as any;\r\n\r\n\t\tfor (var j = i - 1; j > -1 && array[j][field] > value[field]; j--) {\r\n\t\t\tarray[j + 1] = array[j];\r\n\t\t}\r\n\r\n\t\tarray[j + 1] = value;\r\n\t}\r\n\r\n\treturn array;\r\n}\r\n\r\n/**\r\n * Generate random integer\r\n * @param min Minimal\r\n * @param max Maximal\r\n */\r\nexport function randomInteger(min: number, max: number): number {\r\n\treturn Math.floor(Math.random() * (max - min + 1)) + min;\r\n}\r\n\r\n/**\r\n * Convert value from one range to another\r\n * @param {Number} value value to convert\r\n * @param {Object} oldRange min, max of values range\r\n * @param {Object} newRange min, max of desired range\r\n * @return {Number} value converted to other range\r\n */\r\nexport function convertRange(\r\n\tvalue: number,\r\n\toldRange: { min: number; max: number },\r\n\tnewRange: { min: number; max: number }\r\n) {\r\n\treturn ((value - oldRange.min) * (newRange.max - newRange.min)) / (oldRange.max - oldRange.min) + newRange.min;\r\n}\r\n\r\n/**\r\n * Shuffle array\r\n * Taken from https://stackoverflow.com/a/2450976/7442791\r\n * @param array Array to shuffle\r\n */\r\nexport function shuffle(array: any[]): any[] {\r\n\tlet currentIndex: number = array.length;\r\n\tlet temporaryValue: number;\r\n\tlet randomIndex: number;\r\n\r\n\twhile (0 !== currentIndex) {\r\n\t\trandomIndex = Math.floor(Math.random() * currentIndex);\r\n\t\tcurrentIndex -= 1;\r\n\r\n\t\ttemporaryValue = array[currentIndex];\r\n\t\tarray[currentIndex] = array[randomIndex];\r\n\t\tarray[randomIndex] = temporaryValue;\r\n\t}\r\n\r\n\treturn array;\r\n}\r\n\r\n/**\r\n * Get index of random value from array.\r\n * @param array Array to take from.\r\n */\r\nexport function randomFromArray(array: any[]): number {\r\n\treturn Math.floor(Math.random() * array.length);\r\n}\r\n\r\n/**\r\n * Add commas to number\r\n * @param number Number to add commas to\r\n */\r\nexport function numberWithCommas(num: number): string {\r\n\treturn num.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\r\n}\r\n\r\n/**\r\n * Calculate average value of all numbers\r\n * @param nums Array of number\r\n * @param floor Round returned value\r\n */\r\nexport function average(nums: number[], floor: boolean = true): number {\r\n\tconst result: number = nums.reduce((a, b) => a + b, 0) / nums.length;\r\n\treturn floor ? Math.floor(result) : result;\r\n}\r\n","module.exports={real_news:[{title:\"Why crocodiles have changed so little!\",content:\"Learn why crocodiles haven't evolved for centuries.\",theme:\"education\",fake:!1},{title:\"Scientists discover new galaxy!\",content:\"Telescope captures new images of the new galaxy.\",theme:\"education\",fake:!1},{title:\"Scientists discover new Comet!\",content:\"It is very bright and fast\",theme:\"education\",fake:!1},{title:\"Hubble observes young Supernova\",content:\"Find out why the star exploded.\",theme:\"education\",fake:!1},{title:\"Create your own garden at home\",content:\"Create true BIO food.\",theme:\"education\",fake:!1},{title:\"First time black hole captured on film\",content:\"New discovery from scientists.\",theme:\"education\",fake:!1},{title:\"Why there are craters on moon?\",content:\"Find out how they are made.\",theme:\"education\",fake:!1},{title:\"New species of bats discoverd\",content:\"Where and who are they?\",theme:\"education\",fake:!1},{title:\"SpaceX launches humanas to the ISS\",content:\"How did they got there?\",theme:\"education\",fake:!1},{title:\"New mineral Kernowite discovered in UK\",content:\"It look super coool.\",theme:\"education\",fake:!1},{title:\"Why you should drink tea.\",content:\"Benefits of tea.\",theme:\"education\",fake:!1},{title:\"Why volcanos erupt?\",content:\"Find out here.\",theme:\"education\",fake:!1},{title:\"U.S. Elections!\",content:\"In a week we will know who will be the new president of the United States!\",theme:\"politics\",fake:!1},{title:\"President elected\",content:\"After recent president election, the winner takes position\",theme:\"politics\",fake:!1},{title:\"New President rules\",content:\"New Statement from president came out!\",theme:\"politics\",fake:!1},{title:\"Britain post Brexit\",content:\"What has been effected by it?\",theme:\"politics\",fake:!1},{title:\"Migrants stuck in Bosnia\",content:\"What made it happen?\",theme:\"politics\",fake:!1},{title:\"Trump impeached again\",content:\"1st president to get impeached twice!\",theme:\"politics\",fake:!1},{title:\"Dutch cabiner resigns\",content:\"Why it happened?\",theme:\"politics\",fake:!1},{title:\"Vaccine for Covid-19 have been released\",content:\"Will finaly covid be beaten?\",theme:\"politics\",fake:!1},{title:\"G7 Summit in UK\",content:\"What will they discuss?\",theme:\"politics\",fake:!1},{title:\"German farmers prostest\",content:\"New policy make them really mad\",theme:\"politics\",fake:!1},{title:\"Finlands prime minister got asaulted\",content:\"Is there any reason?\",theme:\"politics\",fake:!1},{title:\"Second assult on USA Capitol might happen\",content:\"Why is it happening?\",theme:\"politics\",fake:!1},{title:\"New NBA Champions!\",content:\"The Los Angeles Lakers defeated the Miami Heat 4-1, to become the 2020 NBA Champions \",theme:\"sport\",fake:!1},{title:\"New SuperBowl Champions!\",content:\"The Kansas City Chiefs defeated the San Francisco 49ers, 31-20\",theme:\"sport\",fake:!1},{title:\"Kobe Bryant is now dead\",content:\"The very popular hall of fame basketball player died in a helicopter accident\",theme:\"sport\",fake:!1},{title:\"Lionel Messi won 2019 Ballon d'Or\",content:\"Barcelona captain earned his sixth, thus making history by surpassing Cristiano Ronaldo (5)\",theme:\"sport\",fake:!1},{title:\"Wayne Rooney Retires From Playing, Becomes Derby County's Permanent Coach\",content:\"All-time record scorer for England and Manchester United. A haul of 16 trophies. Wayne Rooney’s illustrious playing career is over.\",theme:\"sport\",fake:!1},{title:\"Francisco Lindor's trade to the Mets\",content:\"How will this affect the famous baseball player's reputation?.\",theme:\"sport\",fake:!1},{title:\"Kevin Durant to sign contract with a basketball club Brooklyn Nets\",content:\"The announcement was shared on the Instagram account for The Boardroom, Durant's new series for ESPN's streaming service, ESPN+.\",theme:\"sport\",fake:!1},{title:\"Two-time golf major winner Angel Cabrera arrested in Brazil\",content:\"Federal Police in Brazil have arrested golfer Angel Cabrera on an Interpol red notice for alleged crimes committed in Argentina.\",theme:\"sport\",fake:!1},{title:\"Michelle Wie West's retirement thoughts changed by having a baby girl\",content:\"Why did famous female golf player change her mind?\",theme:\"sport\",fake:!1},{title:\"Petra Vlhova crowned 'Snow Queen'\",content:\"Slovakia's Petra Vlhova was crowned 'Snow Queen' of Zagreb for the second straight year after claiming the World Cup slalom event\",theme:\"sport\",fake:!1},{title:\"After 30 league games without a win, Schalke stops the rot with 4-0 victory\",content:\"Having last won a German Bundesliga game just under a year ago, Schalke ended that dismal record in some style on Saturday\",theme:\"sport\",fake:!1},{title:\"'Avengers: Endgame' Become No. 1 Grossing Film of All Time\",content:\"Through Friday, Avengers: Endgame's global gross was $2.7892 billion, $500,000 behind Avatar's $2.7897 billion.\",theme:\"films\",fake:!1},{title:\"‘Black Panther’ Is Now The #3 All-Time Movie In Box Office History\",content:\"Black Panther finished Friday with a domestic total of $659.3 million.\",theme:\"films\",fake:!1},{title:\"Justice League Will Release As A Movie, Not A TV Show\",content:\"Zack Snyder's upcoming director's cut of Justice League will be a movie, not a mini-series like what was previously announced, says Snyder.\",theme:\"films\",fake:!1},{title:\"‘Frozen II’ is now the highest grossing animated movie of all time\",content:\"The film has garnered $1.32 billion since its release in November.\",theme:\"films\",fake:!1},{title:\"Moana Animated Series Is Coming to Disney+ in 2023\",content:\"A Disney+ series that will continue the adventures of Moana is now being developed.\",theme:\"films\",fake:!1},{title:\"Godzilla vs Kong Release Date Moves Up Two Months!\",content:\"HBO Max release on May 21\",theme:\"films\",fake:!1},{title:\"'The Boss Baby' sequel release delayed to September 2021\",content:\"Universal Pictures and DreamWorks Animation are delaying the release of The Boss Baby sequel.\",theme:\"films\",fake:!1},{title:\"A Tom and Jerry movie for release in theaters next year\",content:\"New movie scheduled for release in theaters in 2021.\",theme:\"films\",fake:!1},{title:\"Minions beats Toy Story 3 as second highest grossing animation\",content:\"'Minions' is officially the second-highest grossing animated movie of all time.\",theme:\"films\",fake:!1},{title:\"New ‘Star Wars’ Movie\",content:\"from Patty Jenkins Announced: ‘Rogue Squadron’ for Christmas 2023\",theme:\"films\",fake:!1},{title:\"'Coming 2 America' sequel to be released on Amazon in March\",content:\"Amazon Studios has acquired worldwide rights to the sequel to the iconic comedy 'Coming to America'.\",theme:\"films\",fake:!1},{title:\"The Incredibles 2 is coming to Netflix!\",content:\"The Incredibles 2 is coming to Netflix across multiple Netflix regions in 2019.\",theme:\"films\",fake:!1},{title:\"Space-Jam will premiere on HBO-MAX\",content:\"It's day-and-date release pushed up from May 21 to March 26.\",theme:\"films\",fake:!1},{title:\"The Netflix original series ‘Disenchantment’ returned for a third season!\",content:\"the Netflix animated, action-adventure comedy first premiered in 2018 \",theme:\"films\",fake:!1},{title:\"Cyberpunk 2077 released!\",content:\"One of the best upcoming games has been finaly released.\",theme:\"gaming\",fake:!1},{title:\"New Spider-man game\",content:\"The new Spider-man game is out, but is it good?\",theme:\"gaming\",fake:!1},{title:\"Zelda Breath of the Wild 2 announced \",content:\"Nintendo released a trailer of Zelda BOTW 2, and it's awesome\",theme:\"gaming\",fake:!1},{title:\"Sims 4 is getting another expansion\",content:\"This time it's about paranormal activity, so expect some haunted houses!\",theme:\"gaming\",fake:!1},{title:\"Star wars: Battlefront 2 servers crashed\",content:\"The servers crashed due to the rise in popularity of the game\",theme:\"gaming\",fake:!1},{title:\"Steam winter sale ends soon\",content:\"Quick grab some game on cheap price!\",theme:\"gaming\",fake:!1},{title:\"The most downlowded mobile game of 2020\",content:\"The most downloaded mobile game of 2020 was Among Us - surprised?\",theme:\"gaming\",fake:!1},{title:\"Pokemon GO one of the most grossing games of 2020\",content:\"Despite COVID-19 the game made 2 billion in revenue\",theme:\"gaming\",fake:!1},{title:\"A lot of Playstation 5 games announced\",content:\"Which one will you play first?\",theme:\"gaming\",fake:!1},{title:\"God of War 2 in development\",content:\"What changes will there be?\",theme:\"gaming\",fake:!1},{title:\"More than 2 billion tweets about gaming in 2020\",content:\"That's a new record for gaming - what will this bring?\",theme:\"gaming\",fake:!1},{title:\"Gaming PC sales sky high due to quarantine\",content:\"2020 was the best year for PC gaming, with many new users\",theme:\"gaming\",fake:!1},{title:\"EA now not the only company to make Star Wars games\",content:\"This might mean that new and cool Star Wars games are on the way!\",theme:\"gaming\",fake:!1},{title:\"League of Legends new character announced\",content:\"Viego the Ruined King will be added to League of Legends soon\",theme:\"gaming\",fake:!1},{title:\"New HALO game delayed\",content:\"It looked bad, so they delayed it.\",theme:\"gaming\",fake:!1},{title:\"Lil Pump has made new song!\",content:\"The new song is titled Adidas Gang\",theme:\"music\",fake:!1},{title:\"Grammys delayed due Covid-19\",content:\"Due to Covid-19 pandemic, grammy awards are delayed!\",theme:\"music\",fake:!1},{title:\"New James Bond music is top class.\",content:\"Song titled NO.TIME.TO.DIE brings new light into Jame bond films!.\",theme:\"music\",fake:!1},{title:\"All I want for christmas - best song of generation?\",content:\"Will there ever be end to it?\",theme:\"music\",fake:!1},{title:\"Dr. Dre in Hospital!\",content:\"What happened and should you be woried?\",theme:\"music\",fake:!1},{title:\"New Ed Sheeran album released\",content:\"What now he has to offer?\",theme:\"music\",fake:!1},{title:\"21 savage let's Twitch streamers use his music\",content:\"Despite the oppritunity to make a lot of money, he chose to let people use it\",theme:\"music\",fake:!1},{title:\"Drake declared the best artist of 2020\",content:\"Out of millions of musicians, Drake stands on top\",theme:\"music\",fake:!1},{title:\"Dua Lipa releases new song\",content:\"The new song Dancing In The Dark is getting good reviews\",theme:\"music\",fake:!1},{title:\"Spotify Wrapped 2020 is out\",content:\"What was your most listened to artist?\",theme:\"music\",fake:!1},{title:\"Billie Eilish new book announced\",content:\"It will feature never before seen Photos\",theme:\"music\",fake:!1},{title:\"Lil Nas X's old town road becomes most certified song in history\",content:\"The song hit platinum status 14 times, the first to do so in History\",theme:\"music\",fake:!1},{title:\"Arianna Grande engaged with Dalton Gomez\",content:\"The pop star announced the engagment in the sweetest way possible\",theme:\"music\",fake:!1},{title:\"The Weeknd did plastic surgery\",content:\"It looks so bad....\",theme:\"music\",fake:!1},{title:\"BTS new album 'BE'\",content:\"The new album has a song for every mood\",theme:\"music\",fake:!1}],fake_news:[{title:\"School is cancelled FOREVER\",content:\"The president decided that fun is more important than education\",theme:\"FakeNews\",fake:!0},{title:\"Stop drinking water\",content:\"Scientists have found that all the water once was in the dinosaurs!\",theme:\"FakeNews\",fake:!0},{title:\"Earn 5000 $ a day\",content:\"With EARN MONEY application you can become a millionaire!\",theme:\"FakeNews\",fake:!0},{title:\"The moon has disappeared\",content:\"The moon is no longer in the sky, find out why\",theme:\"FakeNews\",fake:!0},{title:\"The NBA has disbanded\",content:\"After finding a cockroach on the field, the NBA disbaneded\",theme:\"FakeNews\",fake:!0},{title:\"Humans found on saturn\",content:\"Some guy from Florida found on Saturn with telescope\",theme:\"FakeNews\",fake:!0},{title:\"UFO crash landed in Amsterdam\",content:\"Aliens? Some crazy guy from Rotterdam? Who knows!\",theme:\"FakeNews\",fake:!0},{title:\"Water to Wine transfer device\",content:\"Scientists made a device that makes Water into Wine\",theme:\"FakeNews\",fake:!0},{title:\"All video games now are free\",content:\"Every persons dream has come true?\",theme:\"FakeNews\",fake:!0},{title:\"Math banned from schools in the Netherlands\",content:\"Politicians figured noone needs math anyways\",theme:\"FakeNews\",fake:!0},{title:\"Cave man music won Grammy\",content:\"Music from ages ago won a award for being amazing\",theme:\"FakeNews\",fake:!0},{title:\"New USA president is real life Bat-Man\",content:\"New conspiracy theory of the President being Bat-Man\",theme:\"FakeNews\",fake:!0},{title:\"France and UK colonize Mars\",content:\"Is this history all over again?\",theme:\"FakeNews\",fake:!0},{title:\"History was wrong: dinosaurs still exist\",content:\"Secret underground society of dinosaurs have made contact with humans\",theme:\"FakeNews\",fake:!0},{title:\"New EASY cure to Covid-19\",content:\"Click here to find out. What is it.\",theme:\"FakeNews\",fake:!0},{title:\"New iPhone 13 revealed\",content:\"Apple revealed the new iPhone 13 - only 3000$!\",theme:\"FakeNews\",fake:!0},{title:\"Masks don't work\",content:\"Do masks work? Do they???? Maybe?!\",theme:\"FakeNews\",fake:!0},{title:\"UK becomes monarchy again!\",content:\"Queen take control of the country\",theme:\"FakeNews\",fake:!0},{title:\"Youtube changes name to - videos\",content:\"Youtube is now called Videos, weird right?\",theme:\"FakeNews\",fake:!0},{title:\"Time Travel discovered in Area 51\",content:\"After the Area 51 raid, someone found Time Travel\",theme:\"FakeNews\",fake:!0},{title:\"TikTok banned in the EU\",content:\"Following USA, the EU decided to ban TikTok\",theme:\"FakeNews\",fake:!0},{title:\"Free Wi-Fi all over the world!\",content:\"Get free Wi-Fi everywhere, it's just 19.99!\",theme:\"FakeNews\",fake:!0},{title:\"Cartoons are now BANNED in Germany\",content:\"For no reason every type of cartoon banned in Germany\",theme:\"FakeNews\",fake:!0},{title:\"Chocolate is actually healthy?\",content:\"Scientists say Chocolate is healthier than vegetables\",theme:\"FakeNews\",fake:!0},{title:\"This method can cure any wound!\",content:\"Press to find out about it.\",theme:\"FakeNews\",fake:!0},{title:\"Free way to get iphone fast\",content:\"Find out about it here.\",theme:\"FakeNews\",fake:!0}]};","import { State, GameState } from './state';\r\n\r\n// Get game state\r\nconst GAME: GameState = State();\r\n\r\n// On window resize\r\nwindow.addEventListener('resize', () => {\r\n\tGAME.element.width = window.innerWidth * window.devicePixelRatio;\r\n GAME.element.height = window.innerHeight * window.devicePixelRatio;\r\n});\r\n\r\n// Mouse position calculation\r\nGAME.element.addEventListener('mousemove', event => {\r\n\tconst rect: DOMRect = GAME.element.getBoundingClientRect();\r\n\tGAME.mouseX = ((event.clientX - rect.left) / (rect.right - rect.left)) * GAME.element.width;\r\n\tGAME.mouseY = ((event.clientY - rect.top) / (rect.bottom - rect.top)) * GAME.element.height;\r\n});\r\n\r\n// On mouse down\r\nGAME.element.addEventListener('mousedown', () => {\r\n\tGAME.mouseDown = true;\r\n});\r\n\r\n// On mouse up\r\nGAME.element.addEventListener('mouseup', () => {\r\n\tGAME.mouseDown = false;\r\n});\r\n","import { State, GameState } from './state';\r\n\r\n// Get state\r\nconst GAME: GameState = State();\r\n\r\n/**\r\n * Alternative to `setInterval`, but using request animation frame\r\n * @param callback Callback that will be executed after delay\r\n * @param delay Delay before executing\r\n */\r\nexport function requestInterval(callback: () => void, delay: number = 0): (newDelay?: number) => void {\r\n\tlet start: number = Date.now();\r\n\tlet passed: number = 0;\r\n\tlet canceled: boolean = false;\r\n\r\n\tconst loop = () => {\r\n\t\tconst current = Date.now();\r\n\r\n\t\t// Stop interval if its canceled\r\n\t\tif (canceled) return;\r\n\r\n\t\t// If game paused\r\n\t\tif (GAME.paused) {\r\n\t\t\tstart = current;\r\n\t\t\twindow.requestAnimationFrame(loop);\r\n\t\t\treturn\r\n\t\t};\r\n\r\n\t\tpassed += current - start;\r\n\t\tstart = current;\r\n\t\t\r\n\t\tif (passed >= delay) {\r\n\t\t\tcallback();\r\n\t\t\tpassed = 0;\r\n\t\t}\r\n\t\t\r\n\t\twindow.requestAnimationFrame(loop);\r\n\t}\r\n\r\n\tloop();\r\n\r\n\treturn newDelay => {\r\n\t\tif (newDelay) {\r\n\t\t\tdelay = newDelay;\r\n\t\t} else {\r\n\t\t\tcanceled = true;\r\n\t\t}\r\n\t};\r\n}\r\n\r\n/**\r\n * Alternative to `setTimeout`, but using request animation frame\r\n * @param callback Callback that will be executed after delay\r\n * @param delay Delay before executing\r\n */\r\nexport function requestTimeout(callback: () => void, delay: number = 0): () => void {\r\n\tlet start: number = Date.now();\r\n\tlet passed: number = 0;\r\n\tlet canceled: boolean = false;\r\n\r\n\tconst loop = () => {\r\n\t\tconst current = Date.now();\r\n\r\n\t\t// Stop interval if its canceled\r\n\t\tif (canceled) return;\r\n\r\n\t\t// If game paused\r\n\t\tif (GAME.paused) {\r\n\t\t\tstart = current;\r\n\t\t\twindow.requestAnimationFrame(loop);\r\n\t\t\treturn\r\n\t\t};\r\n\r\n\t\tpassed += current - start;\r\n\t\tstart = current;\r\n\t\t\r\n\t\tif (passed >= delay) {\r\n\t\t\tcallback();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\twindow.requestAnimationFrame(loop);\r\n\t}\r\n\r\n\tloop();\r\n\r\n\treturn () => {\r\n\t\tcanceled = true;\r\n\t};\r\n}","import { requestTimeout } from './timers';\r\n\r\n/// @ts-ignore\r\nimport musicSound from '../sounds/music.mp3';\r\n/// @ts-ignore\r\nimport popSound from '../sounds/pop.mp3';\r\n/// @ts-ignore\r\nimport moveSound from '../sounds/move.mp3';\r\n/// @ts-ignore\r\nimport paperSound from '../sounds/paper.mp3';\r\n/// @ts-ignore\r\nimport clickSound from '../sounds/click.mp3';\r\n/// @ts-ignore\r\nimport click2Sound from '../sounds/click2.mp3';\r\n/// @ts-ignore\r\nimport speachSound from '../sounds/speach.mp3';\r\n/// @ts-ignore\r\nimport sirenSound from '../sounds/siren.mp3';\r\n/// @ts-ignore\r\nimport sadSound from '../sounds/sad.mp3';\r\n/// @ts-ignore\r\nimport caramelldensenSound from '../sounds/caramelldensen.mp3';\r\n\r\n// Music\r\nlet music = new Audio(musicSound);\r\n\r\n // Pop sound\r\nlet popIndex: number = 0;\r\nconst pops = [];\r\nfor (let i = 0; i < 5; i++) pops.push(new Audio(popSound)); \r\n\r\n/**\r\n * Pop sound\r\n */\r\nexport function playPopSound(): void {\r\n const sound = pops[popIndex];\r\n\r\n requestTimeout(() => {\r\n sound.volume = 0.1;\r\n sound.play();\r\n\r\n popIndex += 1;\r\n if (popIndex >= pops.length) popIndex = 0;\r\n }, 20);\r\n}\r\n\r\n/**\r\n * Click sound\r\n */\r\nexport function playClickSound(): void {\r\n const audio = new Audio(clickSound);\r\n audio.volume = 0.1;\r\n audio.play();\r\n}\r\n\r\n/**\r\n * Click sound\r\n */\r\nexport function playClick2Sound(): void {\r\n const audio = new Audio(click2Sound);\r\n audio.volume = 0.1;\r\n audio.play();\r\n}\r\n\r\n/**\r\n * Speach sound\r\n */\r\nexport function playSpeachSound(): void {\r\n const audio = new Audio(speachSound);\r\n audio.volume = 0.1;\r\n audio.play();\r\n}\r\n\r\n/**\r\n * Move sound\r\n */\r\nexport function playMoveSound(): void {\r\n const audio = new Audio(moveSound);\r\n audio.volume = 0.6;\r\n audio.play();\r\n}\r\n\r\n/**\r\n * Paper sound\r\n */\r\nexport function playPaperSound(): void {\r\n const audio = new Audio(paperSound);\r\n audio.volume = 0.5;\r\n audio.play();\r\n}\r\n\r\n/**\r\n * Paper sound\r\n */\r\nexport function playSirenSound(): void {\r\n const audio = new Audio(sirenSound);\r\n audio.volume = 0.3;\r\n audio.play();\r\n}\r\n\r\n/**\r\n * Sad sound\r\n */\r\nexport function playSadSound(): void {\r\n const audio = new Audio(sadSound);\r\n audio.volume = 0.4;\r\n audio.play();\r\n}\r\n\r\n/**\r\n * Paper sound\r\n */\r\nexport function startMusic(): void {\r\n music.volume = 0.5;\r\n music.loop = true;\r\n music.play();\r\n}\r\n\r\n/**\r\n * Paper sound\r\n */\r\nexport function stopMusic(): void {\r\n music.pause();\r\n music.currentTime = 0;\r\n}\r\n\r\n/**\r\n * Paper sound\r\n */\r\nexport function restartMusic(): void {\r\n music.pause();\r\n music.currentTime = 0;\r\n music.play();\r\n}\r\n\r\n/**\r\n * Caramelldansen mode\r\n */\r\nexport function playCaramelldansen(): void {\r\n stopMusic();\r\n const audio = new Audio(caramelldensenSound);\r\n audio.volume = 1;\r\n audio.loop = true;\r\n audio.play();\r\n}\r\n","import { State, GameState } from '../state';\r\nimport { requestTimeout } from '../timers';\r\nimport { convertRange, loadImage, lerp } from '../utils';\r\n\r\n// Sprites\r\n/// @ts-ignore\r\nimport fishImage from '../../sprites/fish-shadow.png';\r\n\r\n// Sounds\r\nimport { playPopSound } from '../audio';\r\n\r\n// Preload images\r\nconst fish = loadImage(fishImage);\r\n\r\n// Global game state\r\nconst GAME: GameState = State();\r\n\r\n// Element\r\nconst fishCounter = document.getElementById('fish');\r\n\r\nexport class Fish {\r\n\tpublic readonly type = 'fish';\r\n\tpublic readonly spriteHeight = 92;\r\n\tpublic readonly spriteWidth = 92;\r\n\r\n\tpublic collected: boolean;\r\n\r\n\tpublic exists: boolean;\r\n\tpublic frame: number;\r\n\r\n\tpublic y: number;\r\n\tpublic x: number;\r\n\r\n\tpublic width: number;\r\n\tpublic height: number;\r\n\r\n\tpublic spawnY: number;\r\n\r\n\tprivate spawnGravity = 0.5;\r\n\tprivate spawnSpeedX = Math.random() * 4 - 2;\r\n\tprivate spawnSpeedY = -20;\r\n\tprivate rot = 0;\r\n\r\n\t/**\r\n\t * Billboard initialization\r\n\t */\r\n\tconstructor(x: number, y: number) {\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\tthis.spawnY = y;\r\n\t\tthis.frame = 0;\r\n\t\tthis.exists = true;\r\n\t\tthis.collected = false;\r\n\t\tthis.width = this.spriteWidth / 4;\r\n\t\tthis.height = this.spriteHeight / 4;\r\n\r\n\t\tif (this.x < 128) this.x = 128;\r\n\t\tif (this.x > GAME.element.width - 128) this.x = GAME.element.width - 128;\r\n\t}\r\n\r\n\t/**\r\n\t * Draw sprite on canvas\r\n\t */\r\n\tpublic draw(): void {\r\n\t\tconst ctx = GAME.ctx;\r\n\r\n\t\tif (this.exists === false) return;\r\n\r\n\t\tlet size = convertRange(this.spawnY, { min: 0, max: GAME.element.height }, { min: 0, max: 2 });\r\n\t\tconst posY: number = convertRange(\r\n\t\t\tthis.y,\r\n\t\t\t{ min: 0, max: GAME.element.height },\r\n\t\t\t{ min: GAME.element.height / 5, max: GAME.element.height }\r\n\t\t);\r\n\r\n\t\tctx.save();\r\n\t\tctx.translate(this.x, posY);\r\n\t\tctx.scale(size, size);\r\n\t\tctx.rotate(this.rot);\r\n\t\tctx.drawImage(fish, -(this.width / 2), -(this.height / 2), this.width, this.height);\r\n\t\tctx.restore();\r\n\t}\r\n\r\n\t/**\r\n\t * Update billboard state\r\n\t */\r\n\tpublic update(): void {\r\n\t\tif (this.exists === false) return;\r\n\r\n\t\t// Next frame\r\n\t\tthis.frame += 1;\r\n\r\n\t\t// If not collected\r\n\t\tif (!this.collected) {\r\n\r\n\t\t\t// Rotate\r\n\t\t\tlet slowPeriod = 60;\r\n\t\t\tlet fastPeriod = convertRange(this.frame - 100, { min: 0, max: 100 }, { min: 20, max: 5 });\r\n\t\t\tlet rotPeriod = (this.frame > 100) ? fastPeriod : slowPeriod;\r\n\t\t\tthis.rot = lerpAnim(this.rot, -1, 1, this.frame, rotPeriod, 0.05);\r\n\r\n\t\t\t// Spawn animation\r\n\t\t\tif (this.frame < 60)\r\n\t\t\t{\r\n\t\t\t\tthis.y += this.spawnSpeedY;\r\n\t\t\t\tthis.x += this.spawnSpeedX;\r\n\t\t\t\tthis.spawnSpeedY+= this.spawnGravity;\r\n\r\n\t\t\t\tthis.width = lerp(this.width, this.spriteWidth, 0.05);\r\n\t\t\t\tthis.height = lerp(this.height, this.spriteHeight, 0.05);\r\n\t\t\t}\r\n\r\n\t\t\t// Despawn\r\n\t\t\tif (this.frame > 150) {\r\n\t\t\t\tthis.width = lerp(this.width, 0, 0.2);\r\n\t\t\t\tthis.height = lerp(this.height, 0, 0.2);\r\n\t\t\t\tif (this.width < 16) this.exists = false;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Check mouse collision\r\n\t\t\tif (GAME.mouseX <= this.x + 48 && GAME.mouseX >= this.x - 48) {\r\n\t\t\t\tthis.collected = true;\r\n\t\t\t\tplayPopSound();\r\n\t\t\t} else {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Size animation\r\n\t\tif (this.y < 64) {\r\n\t\t\tthis.width = lerp(this.width, 0, 0.1);\r\n\t\t\tthis.height = lerp(this.height, 0, 0.1);\r\n\t\t}\r\n\r\n\t\t// Change position\r\n\t\tconst posX = GAME.element.width / 2;\r\n\t\tconst posY = 0 - GAME.element.height / 5;\r\n\t\tthis.x = lerp(this.x, posX, 0.1);\r\n\t\tthis.y = lerp(this.y, posY, 0.1);\r\n\r\n\t\t// Counter animation\r\n\t\tif (this.width < 8) {\r\n\t\t\tthis.exists = false;\r\n\t\t\tGAME.fish += 1;\r\n\r\n\t\t\t// Counter animation\r\n\t\t\tfishCounter.className = 'added';\r\n\t\t\trequestTimeout(() => {\r\n\t\t\t\tfishCounter.className = '';\r\n\t\t\t}, 10);\r\n\t\t}\r\n\r\n\t}\r\n}\r\n\r\nfunction lerpAnim (value: number, from: number, to: number, frame: number, period: number, t: number = 0.1): number\r\n{\r\n\tlet v0 = value;\r\n\tlet isSecondHalf = (frame % period) < (period / 2);\r\n\tlet v1 = isSecondHalf ? from : to;\r\n\r\n\treturn lerp(v0, v1, t);\r\n}","import { Fish } from './fish'; \r\n\r\nimport { State, GameState } from '../state';\r\nimport { convertRange, lerp, loadImage, randomInteger } from '../utils';\r\n\r\n// Sprites\r\n/// @ts-ignore\r\nimport penguinLeftImage from '../../sprites/penguin-left.png';\r\n/// @ts-ignore\r\nimport penguinRightImage from '../../sprites/penguin-right.png';\r\n/// @ts-ignore\r\nimport angryPenguinLeftImage from '../../sprites/penguin-left-angry.png';\r\n/// @ts-ignore\r\nimport anrgyPenguinRightImage from '../../sprites/penguin-right-angry.png';\r\n/// @ts-ignore\r\nimport boredPenguinLeftImage from '../../sprites/penguin-left-bored.png';\r\n/// @ts-ignore\r\nimport boredPenguinRightImage from '../../sprites/penguin-right-bored.png';\r\n/// @ts-ignore\r\nimport junkieLeftImage from '../../sprites/junkie-left.png';\r\n/// @ts-ignore\r\nimport junkieRightImage from '../../sprites/junkie-right.png';\r\n\r\n// Preload images\r\nconst penguinLeft = loadImage(penguinLeftImage);\r\nconst penguinRight = loadImage(penguinRightImage);\r\nconst angryPenguinLeft = loadImage(angryPenguinLeftImage);\r\nconst angryPenguinRight = loadImage(anrgyPenguinRightImage);\r\nconst boredPenguinLeft = loadImage(boredPenguinLeftImage);\r\nconst boredPenguinRight = loadImage(boredPenguinRightImage);\r\nconst junkieLeft = loadImage(junkieLeftImage);\r\nconst junkieRight = loadImage(junkieRightImage);\r\n\r\n// Global game state\r\nconst GAME: GameState = State();\r\n\r\nexport class Penguin {\r\n\tpublic readonly type = 'penguin';\r\n\tpublic readonly spriteHeight = 92;\r\n\tpublic readonly spriteWidth = 92;\r\n\t\r\n\tpublic state: 'spawning' | 'walking' | 'leaving';\r\n\tpublic direction: 'left' | 'right';\r\n\tpublic exists: boolean;\r\n\r\n\tpublic mood: 'normal' | 'bored' | 'angry';\r\n\t\r\n\tpublic emotionFrame: number;\r\n\tpublic spawnFrame: number;\r\n\tpublic frame: number;\r\n\tpublic x: number;\r\n\tpublic y: number;\r\n\r\n\tpublic width: number;\r\n\tpublic height: number;\r\n\r\n\tconstructor(x: number, y: number) {\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\t\r\n\t\tthis.mood = 'normal';\r\n\t\t\r\n\t\tthis.state = 'spawning';\r\n\t\tthis.frame = randomInteger(0, 20);\r\n\t\tthis.direction = randomInteger(0, 1) ? 'left' : 'right';\r\n\t\t\r\n\t\tthis.width = this.spriteWidth / 2;\r\n\t\tthis.height = 0;\r\n\t\tthis.exists = true;\r\n\t\t\r\n\t\tthis.emotionFrame = 0;\r\n\t\tthis.spawnFrame = randomInteger(0, 200);\r\n\t}\r\n\r\n\t/**\r\n\t * Set penguin mood\r\n\t * @param mood Mood of the penguin\r\n\t */\r\n\tpublic setMood(mood: 'angry' | 'bored'): void {\r\n\t\tthis.mood = mood;\r\n\t\tthis.emotionFrame = mood === 'angry' ? randomInteger(200, 400) : randomInteger(150, 300);\r\n\t}\r\n\r\n\t/**\r\n\t * Remove penguin from stage\r\n\t */\r\n\tpublic despawn(): void {\r\n\t\tthis.state = 'leaving';\r\n\t}\r\n\r\n\t/**\r\n\t * Draw penguin\r\n\t */\r\n\tpublic draw(): void {\r\n\t\tconst ctx = GAME.ctx;\r\n\r\n\t\t// Remove if its unmounted\r\n\t\tif (!this.exists) return;\r\n\r\n\t\tlet sprite = this.direction === 'left' ? penguinLeft : penguinRight;\r\n\t\tconst size = convertRange(this.y, { min: 0, max: GAME.element.height }, { min: 0, max: 2 });\r\n\t\tconst posY = convertRange(this.y, { min: 0, max: GAME.element.height }, { min: GAME.element.height / 5, max: GAME.element.height });\r\n\r\n\t\t// Bored sprite\r\n\t\tif (this.mood === 'bored') {\r\n\t\t\tsprite = this.direction === 'left' ? boredPenguinLeft : boredPenguinRight;\r\n\t\t}\r\n\t\t\r\n\t\t// Angry sprite\r\n\t\tif (this.mood === 'angry') {\r\n\t\t\tsprite = this.direction === 'left' ? angryPenguinLeft : angryPenguinRight;\r\n\t\t}\r\n\t\t\r\n\t\t// Skip drawing if its reversed\r\n\t\tif (size < 0) return;\r\n\r\n\t\t// Junkie mode\r\n\t\tif ((window as any).junkie === true) sprite = this.direction === 'left' ? junkieLeft : junkieRight;\r\n\r\n\t\tctx.save();\r\n\t\tctx.translate(this.x, posY);\r\n\t\tctx.scale(size, size);\r\n\t\tctx.drawImage(sprite, -(this.width / 2), -this.height + 18, this.width, this.height);\r\n\t\tctx.restore();\t\t\r\n\t}\r\n\r\n\t/**\r\n\t * Update penguin state\r\n\t */\r\n\tpublic update(): void {\r\n\t\tconst width: number = GAME.element.width;\r\n\t\tconst height: number = GAME.element.height;\r\n\r\n\t\t// Remove if its unmounted\r\n\t\tif (!this.exists) return;\r\n\r\n\t\t// Spawn fish\r\n\t\tif (this.spawnFrame === 100 && this.state === 'walking' && this.mood === 'normal') {\r\n\t\t\tconst fish = new Fish(this.x, this.y - 1);\r\n\t\t\tGAME.entities.push(fish);\r\n\t\t}\r\n\r\n\t\t// Update emotion frame\r\n\t\tif (this.mood !== 'normal') {\r\n\t\t\tthis.emotionFrame -= 1;\r\n\t\t\tif (this.emotionFrame <= 0) {\r\n\t\t\t\tthis.emotionFrame = 0;\r\n\t\t\t\tthis.mood = 'normal';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Update frame\r\n\t\tthis.frame += 1;\r\n\t\tif (this.frame > 20) this.frame = 0;\r\n\r\n\t\t// Update spawn frame\r\n\t\tthis.spawnFrame += 1;\r\n\t\tif ((window as any).rave === true) this.spawnFrame = 100;\r\n\t\tif (this.spawnFrame > 100) {\r\n\t\t\tthis.spawnFrame = 0;\r\n\t\t}\r\n\r\n\t\t// If walking\r\n\t\tif (this.state === 'walking') {\r\n\t\t\tthis.height = this.frame >= 10 ? lerp(this.height, this.spriteHeight - 24, 0.3) : lerp(this.height, this.spriteHeight + 4, 0.3);\r\n\t\t\tthis.width = this.frame >= 10 ? lerp(this.width, this.spriteWidth + 16, 0.2) : lerp(this.width, this.spriteWidth - 4, 0.2);\r\n\r\n\t\t\tif (this.direction === 'left') {\r\n\t\t\t\tthis.x -= convertRange(this.y, { min: 0, max: height }, { min: 0, max: 2 });\r\n\t\t\t\tif (this.x <= -this.width) this.x = width + this.width;\r\n\t\t\t} else {\r\n\t\t\t\tthis.x += convertRange(this.y, { min: 0, max: height }, { min: 0, max: 2 });\r\n\t\t\t\tif (this.x >= width + this.width) this.x = -this.width;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Spawning penguin\r\n\t\tif (this.state === 'spawning') {\r\n\t\t\tthis.width = lerp(this.width, this.spriteWidth, 0.1);\r\n\t\t\tthis.height = lerp(this.height, this.spriteHeight, 0.1) + 0.1;\r\n\t\t\tif (this.height >= this.spriteHeight) {\r\n\t\t\t\tthis.state = 'walking';\r\n\t\t\t\tthis.width = this.spriteWidth;\r\n\t\t\t\tthis.height = this.spriteHeight;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Removing penguin\r\n\t\tif (this.state === 'leaving') {\r\n\t\t\tthis.width = lerp(this.width, 0, 0.05);\r\n\t\t\tthis.height = lerp(this.height, 0, 0.1) - 0.05;\r\n\t\t\tif (this.height <= 10) this.exists = false;\r\n\t\t}\r\n\t}\r\n}\r\n","import { State, GameState } from '../state';\r\nimport { convertRange, loadImage, lerp } from '../utils';\r\n\r\n/// @ts-ignore\r\nimport stoneImage from '../../sprites/stone.png';\r\n/// @ts-ignore\r\nimport penguinAnthenaImage from '../../sprites/penguin-anthena.png';\r\n/// @ts-ignore\r\nimport penguinLoudspeakerImage from '../../sprites/penguin-loudspeaker.png';\r\n/// @ts-ignore\r\nimport penguinLoudspeakerSpeakImage from '../../sprites/penguin-loudspeaker-speak.png';\r\n/// @ts-ignore\r\nimport junkieLeftImage from '../../sprites/junkie-left.png';\r\n/// @ts-ignore\r\nimport junkieRightImage from '../../sprites/junkie-right.png';\r\n\r\n// Sounds\r\nimport { playSpeachSound } from '../audio';\r\n\r\n// Preload images\r\nconst stone = loadImage(stoneImage);\r\nlet anthenaPenguin = loadImage(penguinAnthenaImage);\r\nconst penguinLoudspeaker = loadImage(penguinLoudspeakerImage);\r\nconst penguinLoudspeakerSpeak = loadImage(penguinLoudspeakerSpeakImage);\r\nconst junkieLeft = loadImage(junkieLeftImage);\r\nconst junkieRight = loadImage(junkieRightImage);\r\n\r\n// Global game state\r\nconst GAME: GameState = State();\r\n\r\nexport class Characters {\r\n\tpublic readonly type = 'characters';\r\n\r\n\tpublic readonly stoneSpriteHeight = 400;\r\n\tpublic readonly stoneSpriteWidth = 400;\r\n\r\n\tpublic readonly penguinLoudspeakerSpriteHeight = 98;\r\n\tpublic readonly penguinLoudspeakerSpriteWidth = 98;\r\n\tpublic readonly penguinLoudspeakerOffsetX = 48;\r\n\tpublic readonly penguinLoudspeakerOffsetY = -50;\r\n\r\n\tpublic readonly penguinAnthenaSpriteHeight = 98;\r\n\tpublic readonly penguinAnthenaSpriteWidth = 98;\r\n\tpublic readonly penguinAnthenaOffsetX = 85;\r\n\tpublic readonly penguinAnthenaOffsetY = -232;\r\n\r\n\tpublic state: 'idle' | 'speaking';\r\n\tpublic frame: number;\r\n\tpublic speakFrame: number;\r\n\tpublic anthenaFrame: number;\r\n\r\n\tpublic exists: boolean;\r\n\tpublic x: number;\r\n\tpublic y: number;\r\n\tpublic width: number;\r\n\tpublic height: number;\r\n\r\n\tpublic anthenaWidth: number;\r\n\tpublic anthenaHeight: number;\r\n\r\n\t/**\r\n\t * Characters initialization\r\n\t */\r\n\tconstructor() {\r\n\t\tthis.x = GAME.element.width / 2;\r\n\t\tthis.y = GAME.element.height / 1.75;\r\n\t\tthis.width = this.penguinLoudspeakerSpriteWidth;\r\n\t\tthis.height = this.penguinLoudspeakerSpriteHeight;\r\n\t\tthis.exists = true;\r\n\t\tthis.frame = 0;\r\n\t\tthis.speakFrame = 0;\r\n\t\tthis.state = 'idle';\r\n\t\tthis.anthenaFrame = 0;\r\n\t\tthis.anthenaWidth = this.penguinAnthenaSpriteWidth;\r\n\t\tthis.anthenaHeight = this.penguinAnthenaSpriteHeight;\r\n\t}\r\n\r\n\t/**\r\n\t * Start speaking\r\n\t */\r\n\tpublic speak(): void {\r\n\t\tthis.state = 'speaking';\r\n\t\tthis.speakFrame = 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Draw sprite on canvas\r\n\t */\r\n\tpublic draw(): void {\r\n\t\tconst ctx = GAME.ctx;\r\n\r\n\t\tconst size = convertRange(this.y, { min: 0, max: GAME.element.height }, { min: 0, max: 2 });\r\n\t\tconst posY = convertRange(this.y, { min: 0, max: GAME.element.height }, { min: GAME.element.height / 5, max: GAME.element.height });\r\n\t\tlet loudspeakerSprite = this.state === 'speaking' ? penguinLoudspeakerSpeak : penguinLoudspeaker;\r\n\t\t\r\n\t\t// Junkie mode\r\n\t\tif ((window as any).junkie === true) {\r\n\t\t\tloudspeakerSprite = junkieLeft;\r\n\t\t\tanthenaPenguin = junkieRight;\r\n\t\t}\r\n\r\n\t\tctx.save();\r\n\t\tctx.translate(this.x, posY);\r\n\t\tctx.scale(size, size);\r\n\t\tctx.drawImage(stone, -(this.stoneSpriteWidth / 2), -this.stoneSpriteHeight + 48, this.stoneSpriteWidth, this.stoneSpriteHeight);\r\n\r\n\t\tctx.drawImage(\r\n\t\t\tanthenaPenguin,\r\n\t\t\t-(this.anthenaWidth / 2) + this.penguinAnthenaOffsetX,\r\n\t\t\t-(this.anthenaHeight + 16) + this.penguinAnthenaOffsetY,\r\n\t\t\tthis.anthenaWidth,\r\n\t\t\tthis.anthenaHeight\r\n\t\t);\r\n\r\n\t\tctx.drawImage(\r\n\t\t\tloudspeakerSprite,\r\n\t\t\t-(this.width / 2) + this.penguinLoudspeakerOffsetX,\r\n\t\t\t-(this.height + 16) + this.penguinLoudspeakerOffsetY,\r\n\t\t\tthis.width,\r\n\t\t\tthis.height\r\n\t\t);\r\n\r\n\t\tctx.restore();\r\n\t}\r\n\r\n\t/**\r\n\t * Update player state\r\n\t */\r\n\tpublic update(): void {\r\n\t\tthis.x = Math.floor(GAME.element.width / 2);\r\n\t\tthis.y = Math.floor(GAME.element.height / 1.75);\r\n\r\n\t\t// Frame update\r\n\t\tthis.frame += 1;\r\n\t\tif (this.frame > 100) {\r\n\t\t\tthis.frame = 0;\r\n\t\t}\r\n\r\n\t\t// Athena character frame update\r\n\t\tthis.anthenaFrame += 1;\r\n\t\tif (this.anthenaFrame > 60) {\r\n\t\t\tthis.anthenaFrame = 0;\r\n\t\t}\r\n\r\n\t\t// Anthena character\r\n\t\tif (this.anthenaFrame > 30) {\r\n\t\t\tthis.anthenaHeight = lerp(this.anthenaHeight, this.penguinAnthenaSpriteHeight - 16, 0.1);\r\n\t\t\tthis.anthenaWidth = lerp(this.anthenaWidth, this.penguinAnthenaSpriteWidth + 16, 0.1);\r\n\t\t} else {\r\n\t\t\tthis.anthenaHeight = lerp(this.anthenaHeight, this.penguinAnthenaSpriteHeight, 0.1);\r\n\t\t\tthis.anthenaWidth = lerp(this.anthenaWidth, this.penguinAnthenaSpriteWidth, 0.1);\r\n\t\t}\r\n\r\n\t\t// Idle state\r\n\t\tif (this.state === 'idle') {\r\n\t\t\tif (this.frame > 50) {\r\n\t\t\t\tthis.height = lerp(this.height, this.penguinLoudspeakerSpriteHeight, 0.05);\r\n\t\t\t\tthis.width = lerp(this.width, this.penguinLoudspeakerSpriteWidth, 0.05);\r\n\t\t\t} else {\r\n\t\t\t\tthis.height = lerp(this.height, this.penguinLoudspeakerSpriteHeight - 16, 0.05);\r\n\t\t\t\tthis.width = lerp(this.width, this.penguinLoudspeakerSpriteWidth + 8, 0.05);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Speaking animation\r\n\t\tif (this.state === 'speaking') {\r\n\t\t\tthis.frame += 8;\r\n\t\t\tthis.speakFrame += 1;\r\n\t\t\tthis.anthenaFrame += 1;\r\n\r\n\t\t\tif (this.speakFrame === 1) playSpeachSound();\r\n\r\n\t\t\tif (this.frame > 50) {\r\n\t\t\t\tthis.height = lerp(this.height, this.penguinLoudspeakerSpriteHeight + 16, 0.1);\r\n\t\t\t\tthis.width = lerp(this.width, this.penguinLoudspeakerSpriteWidth - 8, 0.1);\r\n\t\t\t} else {\r\n\t\t\t\tthis.height = lerp(this.height, this.penguinLoudspeakerSpriteHeight - 32, 0.1);\r\n\t\t\t\tthis.width = lerp(this.width, this.penguinLoudspeakerSpriteWidth + 16, 0.1);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Stop speaking after some frames\r\n\t\tif (this.speakFrame > 100) {\r\n\t\t\tthis.speakFrame = 0;\r\n\t\t\tthis.state = 'idle';\r\n\t\t}\r\n\t}\r\n}\r\n","import { State, GameState } from './state';\r\n\r\n// Address\r\nconst SERVER_ADDRESS = 'http://45.32.186.38';\r\n\r\n// Get state\r\nconst GAME: GameState = State();\r\n\r\n// Elements\r\nconst endMenu = document.getElementById('end-menu');\r\nconst leaderboardTable = document.getElementById('leaderboard-table');\r\nconst leaderboardScoreUploading = document.getElementById('score-uploading');\r\nconst restartButton = document.getElementById('restart-button') as HTMLButtonElement;\r\nconst leaderboardUsername = document.getElementById('leaderboard-username') as HTMLInputElement;\r\nconst leaderboardSubmitButton = document.getElementById('leaderboard-submit-button') as HTMLButtonElement;\r\n\r\ninterface LeaderboardResponse {\r\n leaderboard: LeaderboardRecord[],\r\n minimalScore: number,\r\n canApply: boolean,\r\n}\r\n\r\n// Leaderboard record structure\r\ninterface LeaderboardRecord {\r\n\tusername: string;\r\n\tscore: number;\r\n}\r\n\r\n/**\r\n * Check server availability\r\n */\r\nasync function pingServer(): Promise<void> {\r\n\ttry {\r\n\t\tconst response = await fetch(`${SERVER_ADDRESS}/ping`);\r\n const data = await response.text();\r\n if (data === 'pong') GAME.serverAvailable = true;\r\n\t} catch (error) {\r\n\t\tconsole.error(error);\r\n\t}\r\n}\r\n\r\n/**\r\n * Render leaderboard\r\n * @param leaderboard List of records\r\n */\r\nexport function renderLeaderboard(leaderboard: LeaderboardRecord[]): void {\r\n leaderboardTable.innerHTML = '';\r\n\r\n for (let i = 0; i < leaderboard.length; i++) {\r\n const record = leaderboard[i] ? leaderboard[i] : { username: '-', score: 0 };\r\n\r\n const row = document.createElement('div');\r\n row.className = 'row';\r\n\r\n const rank = document.createElement('div');\r\n rank.innerText = (i + 1) + '.';\r\n\r\n const name = document.createElement('div');\r\n name.innerText = record.username;\r\n\r\n const score = document.createElement('div');\r\n score.innerText = record.score + '';\r\n\r\n row.appendChild(rank);\r\n row.appendChild(name);\r\n row.appendChild(score);\r\n leaderboardTable.appendChild(row);\r\n }\r\n}\r\n\r\n/**\r\n * Show leaderboard\r\n */\r\nexport async function showLeaderboard(): Promise<void> {\r\n\tif (GAME.serverAvailable) {\r\n\t\ttry {\r\n const score = GAME.fish;\r\n const response = await fetch(`${SERVER_ADDRESS}/leaderboard?score=${score}`);\r\n const data = (await response.json()) as LeaderboardResponse;\r\n\r\n const leaderboard = data.leaderboard;\r\n const canApply = data.canApply;\r\n\r\n // Prepare array\r\n leaderboard.sort((a, b) => a.score - b.score).reverse();\r\n\r\n // Show upload if score more than\r\n if (canApply) {\r\n leaderboardScoreUploading.classList.add('visible');\r\n } else {\r\n leaderboardScoreUploading.classList.remove('visible');\r\n }\r\n \r\n renderLeaderboard(leaderboard);\r\n\r\n endMenu.classList.add('show-leaderboard');\r\n\t\t} catch (error) {\r\n // Nothing\r\n console.error(error);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// On leaderboard change\r\nleaderboardUsername.addEventListener('input', () => {\r\n\tconst value = leaderboardUsername.value;\r\n\tleaderboardSubmitButton.disabled = value.length <= 1 || value.length > 12;\r\n});\r\n\r\n// Leaderboard submit\r\nleaderboardSubmitButton.addEventListener('click', async () => {\r\n\tconst score = GAME.fish;\r\n\tconst username = leaderboardUsername.value;\r\n \r\n leaderboardSubmitButton.disabled = true;\r\n leaderboardScoreUploading.classList.remove('visible');\r\n\r\n try {\r\n const body = JSON.stringify({ username, score });\r\n const response = await fetch(`${SERVER_ADDRESS}/leaderboard`, {\r\n method: 'POST',\r\n body: body,\r\n headers: {\r\n Accept: 'application/json',\r\n 'Content-Type': 'application/json',\r\n },\r\n });\r\n const data = await response.json();\r\n\r\n const leaderboard = data.leaderboard;\r\n renderLeaderboard(leaderboard);\r\n\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n});\r\n\r\n// Check server\r\npingServer();","import { State, GameState } from './state';\r\nimport { Penguin } from './entities/penguin';\r\nimport { Characters } from './entities/characters';\r\nimport { requestInterval } from './timers';\r\nimport { randomInteger, insertionSort, randomFromArray, shuffle } from './utils';\r\nimport { playClickSound, playMoveSound, playPaperSound, playSadSound, playSirenSound } from './audio';\r\nimport { hidePostModals, showPostModal } from './gui';\r\nimport { showLeaderboard } from './leaderboard';\r\n\r\n// Get state\r\nconst GAME: GameState = State();\r\n\r\n// Elements\r\nconst news = document.getElementById('news');\r\nconst endMenu = document.getElementById('end-menu');\r\nconst endOverlay = document.getElementById('end-overlay');\r\nconst gatheredFish = document.getElementById('gathered-fish');\r\nconst postButton = document.getElementById('post-button') as HTMLButtonElement;\r\nconst leaderboardSubmitButton = document.getElementById('leaderboard-submit-button') as HTMLButtonElement;\r\n\r\n// Check if user played this game\r\nconst played: boolean = localStorage.getItem('played') === 'true' ? true : false;\r\nlocalStorage.setItem('played', 'true');\r\n\r\n////////////////////////////////////////////////////////////////////////////////////\r\n\r\n// Increase tempo\r\nrequestInterval(() => {\r\n\tGAME.tempo += 0.2;\r\n}, 1000);\r\n\r\n// Relevance update\r\nrequestInterval(() => {\r\n\tGAME.relevance -= 0.001 * GAME.tempo;\r\n\tif (GAME.relevance < 0) GAME.relevance = 0;\r\n}, 100);\r\n\r\n// Despawn penguins\r\nrequestInterval(() => {\r\n\tif (GAME.relevance < 0.5) {\r\n\t\tconst penguinsAmount = GAME.penguins.length - 1;\r\n\r\n\t\t// Callculate how much penguins we should despawn\r\n\t\tlet toDespawn = Math.ceil(GAME.maximumPenguins * 0.1);\r\n\t\tif (GAME.relevance < 0.2) toDespawn = Math.ceil(GAME.maximumPenguins * 0.2);\r\n\t\tif (toDespawn > penguinsAmount) toDespawn = penguinsAmount;\r\n\r\n\t\tfor (let i = 0; i < toDespawn; i++) {\r\n\t\t\tconst index = randomFromArray(GAME.penguins);\r\n\t\t\tconst penguin = GAME.penguins[index];\r\n\r\n\t\t\t// Skip invalid penguin\r\n\t\t\tif (penguin.type === 'characters' || penguin.state !== 'walking') {\r\n\t\t\t\ti -= 1;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tpenguin.despawn();\r\n\t\t}\r\n\t}\r\n}, 1000);\r\n\r\n// Game Over Check\r\nrequestInterval(() => {\r\n\tconst penguinAmounts: number = GAME.penguins.length - 1;\r\n\t\r\n\tif (penguinAmounts <= 0) {\r\n\t\thidePostModals();\r\n\t\tgatheredFish.innerText = `Gathered Fish: ${GAME.fish}`;\r\n\t\tendMenu.classList.add('visible');\r\n\t\tendOverlay.classList.add('visible');\r\n\t\tshowLeaderboard();\r\n\r\n\t\tleaderboardSubmitButton.disabled = false;\r\n\t\tGAME.paused = true;\r\n\t}\r\n}, 1000);\r\n\r\n////////////////////////////////////////////////////////////////////////////////////\r\n\r\n// Request news block\r\nconst newsInterval = requestInterval(\r\n\t() => {\r\n\t\tconst index = GAME.newsIndex;\r\n\t\tconst current = GAME.news[index];\r\n\r\n\t\t// Move sound\r\n\t\tplayMoveSound();\r\n\r\n\t\tconst blockOld = news.querySelector('.old');\r\n\t\tif (blockOld) blockOld.remove();\r\n\r\n\t\tconst blockOne = news.querySelector('.block.one');\r\n\t\tif (blockOne) {\r\n\t\t\tblockOne.classList.remove('one');\r\n\t\t\tblockOne.classList.add('old');\r\n\t\t}\r\n\r\n\t\tconst blockTwo = news.querySelector('.block.two');\r\n\t\tif (blockTwo) {\r\n\t\t\tblockTwo.classList.add('one');\r\n\t\t\tblockTwo.classList.remove('two');\r\n\t\t}\r\n\r\n\t\tconst blockThree = news.querySelector('.block.three');\r\n\t\tif (blockThree) {\r\n\t\t\tblockThree.classList.add('two');\r\n\t\t\tblockThree.classList.remove('three');\r\n\t\t}\r\n\r\n\t\t// Create next post\r\n\t\tconst blockNew = document.createElement('div');\r\n\t\tblockNew.className = 'block new';\r\n\t\tblockNew.setAttribute('news-index', `${index}`);\r\n\r\n\t\tconst title = document.createElement('h3');\r\n\t\ttitle.innerText = current.title;\r\n\r\n\t\tconst content = document.createElement('p');\r\n\t\tcontent.innerText = current.content;\r\n\r\n\t\t// Build element\r\n\t\tblockNew.appendChild(title);\r\n\t\tblockNew.appendChild(content);\r\n\t\tnews.appendChild(blockNew);\r\n\r\n\t\t// Make new block\r\n\t\twindow.requestAnimationFrame(() => {\r\n\t\t\tblockNew.className = 'block three';\r\n\t\t\tblockNew.onclick = () => {\r\n\t\t\t\tGAME.selectedNewsIndex = index;\r\n\t\t\t\tshowPostModal();\r\n\t\t\t\tplayClickSound();\r\n\t\t\t};\r\n\t\t});\r\n\r\n\t\tGAME.newsIndex += 1;\r\n\t\tif (GAME.newsIndex >= GAME.news.length) GAME.newsIndex = 0;\r\n\r\n\t\t// Update interval\r\n\t\tconst nextDelay = Math.floor(5000 - 100 * GAME.tempo);\r\n\t\tnewsInterval(nextDelay > 500 ? nextDelay : 500);\r\n\t},\r\n\tplayed ? 2500 : 7500\r\n);\r\n\r\n////////////////////////////////////////////////////////////////////////////////////\r\n\r\n// Post creating\r\npostButton.addEventListener('click', () => {\r\n\tconst index = GAME.selectedNewsIndex;\r\n\tconst current = GAME.news[index];\r\n\tconst penguinsAmount = GAME.penguins.length - 1;\r\n\r\n\t// Unpress last active button\r\n\tlet selectedTheme = document.querySelector('button.active');\r\n\tif (selectedTheme === null) return;\r\n\r\n\t// Mark news as posted\r\n\tconst selectedNewsBlock = news.querySelector(`[news-index=\"${index}\"]`);\r\n\tif (selectedNewsBlock) selectedNewsBlock.classList.add('posted');\r\n\r\n\t// Penguin Animation\r\n\tconst characters = GAME.penguins.find(entity => entity.type === 'characters') as Characters;\r\n\tcharacters.speak();\r\n\r\n\t// Click sound\r\n\tplayClickSound();\r\n\tplayPaperSound();\r\n\r\n\t// Close modal\r\n\thidePostModals();\r\n\r\n\t// If fake post\r\n\tif (current.fake) {\r\n\t\tplaySirenSound();\r\n\r\n\t\tGAME.penguins.forEach(penguin => {\r\n\t\t\tif (penguin.type !== 'penguin') return;\r\n\t\t\tif (penguin.state !== 'walking') return;\r\n\t\t\tpenguin.setMood('angry');\r\n\t\t});\r\n\r\n\t\tGAME.relevance -= 0.75;\r\n\t\tif (GAME.relevance < 0) GAME.relevance = 0;\r\n\t\treturn;\r\n\t}\r\n\r\n\t// If wrong theme\r\n\tif (current.theme !== selectedTheme.id) {\r\n\t\tplaySadSound();\r\n\r\n\t\tGAME.penguins.forEach(penguin => {\r\n\t\t\tif (penguin.type !== 'penguin') return;\r\n\t\t\tif (penguin.state !== 'walking') return;\r\n\t\t\tpenguin.setMood('bored');\r\n\t\t});\r\n\r\n\t\tGAME.relevance -= 0.25;\r\n\t\tif (GAME.relevance < 0) GAME.relevance = 0;\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Calculate amount of penguins to spawn\r\n\tlet toSpawn = Math.ceil(penguinsAmount * 0.3);\r\n\tif (GAME.relevance > 1.5) toSpawn += 1;\r\n\tif (penguinsAmount < 25) toSpawn += 1;\r\n\r\n\t// Skip spawning if too much penguins\r\n\tif (penguinsAmount > 1000) return;\r\n\r\n\t// Spawn penguins\r\n\tspawnPenguins(toSpawn);\r\n\r\n\t// Update maximum penguins value\r\n\tconst newPenguinsAmount = GAME.penguins.length - 1;\r\n\tGAME.maximumPenguins = newPenguinsAmount;\r\n\tif (newPenguinsAmount < GAME.maximumPenguins) GAME.maximumPenguins = newPenguinsAmount;\r\n\r\n\t// Affect relevance\r\n\tGAME.relevance += 0.5;\r\n\tif (GAME.relevance > 2) GAME.relevance = 2;\r\n\tif (GAME.relevance <= 0.75) GAME.relevance = 1;\r\n});\r\n\r\n////////////////////////////////////////////////////////////////////////////////////\r\n\r\n/**\r\n * Restart game state\r\n */\r\nexport function gameRestart(): void {\r\n\t// Reset games state\r\n\tGAME.paused = true;\r\n\r\n\tGAME.mouseX = 0;\r\n\tGAME.mouseY = 0;\r\n\tGAME.mouseDown = false;\r\n\r\n\tGAME.entities = [];\r\n\tGAME.penguins = [new Characters()];\r\n\r\n\tGAME.fish = 0;\r\n\tGAME.tempo = 1.1;\r\n\tGAME.relevance = 1.25;\r\n\tGAME.maximumPenguins = 10;\r\n\r\n\t// Spawn new penguins\r\n\tspawnPenguins(10);\r\n}\r\n\r\n/**\r\n * Spawn penguins\r\n * @param amount Amount of penguins to spawn\r\n */\r\nexport function spawnPenguins(amount: number = 1) {\r\n\tfor (let i = 0; i < amount; i++) {\r\n\t\tconst x: number = randomInteger(0, GAME.element.width);\r\n\t\tconst y: number = randomInteger(GAME.element.height / 3, GAME.element.height - 64);\r\n\t\tconst penguin: Penguin = new Penguin(x, y);\r\n\t\tGAME.penguins.push(penguin);\r\n\t}\r\n\r\n\tinsertionSort(GAME.penguins, 'y');\r\n}\r\n","import { gameRestart } from './logic';\r\nimport { State, GameState } from './state';\r\nimport { requestInterval } from './timers';\r\nimport { numberWithCommas } from './utils';\r\nimport { playClickSound, playClick2Sound, playPaperSound, startMusic, restartMusic } from './audio';\r\n\r\n// Get state\r\nconst GAME: GameState = State();\r\n\r\n// Elements\r\nconst counter = document.getElementById('counter');\r\nconst tutorial = document.getElementById('tutorial');\r\nconst selectedNews = document.getElementById('selected');\r\nconst blackScreen = document.getElementById('black-screen');\r\nconst relevanceBar = document.getElementById('relevance-bar');\r\nconst startMenu = document.getElementById('start-menu');\r\nconst endMenu = document.getElementById('end-menu');\r\nconst endOverlay = document.getElementById('end-overlay');\r\nconst helpText = document.getElementById('help-text');\r\n\r\nconst startButton = document.getElementById('start-button') as HTMLButtonElement;\r\nconst nextButton = document.getElementById('next-button') as HTMLButtonElement;\r\nconst restartButton = document.getElementById('restart-button') as HTMLButtonElement;\r\nconst comics = document.getElementById('comics');\r\n\r\n// Post modal\r\nconst postModal = document.getElementById('post-modal');\r\nconst postOverlay = document.getElementById('post-overlay');\r\nconst postButton = document.getElementById('post-button') as HTMLButtonElement;\r\n\r\n// Buttons\r\nconst gamingButton = document.getElementById('gaming');\r\nconst educationButton = document.getElementById('education');\r\nconst politicsButton = document.getElementById('politics');\r\nconst filmsButton = document.getElementById('films');\r\nconst musicButton = document.getElementById('music');\r\nconst sportButton = document.getElementById('sport');\r\n\r\n// Setup \r\nblackScreen.classList.remove('visible');\r\n\r\n// Start menu\r\nstartButton.addEventListener('click', () => {\r\n\tblackScreen.classList.add('visible');\r\n\tstartButton.disabled = true;\r\n\tplayClickSound();\r\n\r\n\tsetTimeout(() => {\r\n\t\tstartMusic();\r\n\t\tstartMenu.remove();\r\n\t\tblackScreen.classList.remove('visible');\r\n\t\tcomics.classList.add('visible');\r\n\t}, 1000);\r\n});\r\n\r\n// Comics skip \r\nnextButton.addEventListener('click', () => {\r\n\tblackScreen.classList.add('visible');\r\n\tnextButton.disabled = true;\r\n\tplayPaperSound();\r\n\tplayClickSound();\r\n\r\n\tsetTimeout(() => {\r\n\t\thelpText.style.display = 'block';\r\n\t\tblackScreen.classList.remove('visible');\r\n\t\tcomics.classList.remove('visible');\r\n\t\tGAME.paused = false;\r\n\t}, 1000);\r\n});\r\n\r\n// Restart button\r\nrestartButton.addEventListener('click', () => {\r\n\tblackScreen.classList.add('visible');\r\n\tcomics.classList.remove('visible');\r\n\tendMenu.classList.remove('visible');\r\n\trestartButton.disabled = true;\r\n\tplayClickSound();\r\n\r\n\tsetTimeout(() => {\r\n\t\tblackScreen.classList.remove('visible');\r\n\t\tendOverlay.classList.remove('visible');\r\n\t\tcomics.classList.remove('visible');\r\n\t\trestartButton.disabled = false;\r\n\r\n\t\tgameRestart();\r\n\t\trestartMusic();\r\n\t\tGAME.paused = false;\r\n\t}, 1000);\r\n});\r\n\r\n// Update GUI elements\r\nrequestInterval(() => {\r\n\r\n\t// Fish counter\r\n\tcounter.innerText = numberWithCommas(GAME.fish);\r\n\r\n\t// Bar width update\r\n\tlet percent: number = Math.floor(GAME.relevance * 50);\r\n\tif (percent > 100) percent = 100;\r\n\trelevanceBar.style.width = `${percent}%`;\r\n\r\n\t// Bar color\r\n\tif (GAME.relevance < 0.5) {\r\n\t\trelevanceBar.style.backgroundColor = '#f35858';\r\n\t} else if (GAME.relevance > 1.5) {\r\n\t\trelevanceBar.style.backgroundColor = '#5ef358';\r\n\t} else {\r\n\t\trelevanceBar.style.backgroundColor = '#5893f3';\r\n\t}\r\n}, 100);\r\n\r\n// Hide modals in overlay click\r\npostOverlay.addEventListener('click', () => {\r\n\tplayClick2Sound();\r\n\thidePostModals();\r\n});\r\n\r\n// Pause menu on Escape press\r\nwindow.addEventListener('keydown', event => {\r\n\tif (event.key === 'Escape') {\r\n\t\tif (GAME.paused && GAME.penguins.length > 1) {\r\n\t\t\tGAME.paused = false;\r\n\t\t\ttutorial.classList.remove('visible');\r\n\t\t\thidePostModals();\r\n\t\t} else {\r\n\t\t\tGAME.paused = true;\r\n\t\t\tplayPaperSound();\r\n\t\t\ttutorial.classList.add('visible');\r\n\t\t\thelpText.remove();\r\n\t\t}\r\n\t}\r\n});\r\n\r\n//Buttons for the new post thingy\r\ngamingButton.addEventListener('click', () => {\r\n\tunpressThemeButtons();\r\n\tplayClickSound();\r\n\tpostButton.disabled = false;\r\n\tgamingButton.classList.contains('active') ? gamingButton.classList.remove('active') : gamingButton.classList.add('active');\r\n});\r\n\r\neducationButton.addEventListener('click', () => {\r\n\tunpressThemeButtons();\r\n\tplayClickSound();\r\n\tpostButton.disabled = false;\r\n\teducationButton.classList.contains('active') ? educationButton.classList.remove('active') : educationButton.classList.add('active');\r\n});\r\n\r\n// Film theme selection\r\nfilmsButton.addEventListener('click', () => {\r\n\tunpressThemeButtons();\r\n\tplayClickSound();\r\n\tpostButton.disabled = false;\r\n\tfilmsButton.classList.contains('active') ? filmsButton.classList.remove('active') : filmsButton.classList.add('active');\r\n});\r\n\r\n// Politics theme selection\r\npoliticsButton.addEventListener('click', () => {\r\n\tunpressThemeButtons();\r\n\tplayClickSound();\r\n\tpostButton.disabled = false;\r\n\tpoliticsButton.classList.contains('active') ? politicsButton.classList.remove('active') : politicsButton.classList.add('active');\r\n});\r\n\r\n// Music theme selection\r\nmusicButton.addEventListener('click', () => {\r\n\tunpressThemeButtons();\r\n\tplayClickSound();\r\n\tpostButton.disabled = false;\r\n\tmusicButton.classList.contains('active') ? musicButton.classList.remove('active') : musicButton.classList.add('active');\r\n});\r\n\r\n// Sport theme selection\r\nsportButton.addEventListener('click', () => {\r\n\tunpressThemeButtons();\r\n\tplayClickSound();\r\n\tpostButton.disabled = false;\r\n\tsportButton.classList.contains('active') ? sportButton.classList.remove('active') : sportButton.classList.add('active');\r\n});\r\n\r\n/**\r\n * Unpress all theme buttons\r\n */\r\nfunction unpressThemeButtons(): void {\r\n\tgamingButton.classList.remove('active');\r\n\teducationButton.classList.remove('active');\r\n\tfilmsButton.classList.remove('active');\r\n\tpoliticsButton.classList.remove('active');\r\n\tmusicButton.classList.remove('active');\r\n\tsportButton.classList.remove('active');\r\n}\r\n\r\n/**\r\n * Show post creating modal\r\n */\r\nexport function showPostModal(): void {\r\n\tconst index = GAME.selectedNewsIndex;\r\n\tconst current = GAME.news[index];\r\n\r\n\t// Create post element\r\n\tconst blockNew = document.createElement('div');\r\n\tblockNew.className = 'block';\r\n\tconst title = document.createElement('h3');\r\n\ttitle.innerText = current.title;\r\n\tconst content = document.createElement('p');\r\n\tcontent.innerText = current.content;\r\n\r\n\tblockNew.appendChild(title);\r\n\tblockNew.appendChild(content);\r\n\r\n\tselectedNews.innerHTML = '';\r\n\tselectedNews.appendChild(blockNew);\r\n\r\n\tpostButton.disabled = true;\r\n\tpostModal.classList.add('visible');\r\n\tpostOverlay.classList.add('visible');\r\n\tGAME.paused = true;\r\n}\r\n\r\n/**\r\n * Hide post creating modal\r\n */\r\nexport function hidePostModals(): void {\r\n\tGAME.paused = false;\r\n\tpostButton.disabled = true;\r\n\tpostModal.classList.remove('visible');\r\n\tpostOverlay.classList.remove('visible');\r\n\tunpressThemeButtons();\r\n}\r\n","// stats.js - http://github.com/mrdoob/stats.js\n(function(f,e){\"object\"===typeof exports&&\"undefined\"!==typeof module?module.exports=e():\"function\"===typeof define&&define.amd?define(e):f.Stats=e()})(this,function(){var f=function(){function e(a){c.appendChild(a.dom);return a}function u(a){for(var d=0;d<c.children.length;d++)c.children[d].style.display=d===a?\"block\":\"none\";l=a}var l=0,c=document.createElement(\"div\");c.style.cssText=\"position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000\";c.addEventListener(\"click\",function(a){a.preventDefault();\nu(++l%c.children.length)},!1);var k=(performance||Date).now(),g=k,a=0,r=e(new f.Panel(\"FPS\",\"#0ff\",\"#002\")),h=e(new f.Panel(\"MS\",\"#0f0\",\"#020\"));if(self.performance&&self.performance.memory)var t=e(new f.Panel(\"MB\",\"#f08\",\"#201\"));u(0);return{REVISION:16,dom:c,addPanel:e,showPanel:u,begin:function(){k=(performance||Date).now()},end:function(){a++;var c=(performance||Date).now();h.update(c-k,200);if(c>g+1E3&&(r.update(1E3*a/(c-g),100),g=c,a=0,t)){var d=performance.memory;t.update(d.usedJSHeapSize/\n1048576,d.jsHeapSizeLimit/1048576)}return c},update:function(){k=this.end()},domElement:c,setMode:u}};f.Panel=function(e,f,l){var c=Infinity,k=0,g=Math.round,a=g(window.devicePixelRatio||1),r=80*a,h=48*a,t=3*a,v=2*a,d=3*a,m=15*a,n=74*a,p=30*a,q=document.createElement(\"canvas\");q.width=r;q.height=h;q.style.cssText=\"width:80px;height:48px\";var b=q.getContext(\"2d\");b.font=\"bold \"+9*a+\"px Helvetica,Arial,sans-serif\";b.textBaseline=\"top\";b.fillStyle=l;b.fillRect(0,0,r,h);b.fillStyle=f;b.fillText(e,t,v);\nb.fillRect(d,m,n,p);b.fillStyle=l;b.globalAlpha=.9;b.fillRect(d,m,n,p);return{dom:q,update:function(h,w){c=Math.min(c,h);k=Math.max(k,h);b.fillStyle=l;b.globalAlpha=1;b.fillRect(0,0,r,m);b.fillStyle=f;b.fillText(g(h)+\" \"+e+\" (\"+g(c)+\"-\"+g(k)+\")\",t,v);b.drawImage(q,d+a,m,n-a,p,d,m,n-a,p);b.fillRect(d+n-a,m,a,p);b.fillStyle=l;b.globalAlpha=.9;b.fillRect(d+n-a,m,a,g((1-h/w)*p))}}};return f});\n","// Game logic\r\nimport { spawnPenguins } from './logic';\r\n\r\n// Dependencies\r\nimport Stats from 'stats.js';\r\nimport { State, GameState } from './state';\r\n\r\n// Entities\r\nimport { Characters } from './entities/characters';\r\n\r\n// Stats setup\r\nconst stats = new Stats();\r\nstats.showPanel(0);\r\nif (process.env.NODE_ENV === 'development') document.body.appendChild(stats.dom);\r\n\r\n// Get state\r\nconst GAME: GameState = State();\r\n\r\n// Spawn main penguin player\r\nconst characters = new Characters();\r\nGAME.penguins.push(characters);\r\n\r\n// Spawn penguins\r\nspawnPenguins(10);\r\n\r\n// Main loop\r\nfunction loop() {\r\n\tstats.begin();\r\n\r\n\t// If game paused\r\n\tif (GAME.paused) {\r\n\t\twindow.requestAnimationFrame(loop);\r\n\t\treturn;\r\n\t}\r\n\r\n\t// Update entities\r\n\tfor (let i = 0; i < GAME.penguins.length; i++) GAME.penguins[i].update();\r\n\tfor (let i = 0; i < GAME.entities.length; i++) GAME.entities[i].update();\r\n\r\n\t// Remove all deleted entities\r\n\tGAME.penguins = GAME.penguins.filter(entity => entity.exists);\r\n\tGAME.entities = GAME.entities.filter(entity => entity.exists);\r\n\r\n\t// Clean screen\r\n\tif ((window as any).rave !== true) GAME.ctx.clearRect(0, 0, GAME.element.width, GAME.element.height);\r\n\r\n\t// Draw entities\r\n\tfor (let i = 0; i < GAME.penguins.length; i++) GAME.penguins[i].draw();\r\n\tfor (let i = 0; i < GAME.entities.length; i++) GAME.entities[i].draw();\r\n\r\n\tstats.end();\r\n\twindow.requestAnimationFrame(loop);\r\n}\r\n\r\n// Start loop\r\nloop();\r\n","// {#include_iostream, using namespase\r\n// ;\r\n// std{}\r\n// by PITSA\r\n\r\nimport { State, GameState } from '../state';\r\nimport { requestTimeout } from '../timers';\r\nimport { convertRange, loadImage, lerp } from '../utils';\r\n\r\n// Sprites\r\n/// @ts-ignore\r\nimport imgpathRod from '../../sprites/rod.png';\r\n\r\n// Preload images\r\nconst imgRod = loadImage(imgpathRod);\r\n\r\n// Global game state\r\nconst GAME: GameState = State();\r\n\r\nexport class FishingRod {\r\n\tpublic readonly type = 'fishing-rod';\r\n\tpublic readonly spriteHeight = 92;\r\n\tpublic readonly spriteWidth = 92;\r\n\r\n\tpublic exists: boolean;\r\n\tpublic frame: number;\r\n\r\n\tprivate x: number;\r\n\tprivate y: number;\r\n\r\n\tconstructor() {\r\n\t\tthis.x = GAME.element.width / 2;\r\n\t\tthis.y = GAME.element.height - 500;\r\n\t\tthis.exists = true;\r\n\t}\r\n\r\n\tpublic update(): void {\r\n\t\tconsole.log('rod update');\r\n\t}\r\n\r\n\tpublic draw(): void {\r\n\t\tlet ctx = GAME.ctx;\r\n\r\n\t\tlet x1 = GAME.element.width / 2;\r\n\t\tlet y1 = GAME.element.height;\r\n\r\n\t\tlet x2 = GAME.mouseX;\r\n\t\tlet y2 = GAME.mouseY;\r\n\r\n\t\tdrawLine(ctx, x2, y2, x2, y2 + 120, 'white');\r\n\r\n\t\tctx.save();\r\n\t\tctx.translate(x1, y1);\r\n\t\tlet mouseAng = Math.atan((y2 - y1) / (x2 - x1)) + (x2 < x1 ? Math.PI : 0);\r\n\t\tlet rodAng = 0.607;\r\n\t\tlet rodWidth = 1400.9;\r\n\t\tlet mouseWidth = Math.sqrt((y2 - y1) ** 2 + (x2 - x1) ** 2);\r\n\t\tctx.rotate(mouseAng + rodAng);\r\n\t\tlet scale = mouseWidth / rodWidth;\r\n\t\tctx.scale(scale, scale);\r\n\t\tGAME.ctx.drawImage(imgRod, 0, -imgRod.height + 50);\r\n\t\tctx.restore();\r\n\t}\r\n}\r\n\r\nfunction drawLine(ctx: CanvasRenderingContext2D, x1: number, y1: number, x2: number, y2: number, color: string) {\r\n\tctx.save();\r\n\tctx.beginPath();\r\n\tctx.moveTo(x1, y1);\r\n\tctx.lineTo(x2, y2);\r\n\tctx.strokeStyle = color;\r\n\tctx.stroke();\r\n\tctx.restore();\r\n}\r\n","import { State, GameState } from './state';\r\nimport { playCaramelldansen } from './audio';\r\nimport { FishingRod } from './entities/fishingRod';\r\n\r\n// Get state\r\nconst GAME: GameState = State();\r\n\r\n// Global scope\r\nconst globalScope: any = window as any;\r\n\r\n/** \r\n * Junkie penguins mode\r\n * Type \"junkie()\" in DevTools console to activate it\r\n */\r\nglobalScope.junkie = () => {\r\n globalScope.junkie = true;\r\n return 'Junkie mode activated!';\r\n}\r\n\r\n/** \r\n * Tempo update\r\n * Update tempo manually\r\n */\r\nglobalScope.setTempo = (tempo: number) => {\r\n GAME.tempo = tempo;\r\n return 'Tempo set to ' + tempo;\r\n}\r\n\r\n/** \r\n * Rave mode\r\n * Type \"rave()\" in DevTools console to activate it\r\n */\r\nglobalScope.rave = () => {\r\n playCaramelldansen();\r\n document.getElementById('stage').style.animation = 'party 0.32s infinite ease-in-out';\r\n document.getElementById('score-uploading').remove();\r\n globalScope.rave = true;\r\n GAME.tempo = 5;\r\n\r\n return 'Rave mode ON!';\r\n}\r\n\r\n/**\r\n * Fishing mode\r\n * Type \"fishing()\" in DevTools console to activate it\r\n */\r\nglobalScope.fishing = () =>\r\n{\r\n GAME.entities.push(new FishingRod());\r\n}","import { randomInteger, preloadImage, convertRange, insertionSort } from '../utils';\r\n\r\n/**\r\n * HOW TO USE:\r\n *\r\n * 1. Get canvas to draw the rain on\r\n * 2. new FallersRain(canvas, true) (true for resize)\r\n * Now the rain will be drawn on the canvas every frame\r\n *\r\n * If canvas has an ID, then the FallerRain will automatically stop its loop when the canvas is removed from the DOM.\r\n * Otherwise use fallersRain.finish() to stop the animation loop\r\n *\r\n */\r\n\r\n/// @ts-ignore\r\nimport fishImage from '../../sprites/fish.png';\r\n\r\ninterface Faller {\r\n\tx: number;\r\n\ty: number;\r\n\t// Larger the depth: lesser the speed, lesser the scale\r\n\tdepth: number;\r\n\t// Image of that index will be used from `images` array\r\n\timageIndex: number;\r\n\t// Current rotation\r\n\trot: number;\r\n\t// Angular speed\r\n\trotSpeed: number;\r\n\t// Image width and height\r\n\twidth: number;\r\n\theight: number;\r\n}\r\n\r\nenum FALLER_CFG {\r\n\tFrontSpeed = 2,\r\n\tBackSpeed = 1,\r\n\tFrontScale = 0.8,\r\n\tBackScale = 0.4,\r\n\tTopDownScaleDiff = 0.3,\r\n\tMaxRotSpeed = 0.01,\r\n\tMinRotSpeed = 0.004,\r\n\tTotalFallers = 100,\r\n}\r\n\r\nfunction randomFloat(min: number, max: number): number {\r\n\treturn Math.random() * (max - min) + min;\r\n}\r\n\r\nfunction unitRangeToRange(value: number, min: number, max: number): number {\r\n\treturn convertRange(value, { min: 0, max: 1 }, { min: min, max: max });\r\n}\r\n\r\nexport default class FallersRain {\r\n\tprivate ctx: CanvasRenderingContext2D;\r\n\r\n\tprivate finished: boolean;\r\n\r\n\tprivate fallers: Faller[] = [];\r\n\tprivate images: HTMLImageElement[] = [];\r\n\r\n\tprivate imagesToLoad: number;\r\n\r\n\tpublic constructor(canvas: HTMLCanvasElement, resize: boolean = true) {\r\n\t\trequestAnimationFrame(this.loop);\r\n\r\n\t\t// If this.loop (from requestAnimationFrame) will run when `finished=true`, the animation will be finished (loop won't loop anymore)\r\n\t\tthis.finished = false;\r\n\r\n\t\t// Resize canvas, get ctx\r\n\t\tcanvas = canvas;\r\n\t\tif (resize) {\r\n\t\t\tcanvas.width = window.innerWidth * window.devicePixelRatio;\r\n\t\t\tcanvas.height = window.innerHeight * window.devicePixelRatio;\r\n\t\t}\r\n\t\tthis.ctx = canvas.getContext('2d');\r\n\r\n\t\t// Load images\r\n\t\tthis.imagesToLoad = 0;\r\n\t\tthis.loadImages(fishImage);\r\n\t}\r\n\r\n\tprivate spawnFallers() {\r\n\t\tfor (let i = 0; i < FALLER_CFG.TotalFallers; i++) {\r\n\t\t\tlet faller = this.createFaller(false, i);\r\n\t\t\tthis.fallers.push(faller);\r\n\t\t}\r\n\r\n\t\tinsertionSort(this.fallers, 'depth');\r\n\t\tthis.fallers.reverse();\r\n\t}\r\n\r\n\tprivate loadImages(...imagePaths: string[]) {\r\n\t\tthis.imagesToLoad = imagePaths.length;\r\n\t\timagePaths.forEach(async path => {\r\n\t\t\tlet img = await preloadImage(path);\r\n\r\n\t\t\tthis.imagesToLoad--;\r\n\t\t\tthis.images.push(img);\r\n\t\t});\r\n\t}\r\n\r\n\tprivate createFaller(fromTop: boolean = false, index: number): Faller {\r\n\t\tlet randomImageIndex = randomInteger(0, this.images.length - 1);\r\n\t\tlet imageWidth = this.images[randomImageIndex].width;\r\n\t\tlet imageHeight = this.images[randomImageIndex].height;\r\n\r\n\t\tlet canvas = this.ctx.canvas;\r\n\r\n\t\tlet maxX = canvas.width;\r\n\t\tlet minX = -imageWidth;\r\n\t\tlet maxY = canvas.height - imageHeight - 1;\r\n\t\tlet minY = -imageHeight;\r\n\r\n\t\tlet total1D = Math.floor(Math.sqrt(FALLER_CFG.TotalFallers));\r\n\t\tlet x = ((maxX - minX) / total1D) * ((index % total1D) + randomFloat(0, 1)) + minX;\r\n\t\tlet y = ((maxY - minY) / total1D) * (index / total1D + randomFloat(0, 1)) + minY;\r\n\t\ty = fromTop ? minY : y;\r\n\r\n\t\tlet initialRot = randomInteger(0, Math.PI * 2);\r\n\r\n\t\tlet faller: Faller = {\r\n\t\t\tx: x,\r\n\t\t\ty: y,\r\n\t\t\tdepth: Math.random(),\r\n\t\t\timageIndex: randomImageIndex,\r\n\t\t\trot: initialRot,\r\n\t\t\trotSpeed: randomFloat(FALLER_CFG.MinRotSpeed, FALLER_CFG.MaxRotSpeed),\r\n\t\t\twidth: imageWidth,\r\n\t\t\theight: imageHeight,\r\n\t\t};\r\n\r\n\t\treturn faller;\r\n\t}\r\n\r\n\tpublic loop = () => {\r\n\t\t// Finish the loop if `this.finished == true`. ADDED: also auto-finishes when canvas is removed from the DOM\r\n\t\tif (this.finished || (this.ctx.canvas.id !== '' && !document.getElementById(this.ctx.canvas.id))) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.update();\r\n\r\n\t\trequestAnimationFrame(this.loop);\r\n\t};\r\n\r\n\tprivate update() {\r\n\t\t// Spawn fallers when all images are loaded\r\n\t\tif (this.imagesToLoad <= 0 && this.fallers.length === 0) {\r\n\t\t\tthis.spawnFallers();\r\n\t\t}\r\n\r\n\t\tlet ctx = this.ctx;\r\n\r\n\t\tctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);\r\n\t\tthis.fallers.forEach((faller, index) => {\r\n\t\t\tlet speed = unitRangeToRange(faller.depth, FALLER_CFG.FrontSpeed, FALLER_CFG.BackSpeed);\r\n\t\t\tlet scale =\r\n\t\t\t\tunitRangeToRange(faller.depth, FALLER_CFG.FrontScale, FALLER_CFG.BackScale) +\r\n\t\t\t\tconvertRange(faller.y, { min: 0, max: ctx.canvas.height }, { min: FALLER_CFG.TopDownScaleDiff / 2, max: -FALLER_CFG.TopDownScaleDiff / 2 });\r\n\r\n\t\t\tfaller.y += speed;\r\n\t\t\tif (faller.y > this.ctx.canvas.height) {\r\n\t\t\t\tthis.fallers[index] = this.createFaller(true, index);\r\n\t\t\t\tthis.fallers[index].depth = faller.depth;\r\n\t\t\t}\r\n\r\n\t\t\tfaller.rot += faller.rotSpeed;\r\n\r\n\t\t\tctx.save();\r\n\t\t\tctx.translate(faller.x + faller.width / 2, faller.y + faller.height / 2);\r\n\t\t\tctx.rotate(faller.rot);\r\n\t\t\tctx.scale(scale, scale);\r\n\t\t\tctx.drawImage(this.images[faller.imageIndex], -faller.width / 2, -faller.height / 2);\r\n\t\t\tctx.restore();\r\n\t\t});\r\n\t}\r\n\r\n\tpublic finish() {\r\n\t\tthis.finished = true;\r\n\t}\r\n}\r\n\r\nnew FallersRain(document.getElementById('start-menu-canvas') as HTMLCanvasElement);\r\n","import { State } from './core/state';\r\nimport { shuffle } from './core/utils';\r\n\r\n// Array of news\r\nimport { real_news, fake_news } from './content.json';\r\n\r\n// Setup canvas element\r\nconst stage = document.getElementById('stage') as HTMLCanvasElement;\r\nstage.width = window.innerWidth * window.devicePixelRatio;\r\nstage.height = window.innerHeight * window.devicePixelRatio;\r\n\r\n// Setup canvas context\r\nconst ctx = stage.getContext('2d');\r\n\r\n// State initialization\r\nState({\r\n\tpaused: true,\r\n\telement: stage,\r\n\tctx: ctx,\r\n\r\n\tmouseX: 0,\r\n\tmouseY: 0,\r\n\tmouseDown: false,\r\n\r\n\tentities: [],\r\n\tpenguins: [],\r\n\r\n\tfish: 0,\r\n\ttempo: 1,\r\n\trelevance: 1.25,\r\n\tmaximumPenguins: 10,\r\n\tserverAvailable: false,\r\n\r\n\tnews: shuffle([...real_news, ...fake_news]),\r\n\tselectedNewsIndex: 0,\r\n\tnewsIndex: 0,\r\n});\r\n\r\n// Input module\r\nimport './core/input';\r\n\r\n// Game UI\r\nimport './core/gui';\r\n\r\n// Main game code\r\nimport './core/main';\r\n\r\n// Cheat codes\r\nimport './core/cheats';\r\n\r\n// Start the fallers rain animation (in the start menu)\r\nimport './core/StartMenu/FallersRain';\r\n"]}