├── .gitignore ├── .prettierrc.yaml ├── public └── assets │ ├── avatar-default.jpg │ └── flags │ ├── BLACK.svg │ ├── WHITE.svg │ ├── GBENG.svg │ ├── USAL.svg │ ├── ESCT.svg │ ├── GBSCT.svg │ ├── AUABORIGINAL.svg │ ├── CHECKERED.svg │ ├── ESPV.svg │ ├── TRANS.svg │ ├── MQ.svg │ ├── LGBT.svg │ ├── MR.svg │ ├── USCO.svg │ ├── SY.svg │ ├── USNM.svg │ ├── JP.svg │ ├── FI.svg │ ├── MYSWK.svg │ ├── USMN.svg │ ├── ID.svg │ ├── MC.svg │ ├── PL.svg │ ├── YU.svg │ ├── AT.svg │ ├── LV.svg │ ├── NG.svg │ ├── PE.svg │ ├── DK.svg │ ├── DKBORN.svg │ ├── GR.svg │ ├── USTX.svg │ ├── BH.svg │ ├── QA.svg │ ├── SO.svg │ ├── USAZ.svg │ ├── AR.svg │ ├── UA.svg │ ├── EH.svg │ ├── BD.svg │ ├── PW.svg │ ├── SE.svg │ ├── NI.svg │ ├── FO.svg │ ├── IL.svg │ ├── USHI.svg │ ├── BG.svg │ ├── CI.svg │ ├── EE.svg │ ├── FR.svg │ ├── HU.svg │ ├── IE.svg │ ├── IT.svg │ ├── LU.svg │ ├── MF.svg │ ├── MG.svg │ ├── NL.svg │ ├── RE.svg │ ├── RU.svg │ ├── SL.svg │ ├── WF.svg │ ├── YE.svg │ ├── CZ.svg │ ├── BW.svg │ ├── CR.svg │ ├── TH.svg │ ├── TN.svg │ ├── MA.svg │ ├── LA.svg │ ├── SB.svg │ ├── BV.svg │ ├── IS.svg │ ├── NO.svg │ ├── SJ.svg │ ├── SG.svg │ ├── TR.svg │ ├── CH.svg │ ├── GG.svg │ ├── VN.svg │ ├── USMD.svg │ ├── MV.svg │ ├── USTN.svg │ ├── BF.svg │ ├── QC.svg │ ├── SI.svg │ ├── SV.svg │ ├── BN.svg │ ├── SM.svg │ ├── GT.svg │ ├── MT.svg │ ├── GE.svg │ ├── USAK.svg │ ├── CL.svg │ ├── PR.svg │ ├── BZH.svg │ ├── TW.svg │ ├── OM.svg │ ├── BJ.svg │ ├── CA.svg │ ├── AM.svg │ ├── BE.svg │ ├── BO.svg │ ├── CO.svg │ ├── DE.svg │ ├── GA.svg │ ├── GN.svg │ ├── LT.svg │ ├── ML.svg │ ├── RO.svg │ ├── TD.svg │ ├── BS.svg │ ├── PY.svg │ ├── TT.svg │ ├── CW.svg │ ├── AX.svg │ ├── NR.svg │ ├── AE.svg │ ├── GM.svg │ ├── KP.svg │ ├── KW.svg │ ├── PS.svg │ ├── SD.svg │ ├── NE.svg │ ├── LC.svg │ ├── MW.svg │ ├── FM.svg │ ├── CU.svg │ ├── TO.svg │ ├── UZ.svg │ ├── IN.svg │ ├── KH.svg │ ├── MH.svg │ ├── GF.svg │ ├── CD.svg │ ├── PA.svg │ ├── AW.svg │ ├── AZ.svg │ ├── LY.svg │ ├── DJ.svg │ ├── MM.svg │ ├── SN.svg │ ├── MX.svg │ ├── MYSB.svg │ ├── SR.svg │ ├── CG.svg │ ├── MN.svg │ ├── WS.svg │ ├── TG.svg │ ├── BA.svg │ ├── NF.svg │ ├── TK.svg │ ├── TL.svg │ ├── DZ.svg │ ├── HN.svg │ ├── JO.svg │ ├── TJ.svg │ ├── GL.svg │ ├── KG.svg │ ├── MP.svg │ ├── MU.svg │ ├── BY.svg │ ├── VE.svg │ ├── JM.svg │ ├── DO.svg │ ├── VC.svg │ ├── GW.svg │ ├── USSR.svg │ ├── MY.svg │ ├── GH.svg │ ├── TZ.svg │ ├── CC.svg │ ├── ES.svg │ ├── RW.svg │ ├── CM.svg │ ├── LS.svg │ ├── XK.svg │ ├── NZMAORI.svg │ ├── LR.svg │ ├── GQ.svg │ ├── AD.svg │ ├── USOH.svg │ ├── NC.svg │ ├── JE.svg │ ├── MK.svg │ ├── ST.svg │ ├── BR.svg │ ├── CN.svg │ ├── GB.svg │ ├── TF.svg │ ├── LB.svg │ └── KM.svg ├── src ├── renderer │ ├── mods │ │ ├── extenssr │ │ │ ├── shaders │ │ │ │ ├── toon.glsl │ │ │ │ ├── ai.glsl │ │ │ │ ├── flash.glsl │ │ │ │ ├── vignette.glsl │ │ │ │ ├── simple_fragment.glsl │ │ │ │ ├── simple_vertex.glsl │ │ │ │ ├── pixelate.glsl │ │ │ │ ├── water.glsl │ │ │ │ ├── crt.glsl │ │ │ │ ├── vertex.glsl │ │ │ │ ├── fisheye.glsl │ │ │ │ ├── bloom.glsl │ │ │ │ ├── motion_blur.glsl │ │ │ │ ├── min.glsl │ │ │ │ ├── fragment.glsl │ │ │ │ ├── drunk.glsl │ │ │ │ ├── sobel.glsl │ │ │ │ └── snow.glsl │ │ │ ├── aliasing.ts │ │ │ └── texture.ts │ │ ├── env.d.ts │ │ └── extenssrPostProcessing.ts │ ├── assets │ │ ├── fonts │ │ │ └── montserrat-regular-webfont.woff2 │ │ ├── icons │ │ │ ├── stop.svg │ │ │ ├── start.svg │ │ │ ├── auto_scroll.svg │ │ │ ├── twitch.svg │ │ │ ├── pause.svg │ │ │ ├── audio.svg │ │ │ ├── start_flag.svg │ │ │ ├── gear.svg │ │ │ ├── gear_stroke.svg │ │ │ ├── scoreboard_visible.svg │ │ │ ├── extenssr_filters.svg │ │ │ └── leaderboard.svg │ │ └── extenssr-styles.css │ ├── useLocalStorage.ts │ ├── useSettings.ts │ └── components │ │ └── ui │ │ └── Tabs.vue ├── main │ └── utils │ │ ├── store.ts │ │ ├── useSupabase.ts │ │ └── useSettings.ts ├── module.d.ts ├── auth │ ├── auth_impl.ts │ ├── auth_preload.ts │ ├── index.html │ └── styles.css └── preload │ └── preload.ts ├── tsconfig.json ├── vite.preload.config.mjs ├── vite.auth_preload.config.mjs ├── .editorconfig ├── .env.example ├── vite.auth.config.mjs ├── vite.renderer.config.mjs ├── vite.main.config.mjs ├── tsconfig.node.json ├── tsconfig.web.json ├── LICENSE └── eslint.config.mjs /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .vite 3 | out 4 | dist 5 | *.log* 6 | .env 7 | -------------------------------------------------------------------------------- /.prettierrc.yaml: -------------------------------------------------------------------------------- 1 | singleQuote: true 2 | semi: false 3 | printWidth: 100 4 | trailingComma: none 5 | endOfLine: auto 6 | -------------------------------------------------------------------------------- /public/assets/avatar-default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tzhf/chatguessr/HEAD/public/assets/avatar-default.jpg -------------------------------------------------------------------------------- /public/assets/flags/BLACK.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/WHITE.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/shaders/toon.glsl: -------------------------------------------------------------------------------- 1 | vec3 toon(vec3 inputColor) { 2 | return floor(inputColor * toonScale) / toonScale; 3 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [{ "path": "./tsconfig.node.json" }, { "path": "./tsconfig.web.json" }] 4 | } 5 | -------------------------------------------------------------------------------- /vite.preload.config.mjs: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | 3 | // https://vitejs.dev/config 4 | export default defineConfig({}) 5 | -------------------------------------------------------------------------------- /vite.auth_preload.config.mjs: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | 3 | // https://vitejs.dev/config 4 | export default defineConfig({}) 5 | -------------------------------------------------------------------------------- /src/renderer/assets/fonts/montserrat-regular-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tzhf/chatguessr/HEAD/src/renderer/assets/fonts/montserrat-regular-webfont.woff2 -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/shaders/ai.glsl: -------------------------------------------------------------------------------- 1 | vec3 aiMask(vec3 inputColor) { 2 | return mix(inputColor.rgb, vec3(0.6, 0.6, 0.6), texture2D(mask, vTexCoord).rgb); 3 | } -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/shaders/flash.glsl: -------------------------------------------------------------------------------- 1 | vec3 flash(vec3 inputColor) { 2 | return mix(vec3(1.0), inputColor, smoothstep(0.1, 0.75, (globalTime - flashStart) / 1.25)); 3 | } -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /public/assets/flags/GBENG.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/USAL.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/utils/store.ts: -------------------------------------------------------------------------------- 1 | import ElectronStore from 'electron-store' 2 | 3 | type Schema = { 4 | settings: Settings 5 | session: Session | null 6 | } 7 | 8 | export const store = new ElectronStore() 9 | -------------------------------------------------------------------------------- /public/assets/flags/ESCT.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/GBSCT.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | VITE_CG_PUBLIC_URL=chatguessr.com 2 | VITE_CG_API_URL=https://chatguessr.com/api 3 | VITE_SOCKET_SERVER_URL= 4 | VITE_SUPABASE_URL= 5 | VITE_SUPABASE_ANON_KEY= 6 | -------------------------------------------------------------------------------- /public/assets/flags/AUABORIGINAL.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/CHECKERED.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/assets/icons/stop.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/module.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module 'coordinate_to_country' { 4 | function coordinate_to_country(lat: number, lng: number, isoA2?: boolean): string[] 5 | export = coordinate_to_country 6 | } 7 | -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/shaders/vignette.glsl: -------------------------------------------------------------------------------- 1 | vec3 vignette(vec3 inputColor) { 2 | const float pi = 3.1415926; 3 | return inputColor * vec3(1.0 - pow(length(vTexCoord - vec2(0.5)) * 1.3 + .1, .4 + (sin(globalTime * .75 * pi ) + 1.0) * 0.5)); 4 | } -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/shaders/simple_fragment.glsl: -------------------------------------------------------------------------------- 1 | // Default post processing fragment shader. 2 | precision mediump float; 3 | varying vec2 vTexCoord; 4 | uniform sampler2D texture; 5 | void main() { 6 | gl_FragColor = texture2D(texture, vTexCoord); 7 | } -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/shaders/simple_vertex.glsl: -------------------------------------------------------------------------------- 1 | // Default post processing vertex shader 2 | attribute vec2 coordinates; 3 | varying highp vec2 vTexCoord; 4 | void main(void) { 5 | gl_Position = vec4(coordinates, 0.0, 1.0); 6 | vTexCoord = (coordinates + 1.0) * 0.5; 7 | } -------------------------------------------------------------------------------- /public/assets/flags/ESPV.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/TRANS.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/assets/icons/start.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/renderer/mods/env.d.ts: -------------------------------------------------------------------------------- 1 | import PostProcessingController, { 2 | PostProcessingState 3 | } from './extenssr/post_processing_controller' 4 | 5 | declare global { 6 | interface Window { 7 | pp: PostProcessingState 8 | ppController: PostProcessingController | null 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /public/assets/flags/MQ.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/auth/auth_impl.ts: -------------------------------------------------------------------------------- 1 | const startAuth: HTMLButtonElement | null = document.querySelector('#start-auth') 2 | if (startAuth) { 3 | startAuth.addEventListener('click', () => { 4 | startAuth.disabled = true 5 | // @ts-expect-error TS2304: defined by preload script 6 | chatguessrApi.startAuth() 7 | }) 8 | } 9 | -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/shaders/pixelate.glsl: -------------------------------------------------------------------------------- 1 | vec3 pixelate() { 2 | vec2 texCoord = vec2(ivec2(vTexCoord * scaling)) / scaling; 3 | texCoord.x = float(int(texCoord.x * scaling)) / scaling; 4 | texCoord.y = float(int(texCoord.y * scaling)) / scaling; 5 | return texture2D(texture, texCoord).rgb; 6 | } 7 | -------------------------------------------------------------------------------- /public/assets/flags/LGBT.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/auth/auth_preload.ts: -------------------------------------------------------------------------------- 1 | import { contextBridge, ipcRenderer } from 'electron' 2 | 3 | contextBridge.exposeInMainWorld('chatguessrApi', { 4 | startAuth() { 5 | ipcRenderer.invoke('start-auth') 6 | }, 7 | setSession(session: import('@supabase/supabase-js').Session) { 8 | ipcRenderer.send('set-session', session) 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /public/assets/flags/MR.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/shaders/water.glsl: -------------------------------------------------------------------------------- 1 | vec3 water() { 2 | vec2 uv = vTexCoord; 3 | const vec2 d = vec2(0.5); 4 | float r = length(uv - d); 5 | const float pi = 3.14159265359; 6 | uv.x += du * 50.0 * cos(sin(r * 2.0 * pi) * 5.0 * pi); 7 | uv.y += dv * 50.0 * sin(sin(r * 2.0 * pi) * 5.0 * pi); 8 | return texture2D(texture, uv).rgb; 9 | } -------------------------------------------------------------------------------- /src/renderer/assets/icons/auto_scroll.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/main/utils/useSupabase.ts: -------------------------------------------------------------------------------- 1 | import { createClient } from '@supabase/supabase-js' 2 | 3 | const supabaseUrl = import.meta.env.VITE_SUPABASE_URL 4 | const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY 5 | 6 | export const supabase = createClient(supabaseUrl, supabaseAnonKey) 7 | 8 | declare global { 9 | type Session = import('@supabase/supabase-js').Session 10 | } 11 | -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/shaders/crt.glsl: -------------------------------------------------------------------------------- 1 | vec3 crt() { 2 | vec3 color = vec3(texture2D(texture, vTexCoord).r, texture2D(texture, vec2(du * 5.0, dv * 10.0) + vTexCoord).g, texture2D(texture, vec2(du * 10.0, dv * 5.0) + vTexCoord).b); 3 | const float freq = 0.125 * 3.1415926; 4 | color *= length(sin(gl_FragCoord.xy * freq)); 5 | color = pow(color, vec3(2.2)); 6 | return color; 7 | } -------------------------------------------------------------------------------- /src/renderer/assets/icons/twitch.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /vite.auth.config.mjs: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import path from 'path' 3 | 4 | export default defineConfig({ 5 | root: path.resolve(__dirname, 'src/auth'), 6 | base: './', 7 | build: { 8 | outDir: path.resolve(__dirname, '.vite/build/auth'), 9 | emptyOutDir: true, 10 | rollupOptions: { 11 | input: path.resolve(__dirname, 'src/auth/index.html') 12 | } 13 | } 14 | }) 15 | -------------------------------------------------------------------------------- /public/assets/flags/USCO.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vite.renderer.config.mjs: -------------------------------------------------------------------------------- 1 | import path from 'path' 2 | import { defineConfig } from 'vite' 3 | import vue from '@vitejs/plugin-vue' 4 | import svgLoader from 'vite-svg-loader' 5 | 6 | // https://vitejs.dev/config 7 | export default defineConfig({ 8 | plugins: [vue(), svgLoader()], 9 | define: { 'process.env': {} }, 10 | resolve: { 11 | alias: { '@': path.resolve(__dirname, './src/renderer') } 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/shaders/vertex.glsl: -------------------------------------------------------------------------------- 1 | // Default vertex shader + no car script. 2 | varying vec3 a; 3 | varying vec3 eyeDirection; 4 | uniform vec4 b; 5 | attribute vec3 c; 6 | attribute vec2 d; 7 | uniform mat4 e; 8 | void main() { 9 | vec4 g = vec4(c, 1); 10 | gl_Position = e * g; 11 | eyeDirection = vec3(d.x, d.y, 1.0) * length(c); 12 | a = vec3(d.xy * b.xy + b.zw, 1); 13 | a *= length(c); 14 | } -------------------------------------------------------------------------------- /public/assets/flags/SY.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/renderer/mods/extenssrPostProcessing.ts: -------------------------------------------------------------------------------- 1 | import PostProcessingController from './extenssr/post_processing_controller' 2 | import { defaultPP } from './extenssr/post_processing_controller' 3 | import { injectionStartup } from './extenssr/overrides' 4 | const pp = defaultPP() 5 | const ppController = new PostProcessingController() 6 | 7 | window.pp = pp 8 | window.ppController = ppController 9 | 10 | injectionStartup(ppController) 11 | -------------------------------------------------------------------------------- /src/renderer/assets/icons/pause.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/renderer/useLocalStorage.ts: -------------------------------------------------------------------------------- 1 | export function getLocalStorage(key: string, initialValue: T): T { 2 | const storedVal = window.localStorage.getItem(key) 3 | if (!storedVal) return initialValue 4 | 5 | try { 6 | return JSON.parse(storedVal) 7 | } catch { 8 | return initialValue 9 | } 10 | } 11 | 12 | export function setLocalStorage(key: string, value: T) { 13 | window.localStorage.setItem(key, JSON.stringify(value)) 14 | } 15 | -------------------------------------------------------------------------------- /vite.main.config.mjs: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | 3 | // https://vitejs.dev/config 4 | export default defineConfig({ 5 | build: { 6 | rollupOptions: { 7 | // Some third-party Node.js libraries may not be built correctly by Vite, 8 | // we can use `external` to exclude them to ensure they work correctly. 9 | external: ['better-sqlite3', 'coordinate_to_country', 'bufferutil', 'utf-8-validate'] 10 | } 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/aliasing.ts: -------------------------------------------------------------------------------- 1 | // @ts-ignore 2 | export function aliasCall(target, methodName, newWrapper) { 3 | target[methodName] = newWrapper(target[methodName]) 4 | } 5 | // @ts-ignore 6 | export function aliasConfig(target, config): void { 7 | for (const methodName in config) { 8 | const wrapper = config[methodName] 9 | if (typeof wrapper === 'function') { 10 | aliasCall(target, methodName, wrapper) 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/utils/useSettings.ts: -------------------------------------------------------------------------------- 1 | import { defaultSettings } from '../../shared/settings/defaultSettings' 2 | import { store } from './store' 3 | 4 | const storedSettings = store.get('settings') 5 | 6 | const settings = Object.assign({}, defaultSettings, storedSettings) 7 | 8 | const saveSettings = (newSettings: Settings): void => { 9 | Object.assign(settings, newSettings) 10 | store.set('settings', settings) 11 | } 12 | 13 | export { settings, saveSettings } 14 | -------------------------------------------------------------------------------- /public/assets/flags/USNM.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/shaders/fisheye.glsl: -------------------------------------------------------------------------------- 1 | vec3 fishEye() { 2 | float aspect = du/dv; 3 | vec2 distorsion = vTexCoord - vec2(0.5); 4 | distorsion.x *= aspect; 5 | float len = length(distorsion); 6 | float k1 = .7; 7 | float k2 = 1.0; 8 | float k3 = -6.4; 9 | 10 | distorsion 11 | = distorsion*k1 12 | + distorsion*len*k2 13 | + distorsion*len*len*k3; 14 | distorsion.x /= aspect; 15 | return texture2D(texture, distorsion + vec2(0.5)).rgb; 16 | } -------------------------------------------------------------------------------- /public/assets/flags/JP.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/assets/icons/audio.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /public/assets/flags/FI.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/MYSWK.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/shaders/bloom.glsl: -------------------------------------------------------------------------------- 1 | vec3 bloom(vec3 inputColor) { 2 | vec3 color = vec3(0.0); 3 | const float oneOver121 = 1.0 / 121.0; 4 | const vec3 grayCoefs = vec3(0.2126, 0.7152, 0.0722); 5 | for (int i = -5; i <= 5; ++i) 6 | for (int j = -5; j <= 5; ++j) { 7 | vec3 comp = texture2D(texture, vTexCoord + 5.0 * vec2(du, dv) * vec2(i, j)).rgb; 8 | float brightness = dot(comp, grayCoefs); 9 | color += comp * step(.8, brightness) * oneOver121; 10 | } 11 | return inputColor + color; 12 | } -------------------------------------------------------------------------------- /public/assets/flags/USMN.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/assets/icons/start_flag.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/shaders/motion_blur.glsl: -------------------------------------------------------------------------------- 1 | vec3 motionBlur() { 2 | vec3 color = vec3(0.0); 3 | vec2 direction = vec2(vx, vy); 4 | const int window_size = 15; 5 | float coef = 1.0; 6 | for (int i = 0; i <= window_size; ++i) { 7 | float distance = float(i); 8 | float local_coef = exp(-1.0 / (1.0+distance*distance)); 9 | coef += local_coef; 10 | color += texture2D(texture, vTexCoord + direction * 5.0 * distance * vec2(du, dv)).rgb * local_coef; 11 | } 12 | return color / coef; 13 | 14 | } -------------------------------------------------------------------------------- /public/assets/flags/ID.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/MC.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/PL.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": ["src/renderer"], 3 | "compilerOptions": { 4 | "strict": true, 5 | "target": "esnext", 6 | "module": "esnext", 7 | "esModuleInterop": true, 8 | "moduleResolution": "node", 9 | "resolveJsonModule": true, 10 | "isolatedModules": true, 11 | "forceConsistentCasingInFileNames": true, 12 | "skipLibCheck": true, 13 | "noUnusedLocals": true, 14 | "noUnusedParameters": true, 15 | "noImplicitAny": false, 16 | "noImplicitReturns": true, 17 | "noEmit": true 18 | }, 19 | } 20 | -------------------------------------------------------------------------------- /public/assets/flags/YU.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/AT.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/LV.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/NG.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/PE.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/DK.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/useSettings.ts: -------------------------------------------------------------------------------- 1 | import { reactive, watch } from 'vue' 2 | import { defaultSettings } from '../shared/settings/defaultSettings' 3 | 4 | const settings = reactive({ ...defaultSettings }) 5 | 6 | watch(settings, () => { 7 | window.chatguessrApi.saveSettings(JSON.parse(JSON.stringify(settings))) 8 | }) 9 | 10 | // Initialize once, immediately 11 | ;(async () => { 12 | const storedSettings = await window.chatguessrApi.getSettings() 13 | Object.assign(settings, storedSettings) 14 | })() 15 | 16 | export function useSettings() { 17 | return { settings } 18 | } 19 | -------------------------------------------------------------------------------- /tsconfig.web.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "esnext", 5 | "module": "esnext", 6 | "esModuleInterop": true, 7 | "moduleResolution": "node", 8 | "resolveJsonModule": true, 9 | "isolatedModules": true, 10 | "forceConsistentCasingInFileNames": true, 11 | "skipLibCheck": true, 12 | "noUnusedLocals": true, 13 | "noUnusedParameters": true, 14 | "noImplicitAny": false, 15 | "noImplicitReturns": true, 16 | "noEmit": true, 17 | "paths": { 18 | "@/*": ["./src/renderer/*"] 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /public/assets/flags/DKBORN.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | 14 | 16 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /public/assets/flags/GR.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/USTX.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/BH.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/QA.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/SO.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/USAZ.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/AR.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/UA.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/EH.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/BD.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/PW.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/SE.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/NI.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/FO.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/IL.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/USHI.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/BG.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/CI.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/EE.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/FR.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/HU.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/IE.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/IT.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/LU.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/MF.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/MG.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/NL.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/RE.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/RU.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/SL.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/WF.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/YE.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/CZ.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/BW.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/CR.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/TH.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/TN.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/MA.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/LA.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/SB.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/BV.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/IS.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/NO.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/SJ.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/assets/icons/gear.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /public/assets/flags/SG.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/TR.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/CH.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/GG.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/auth/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Twitch Setup 7 | 8 | 9 | 10 |
11 |
12 |

13 | To use ChatGuessr, you have to log in with Twitch. We recommend logging in using a bot 14 | account or second account, not your main streamer account. 15 |

16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /public/assets/flags/VN.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/USMD.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/assets/icons/gear_stroke.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /public/assets/flags/MV.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/USTN.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/BF.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/QC.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/SI.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/SV.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/BN.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/assets/icons/scoreboard_visible.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /public/assets/flags/SM.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/GT.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/MT.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/GE.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/USAK.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/CL.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/PR.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/BZH.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/TW.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/OM.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/BJ.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/CA.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/shaders/min.glsl: -------------------------------------------------------------------------------- 1 | vec3 minFilter() { 2 | float minR = 1.0; 3 | float minG = 1.0; 4 | float minB = 1.0; 5 | 6 | const int windowSize = 11; 7 | const int windowRadius = windowSize / 2; 8 | const int minWindow = -windowRadius; 9 | const int maxWindow = windowRadius; 10 | for (int y = minWindow; y <= maxWindow; ++y) { 11 | for (int x = minWindow; x <= maxWindow; ++x) { 12 | // Use a circular window 13 | if ((x * x + y * y) > (windowRadius * windowRadius)) { 14 | continue; 15 | } 16 | vec3 color = texture2D(texture, vTexCoord + vec2(du * float(x), dv * float(y))).rgb; 17 | minR = min(color.r, minR); 18 | minG = min(color.g, minG); 19 | minB = min(color.b, minB); 20 | 21 | } 22 | } 23 | return vec3(minR, minG, minB); 24 | } -------------------------------------------------------------------------------- /public/assets/flags/AM.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/BE.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/BO.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/CO.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/DE.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/GA.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/GN.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/LT.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/ML.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/RO.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/TD.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/shaders/fragment.glsl: -------------------------------------------------------------------------------- 1 | // Default fragment shader + no car script. 2 | precision highp float; 3 | const float h = 3.1415926; 4 | varying vec3 a; 5 | varying vec3 eyeDirection; 6 | uniform vec4 b; 7 | uniform float f; 8 | uniform float hideCar; 9 | uniform sampler2D g; 10 | void main() { 11 | vec2 texCoord = a.xy / a.z; 12 | vec4 color = vec4(texture2D(g, texCoord).rgb, f); 13 | vec2 normalizedEyeDirection = eyeDirection.xy / a.z; 14 | normalizedEyeDirection.x = abs(normalizedEyeDirection.x * 4.0 - 2.0); 15 | normalizedEyeDirection.x = smoothstep(0.0, 1.0, normalizedEyeDirection.x > 1.0 ? 2.0 - normalizedEyeDirection.x : normalizedEyeDirection.x); 16 | float carMask = step(normalizedEyeDirection.y, mix(0.6, 0.7, normalizedEyeDirection.x)); 17 | color.rgb = mix(vec3(0.6, 0.6, 0.6), color.rgb, clamp(0.0, 1.0, carMask + hideCar)); 18 | gl_FragColor = color; 19 | } -------------------------------------------------------------------------------- /public/assets/flags/BS.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/PY.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/TT.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/CW.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/AX.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/NR.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/AE.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/GM.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/KP.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/KW.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/PS.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/SD.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/NE.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/assets/icons/extenssr_filters.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/shaders/drunk.glsl: -------------------------------------------------------------------------------- 1 | vec3 drunk() { 2 | const float pi = 3.1415926; 3 | const float blurStart = 1.0; 4 | const float blurWidth = 0.1; 5 | const int nsamples = 9; 6 | 7 | vec2 center = vec2(0.5) + 0.2 * vec2(cos(2.0 * pi * 1.3 * globalTime), sin(2.0 * pi * 1.3 * globalTime)); 8 | vec2 uv = vTexCoord - center; 9 | float precompute = blurWidth * (1.0 / float(nsamples - 1)); 10 | vec3 radialBlur = vec3(0.0); 11 | 12 | for(int i = 0; i < nsamples; i++) 13 | { 14 | float scale = blurStart + (float(i)* precompute); 15 | radialBlur += texture2D(texture, uv * scale + center).rgb; 16 | } 17 | radialBlur /= float(nsamples); 18 | vec3 deltaColor = texture2D(texture, vTexCoord + vec2(cos(globalTime * 1.9 * pi) * du * 15.0, sin(globalTime * 1.6 * pi) * dv * 10.0)).rgb; 19 | return mix(radialBlur, deltaColor, 0.5 + (sin(2.5 * pi * globalTime) + 1.0) * 0.035); 20 | } 21 | -------------------------------------------------------------------------------- /public/assets/flags/LC.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/MW.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/FM.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/CU.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/TO.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/UZ.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/IN.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/KH.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/MH.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/GF.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/CD.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/assets/extenssr-styles.css: -------------------------------------------------------------------------------- 1 | /* Adapted from https://gitlab.com/nonreviad/extenssr/-/blob/c795a07e0eb64cb5b32d60e6f3784b044becb1c1/css/styles.css */ 2 | 3 | /* shortcut menu items */ 4 | .extenssr__nav-submenu { 5 | z-index: 55; 6 | position: absolute; 7 | top: 0rem; 8 | margin-top: 3rem; 9 | padding: 0.375rem 0; 10 | border-radius: 0.5rem; 11 | max-width: 300px; 12 | background: var(--ds-color-black-80); 13 | list-style-type: none; 14 | } 15 | 16 | .extenssr__nav-submenu li { 17 | box-sizing: border-box; 18 | width: 100%; 19 | white-space: nowrap; 20 | padding: 0; 21 | margin: 0; 22 | } 23 | 24 | .extenssr__nav-submenu a { 25 | box-sizing: border-box; 26 | display: inline-block; 27 | width: 100%; 28 | padding: 0.25rem 1rem 0.25rem 1rem; 29 | color: #fff; 30 | opacity: 0.6; 31 | overflow: hidden; 32 | white-space: nowrap; 33 | text-overflow: ellipsis; 34 | } 35 | .extenssr__nav-submenu a:hover { 36 | opacity: 1; 37 | text-decoration: none; 38 | } 39 | -------------------------------------------------------------------------------- /public/assets/flags/PA.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/AW.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/AZ.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/LY.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/DJ.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/MM.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/SN.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/MX.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/MYSB.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/SR.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/CG.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/MN.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/WS.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/TG.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/BA.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/NF.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/TK.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/TL.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/assets/icons/leaderboard.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /public/assets/flags/DZ.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/HN.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/JO.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/TJ.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/GL.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/KG.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/MP.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/MU.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/BY.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/VE.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/shaders/sobel.glsl: -------------------------------------------------------------------------------- 1 | vec3 sobel(vec3 inputColor) { 2 | float top_left = length(texture2D(texture, vTexCoord + vec2(-du, +dv)).rgb); 3 | float above = length(texture2D(texture, vTexCoord + vec2(0.0, +dv)).rgb); 4 | float top_right = length(texture2D(texture, vTexCoord + vec2(+du, +dv)).rgb); 5 | float left = length(texture2D(texture, vTexCoord + vec2(-du, 0.0)).rgb); 6 | float right = length(texture2D(texture, vTexCoord + vec2(+du, 0.0)).rgb); 7 | float bottom_left = length(texture2D(texture, vTexCoord + vec2(-du, -dv)).rgb); 8 | float below = length(texture2D(texture, vTexCoord + vec2(0.0, -dv)).rgb); 9 | float bottom_right = length(texture2D(texture, vTexCoord + vec2(+du, -dv)).rgb); 10 | 11 | float X = +top_left - top_right + 2.0 * left - 2.0 * right + bottom_left - bottom_right; 12 | float Y = -top_left - 2.0 * above - top_right + bottom_left + 2.0 * below + bottom_right; 13 | 14 | float sobel = sqrt(X * X + Y * Y); 15 | const vec3 edgeColor = vec3(0.0); 16 | return mix(inputColor.rgb, edgeColor, sobel); 17 | } -------------------------------------------------------------------------------- /public/assets/flags/JM.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/shaders/snow.glsl: -------------------------------------------------------------------------------- 1 | vec3 snow(vec3 inputColor) { 2 | const int LAYERS = 10; 3 | const float DEPTH = .5; 4 | const float WIDTH = .3; 5 | const float SPEED = .6; 6 | // Shader mercilessly adapted from https://www.shadertoy.com/view/ldsGDn 7 | const mat3 p = mat3(13.323122,23.5112,21.71123,21.1212,28.7312,11.9312,21.8112,14.7212,61.3934); 8 | float dof = 5.*sin(globalTime*.1); 9 | vec2 uv = vec2(du, dv) * gl_FragCoord.xy; 10 | vec3 color = inputColor; 11 | for (int i=0;i 2 |
3 | 11 |
12 | 13 | 14 | 22 | 23 | 53 | -------------------------------------------------------------------------------- /public/assets/flags/DO.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/VC.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/GW.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/USSR.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/MY.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/GH.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/TZ.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import eslint from '@eslint/js' 2 | import typescriptEslint from 'typescript-eslint' 3 | import eslintPluginVue from 'eslint-plugin-vue' 4 | import eslintConfigPrettier from 'eslint-config-prettier' 5 | 6 | export default [ 7 | { 8 | ignores: ['.vite/**', 'out/**'] 9 | }, 10 | ...typescriptEslint.config( 11 | { 12 | extends: [ 13 | eslint.configs.recommended, 14 | ...typescriptEslint.configs.recommended, 15 | ...eslintPluginVue.configs['flat/recommended'] 16 | ], 17 | files: ['**/*.{ts,vue}'], 18 | languageOptions: { 19 | ecmaVersion: 'latest', 20 | sourceType: 'module', 21 | parserOptions: { 22 | parser: typescriptEslint.parser 23 | } 24 | }, 25 | rules: { 26 | 'no-empty': ['error', { allowEmptyCatch: true }], 27 | '@typescript-eslint/ban-ts-comment': ['off'], 28 | '@typescript-eslint/no-this-alias': 'off', 29 | '@typescript-eslint/no-explicit-any': 'warn', 30 | '@typescript-eslint/no-unused-vars': 'warn', 31 | 'vue/multi-word-component-names': 'off' 32 | } 33 | }, 34 | eslintConfigPrettier 35 | ) 36 | ] 37 | -------------------------------------------------------------------------------- /src/preload/preload.ts: -------------------------------------------------------------------------------- 1 | import fs from 'fs' 2 | import { join } from 'path' 3 | import { contextBridge } from 'electron' 4 | import { chatguessrApi } from './chatguessrApi' 5 | import whenDomReady from 'when-dom-ready' 6 | import useLoading from './useLoading' 7 | 8 | const { appendLoading, removeLoading } = useLoading() 9 | 10 | const rendererJS = fs.readFileSync(join(__dirname, 'renderer.js'), 'utf8') 11 | const rendererCSS = fs.readFileSync(join(__dirname, 'style.css'), 'utf8') 12 | 13 | whenDomReady().then(() => { 14 | appendLoading() 15 | 16 | const script = document.createElement('script') 17 | script.type = 'module' 18 | script.innerHTML = rendererJS 19 | document.body.appendChild(script) 20 | 21 | const css = document.createElement('style') 22 | css.textContent = rendererCSS 23 | document.body.appendChild(css) 24 | }) 25 | 26 | window.onmessage = (ev: MessageEvent) => { 27 | if (ev.data.payload === 'removeLoading') { 28 | removeLoading() 29 | } 30 | } 31 | setTimeout(removeLoading, 4999) 32 | 33 | // Expose protected methods off of window in order to use ipcRenderer 34 | // without exposing the entire object 35 | contextBridge.exposeInMainWorld('chatguessrApi', chatguessrApi) 36 | -------------------------------------------------------------------------------- /src/auth/styles.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --clr-primary: #59ffd8; 3 | --clr-secondary: #a159ff; 4 | --bg-color: #252525; 5 | } 6 | 7 | html { 8 | background: var(--bg-color); 9 | font-family: 'Montserrat', sans-serif; 10 | font-size: 14px; 11 | color: #fff; 12 | letter-spacing: 0.03rem; 13 | -webkit-font-smoothing: antialiased; 14 | font-weight: 300; 15 | } 16 | 17 | .container { 18 | padding: 0.5rem; 19 | } 20 | 21 | .card { 22 | background: rgba(180, 180, 180, 0.1); 23 | border-radius: 5px; 24 | box-shadow: 1px 0px 5px rgb(0, 0, 0, 0.15); 25 | padding: 0.5rem; 26 | } 27 | 28 | .center { 29 | text-align: center; 30 | } 31 | .btn { 32 | font-family: inherit; 33 | border: 0; 34 | border-radius: 5px; 35 | outline: 0; 36 | position: relative; 37 | padding: 10px; 38 | font-weight: 700; 39 | margin: 2px; 40 | color: white; 41 | cursor: pointer; 42 | transition: transform 100ms ease-in-out; 43 | box-shadow: 44 | 0 1px 3px rgb(0 0 0 / 12%), 45 | 0 1px 2px rgb(0 0 0 / 24%); 46 | } 47 | .btn:hover { 48 | transform: translateY(1px); 49 | } 50 | .btn:active { 51 | transform: translateY(2px); 52 | } 53 | 54 | .btn.twitch { 55 | background: var(--clr-secondary); 56 | } 57 | -------------------------------------------------------------------------------- /public/assets/flags/CC.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/ES.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/RW.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/CM.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/LS.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/XK.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/NZMAORI.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/LR.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/GQ.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/AD.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/USOH.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/NC.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/JE.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/MK.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/ST.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/BR.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/CN.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/GB.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/TF.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/LB.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/assets/flags/KM.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/renderer/mods/extenssr/texture.ts: -------------------------------------------------------------------------------- 1 | export default class Texture { 2 | webglContext: WebGLRenderingContext 3 | textureId: WebGLTexture 4 | constructor(gl: WebGLRenderingContext) { 5 | this.webglContext = gl 6 | this.textureId = gl.createTexture()! 7 | gl.bindTexture(gl.TEXTURE_2D, this.textureId) 8 | gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE) 9 | gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE) 10 | gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR) 11 | gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true) 12 | } 13 | fromCanvas(canvas: HTMLCanvasElement): void { 14 | const gl = this.webglContext 15 | gl.bindTexture(gl.TEXTURE_2D, this.textureId) 16 | gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas) 17 | } 18 | fromBuffer(width: number, height: number, buffer: Uint8Array): void { 19 | const gl = this.webglContext 20 | gl.bindTexture(gl.TEXTURE_2D, this.textureId) 21 | gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, buffer) 22 | } 23 | bindToActiveTexture(activeTexture: number): void { 24 | const gl = this.webglContext 25 | gl.activeTexture(gl['TEXTURE' + activeTexture]) 26 | gl.bindTexture(gl.TEXTURE_2D, this.textureId) 27 | } 28 | } 29 | --------------------------------------------------------------------------------