Merge webgl2 — full WebGL2 renderer migration

relates to #893

Replaces the canvas2D + Pixi.js map renderer with a pure WebGL2 pipeline.
Map-space visuals (terrain, names, structures, units, FX, selection
boxes, build ghosts, status icons, nuke trajectories, defense zones,
spawn glow, water-nuke terrain deltas) all render through dedicated
passes in src/client/render/gl/passes/. Controllers in
src/client/controllers/ push state directly to the WebGL view; no
relay events. Assets unified under resources/ + assetUrl(). Mode
toggle wired to the existing darkMode UserSetting (no more day/night
cycle). One input system (InputHandler + EventBus + TransformHandler).

Known regressions to address in follow-up work:

- [ ] webgl: highlight structures when hover on build menu
- [ ] webgl: custom flags, flag atlas
- [ ] webgl: territory patterns
- [ ] webgl: defense post outline
- [ ] webgl: territory expanse smoothing
This commit is contained in:
evanpelle
2026-05-18 12:09:11 -07:00
257 changed files with 55112 additions and 10067 deletions
+68
View File
@@ -0,0 +1,68 @@
{
"width": 1280,
"height": 768,
"cellSize": 128,
"cols": 10,
"emojis": {
"😀": 0,
"😊": 1,
"🥰": 2,
"😇": 3,
"😎": 4,
"😞": 5,
"🥺": 6,
"😭": 7,
"😱": 8,
"😡": 9,
"😈": 10,
"🤡": 11,
"🥱": 12,
"🫡": 13,
"🖕": 14,
"👋": 15,
"👏": 16,
"✋": 17,
"🙏": 18,
"💪": 19,
"👍": 20,
"👎": 21,
"🫴": 22,
"🤌": 23,
"🤦‍♂️": 24,
"🤝": 25,
"🆘": 26,
"🕊️": 27,
"🏳️": 28,
"⌛": 29,
"🔥": 30,
"💥": 31,
"💀": 32,
"☢️": 33,
"⚠️": 34,
"↖️": 35,
"⬆️": 36,
"↗️": 37,
"👑": 38,
"🥇": 39,
"⬅️": 40,
"🎯": 41,
"➡️": 42,
"🥈": 43,
"🥉": 44,
"↙️": 45,
"⬇️": 46,
"↘️": 47,
"❤️": 48,
"💔": 49,
"💰": 50,
"⚓": 51,
"⛵": 52,
"🏡": 53,
"🛡️": 54,
"🏭": 55,
"🚂": 56,
"❓": 57,
"🐔": 58,
"🐀": 59
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

+568
View File
@@ -0,0 +1,568 @@
{
"width": 2048,
"height": 2975,
"cellW": 128,
"cellH": 85,
"cols": 16,
"flags": {
"1_Airgialla": 0,
"1_Connacht": 1,
"1_Dalriata": 2,
"1_Dumnonia": 3,
"1_Dyfed": 4,
"1_East Anglia": 5,
"1_Essex": 6,
"1_Fortriu": 7,
"1_Franks": 8,
"1_Gwent": 9,
"1_Gwynedd": 10,
"1_Kent": 11,
"1_Laigin": 12,
"1_Mercia": 13,
"1_Munster": 14,
"1_Northern Ui Neill": 15,
"1_Northumbria": 16,
"1_Occitania": 17,
"1_Powys": 18,
"1_Southern Ui Neill": 19,
"1_Strathclyde": 20,
"1_Sussex": 21,
"1_Ulaid": 22,
"1_Wessex": 23,
"Abbasid Caliphate": 24,
"Achaemenid Empire": 25,
"African union": 26,
"Alabama": 27,
"Alaska": 28,
"Alkebulan": 29,
"Amazigh flag": 30,
"American_Samoa": 31,
"Anarchist flag": 32,
"Apartheid South Africa": 33,
"Arabia": 34,
"Aram Damascus": 35,
"Arizona": 36,
"Arkansas": 37,
"Assyria": 38,
"Athens": 39,
"Australian Aboriginal Flag": 40,
"Aztec Empire": 41,
"Babylonia": 42,
"Burma": 43,
"Burma2": 44,
"Byelorussian SSR": 45,
"Byzantine Empire": 46,
"California": 47,
"Capybara": 48,
"Carthage": 49,
"Ceara": 50,
"Chinook": 51,
"Chuvashia": 52,
"Circassia": 53,
"Colchis": 54,
"Colorado": 55,
"Communist Romania": 56,
"Communist flag": 57,
"Confederate States": 58,
"Connecticut": 59,
"Corsica": 60,
"Cthulhu Republic": 61,
"Danzig": 62,
"Delaware": 63,
"Dilmun": 64,
"District_of_Columbia": 65,
"Dutch East India Company": 66,
"Elam": 67,
"Empire of Japan": 68,
"Empire of Japan1": 69,
"Essex": 70,
"Fascist Spain": 71,
"Flag_of_the_Trucial_States_(19681971)": 72,
"Flanders": 73,
"Florida": 74,
"Franks": 75,
"French foreign legion": 76,
"Garamant": 77,
"Georgia_US": 78,
"Georgian SSR": 79,
"German Empire": 80,
"Guam": 81,
"Habsburg Austria": 82,
"Hawaii": 83,
"Holy Roman Empire": 84,
"Hyrcania": 85,
"Idaho": 86,
"Illinois": 87,
"Imperial Ethiopia": 88,
"Indiana": 89,
"Iowa": 90,
"Kansas": 91,
"Kazakh SSR": 92,
"Kemet": 93,
"Kent": 94,
"Kentucky": 95,
"Khemet": 96,
"Kingdom of Egypt": 97,
"Kingdom of Iraq": 98,
"Kingdom of Jerusalem": 99,
"Kingdom of Judah": 100,
"Kingdom_of_Iraq": 101,
"Kingdom_of_Judah": 102,
"Kiwi": 103,
"Kush": 104,
"Laigin": 105,
"League of Nations": 106,
"Leinster": 107,
"Liberalism_flag": 108,
"Libyan Jamahiriya": 109,
"Lihyan": 110,
"Listenbourg": 111,
"Louisiana": 112,
"Lower Silesia": 113,
"Lydia": 114,
"Macedonia": 115,
"Maine": 116,
"Maori flag": 117,
"Maryland": 118,
"Massachusetts": 119,
"Mauritania": 120,
"Median Empire": 121,
"Michigan": 122,
"Minnesota": 123,
"Mississippi": 124,
"Missouri": 125,
"Mongol Empire": 126,
"Montana": 127,
"Munster": 128,
"NATO": 129,
"Nebraska": 130,
"Nevada": 131,
"New_Hampshire": 132,
"New_Jersey": 133,
"New_Mexico": 134,
"New_York": 135,
"Newfoundland": 136,
"North karelia": 137,
"North yemen": 138,
"North_Carolina": 139,
"North_Dakota": 140,
"Northern_Mariana_Islands": 141,
"Nunavut": 142,
"OFM": 143,
"Ohio": 144,
"Oklahoma": 145,
"Oregon": 146,
"Ottoman Empire": 147,
"Pahlavi Iran": 148,
"Palekh": 149,
"Para": 150,
"Pennsylvania": 151,
"Persia": 152,
"Phrygia": 153,
"Poland Lithuania": 154,
"PolishLithuanian Commonwealth": 155,
"Qing Dynasty": 156,
"Quebec": 157,
"Republic of China": 158,
"Republic of Egypt": 159,
"Republic of Formosa": 160,
"Republic of Korea": 161,
"Republic of Pirates": 162,
"Rhode_Island": 163,
"Rhodesia": 164,
"Romanov Russia": 165,
"Ror Empire": 166,
"Russian SSR": 167,
"SPQR": 168,
"Saba kingdom": 169,
"Sakhalin": 170,
"Sami flag": 171,
"Santa Cruz": 172,
"Sao Paulo": 173,
"Sassanid Empire": 174,
"Second Republic of Iraq": 175,
"Second Spanish Republic": 176,
"Siam": 177,
"Siberia": 178,
"Sicily": 179,
"Socialist_flag": 180,
"South Vietnam": 181,
"South_Carolina": 182,
"South_Dakota": 183,
"Sparta": 184,
"Sultanate of Nejd": 185,
"Sweden Norway Union": 186,
"Tennessee": 187,
"Texas": 188,
"Trucial States": 189,
"Turkmen SSR": 190,
"USA 1776": 191,
"Ukrainian SSR": 192,
"Ulaid": 193,
"Umayyad Caliphate": 194,
"United Arab Republic": 195,
"United_States_Virgin_Islands": 196,
"Upper Silesia": 197,
"Urartu": 198,
"Utah": 199,
"Vermont": 200,
"Virginia": 201,
"Wallonia": 202,
"Washington": 203,
"Wassex": 204,
"West Roman Empire": 205,
"West_Virginia": 206,
"Wisconsin": 207,
"Wyoming": 208,
"Yellow_Flag": 209,
"Yukon": 210,
"Zaire": 211,
"Zheleznogorsk": 212,
"ac": 213,
"ad": 214,
"ae": 215,
"af": 216,
"ag": 217,
"ai": 218,
"al": 219,
"am": 220,
"amazonas": 221,
"an_pe": 222,
"antipope": 223,
"ao": 224,
"aq": 225,
"aquitaine": 226,
"ar": 227,
"armagnac": 228,
"as": 229,
"asturias": 230,
"at": 231,
"au": 232,
"aus_norter": 233,
"aus_nsw": 234,
"aus_quelan": 235,
"aus_souaus": 236,
"aus_tas": 237,
"aus_vic": 238,
"aus_wesaus": 239,
"austria-hungary": 240,
"aw": 241,
"ax": 242,
"az": 243,
"ba": 244,
"baguette": 245,
"bahia": 246,
"bai_bur": 247,
"bai_irk": 248,
"bb": 249,
"bd": 250,
"be": 251,
"bf": 252,
"bg": 253,
"bh": 254,
"bi": 255,
"bj": 256,
"bl": 257,
"bm": 258,
"bn": 259,
"bo": 260,
"bq": 261,
"br": 262,
"brittany": 263,
"bs": 264,
"bt": 265,
"buenos_aires": 266,
"bulgaria": 267,
"burgundy": 268,
"bv": 269,
"bw": 270,
"by": 271,
"bz": 272,
"ca": 273,
"ca_nb": 274,
"ca_ns": 275,
"ca_pe": 276,
"castille": 277,
"catalonia": 278,
"catamarca": 279,
"cc": 280,
"cd": 281,
"cf": 282,
"cg": 283,
"ch": 284,
"ci": 285,
"ck": 286,
"cl": 287,
"cm": 288,
"cn": 289,
"co": 290,
"cordoba": 291,
"cp": 292,
"cr": 293,
"cu": 294,
"cv": 295,
"cw": 296,
"cx": 297,
"cy": 298,
"cz": 299,
"de": 300,
"denmark": 301,
"dg": 302,
"dj": 303,
"dk": 304,
"dm": 305,
"do": 306,
"dz": 307,
"east_germany": 308,
"ec": 309,
"ee": 310,
"eg": 311,
"eh": 312,
"eo": 313,
"er": 314,
"es-ct": 315,
"es-ga": 316,
"es-pv": 317,
"es": 318,
"estonia": 319,
"et": 320,
"eu": 321,
"fi": 322,
"finland": 323,
"fj": 324,
"fk": 325,
"fm": 326,
"fo": 327,
"fr": 328,
"frost_giant": 329,
"ga": 330,
"galapagos": 331,
"gb-eng": 332,
"gb-sct": 333,
"gb-wls": 334,
"gb": 335,
"gd": 336,
"ge": 337,
"gf": 338,
"gg": 339,
"gh": 340,
"gi": 341,
"gl": 342,
"gm": 343,
"gn": 344,
"gp": 345,
"gq": 346,
"gr": 347,
"granada": 348,
"greece": 349,
"gs": 350,
"gt": 351,
"gu": 352,
"gw": 353,
"gy": 354,
"ha_ma": 355,
"hk": 356,
"hm": 357,
"hn": 358,
"hr": 359,
"ht": 360,
"hu": 361,
"hungary": 362,
"ic": 363,
"iceland": 364,
"id": 365,
"ie": 366,
"il": 367,
"im": 368,
"in": 369,
"io": 370,
"iq": 371,
"ir": 372,
"iraq": 373,
"ireland": 374,
"is": 375,
"it": 376,
"italy": 377,
"je": 378,
"jm": 379,
"jo": 380,
"jp": 381,
"ke": 382,
"kg": 383,
"kh": 384,
"ki": 385,
"km": 386,
"kn": 387,
"kp": 388,
"kr": 389,
"kurdistan": 390,
"kw": 391,
"ky": 392,
"kz": 393,
"la": 394,
"latvia": 395,
"lb": 396,
"lc": 397,
"leon": 398,
"li": 399,
"lithuania": 400,
"lk": 401,
"lr": 402,
"ls": 403,
"lt": 404,
"lu": 405,
"lv": 406,
"ly": 407,
"ma": 408,
"mc": 409,
"md": 410,
"me": 411,
"mf": 412,
"mg": 413,
"mh": 414,
"minas_gerais": 415,
"mk": 416,
"ml": 417,
"mm": 418,
"mn": 419,
"mo": 420,
"mp": 421,
"mq": 422,
"mr": 423,
"ms": 424,
"mt": 425,
"mu": 426,
"mv": 427,
"mw": 428,
"mx": 429,
"my": 430,
"mz": 431,
"na": 432,
"nc": 433,
"ne": 434,
"netherlands": 435,
"neuragic_empire": 436,
"nf": 437,
"ng": 438,
"ni": 439,
"nl": 440,
"no": 441,
"normandy": 442,
"northern_ireland": 443,
"norway": 444,
"np": 445,
"nr": 446,
"nu": 447,
"nz": 448,
"om": 449,
"pa": 450,
"paris": 451,
"pe": 452,
"pf": 453,
"pg": 454,
"ph": 455,
"pk": 456,
"pl": 457,
"pm": 458,
"pn": 459,
"poland": 460,
"polar_bears": 461,
"portugal": 462,
"pr": 463,
"provence": 464,
"prussia": 465,
"ps": 466,
"pt": 467,
"pw": 468,
"py": 469,
"qa": 470,
"re": 471,
"rio_de_janeiro": 472,
"ro": 473,
"rs": 474,
"ru": 475,
"rw": 476,
"sa": 477,
"santa_claus": 478,
"santa_cruz": 479,
"sardines": 480,
"sb": 481,
"sc": 482,
"sd": 483,
"se": 484,
"seville": 485,
"sg": 486,
"sh-ac": 487,
"sh-hl": 488,
"sh-ta": 489,
"sh": 490,
"sh_yugo": 491,
"si": 492,
"sj": 493,
"sk": 494,
"sl": 495,
"sm": 496,
"sn": 497,
"so": 498,
"south yemen": 499,
"spain": 500,
"spanish_empire": 501,
"sr": 502,
"ss": 503,
"st": 504,
"sv": 505,
"sweden": 506,
"sx": 507,
"sy": 508,
"sz": 509,
"ta": 510,
"tc": 511,
"td": 512,
"tf": 513,
"tg": 514,
"th": 515,
"tibet": 516,
"tj": 517,
"tk": 518,
"tl": 519,
"tm": 520,
"tn": 521,
"to": 522,
"toki_pona": 523,
"tr": 524,
"tt": 525,
"tv": 526,
"tw": 527,
"tz": 528,
"ua": 529,
"ug": 530,
"uk": 531,
"uk_us_flag": 532,
"um": 533,
"un": 534,
"us": 535,
"ussr": 536,
"uy": 537,
"uz": 538,
"va": 539,
"valencia": 540,
"vc": 541,
"ve": 542,
"venice": 543,
"vg": 544,
"vi": 545,
"vn": 546,
"vu": 547,
"west_germany": 548,
"wf": 549,
"ws": 550,
"xk": 551,
"xx": 552,
"ye": 553,
"yt": 554,
"yugoslavia": 555,
"za": 556,
"zm": 557,
"zw": 558
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 995 KiB

+78
View File
@@ -0,0 +1,78 @@
{
"width": 540,
"height": 242,
"rows": [
{
"yOffset": 0,
"height": 60,
"worldWidth": 60,
"worldHeight": 60
},
{
"yOffset": 60,
"height": 38,
"worldWidth": 48,
"worldHeight": 38
},
{
"yOffset": 98,
"height": 15,
"worldWidth": 17,
"worldHeight": 15
},
{
"yOffset": 113,
"height": 19,
"worldWidth": 19,
"worldHeight": 19
},
{
"yOffset": 132,
"height": 12,
"worldWidth": 13,
"worldHeight": 12
},
{
"yOffset": 144,
"height": 14,
"worldWidth": 16,
"worldHeight": 14
},
{
"yOffset": 158,
"height": 13,
"worldWidth": 7,
"worldHeight": 13
},
{
"yOffset": 171,
"height": 12,
"worldWidth": 11,
"worldHeight": 12
},
{
"yOffset": 183,
"height": 16,
"worldWidth": 24,
"worldHeight": 16
},
{
"yOffset": 199,
"height": 16,
"worldWidth": 24,
"worldHeight": 16
},
{
"yOffset": 215,
"height": 7,
"worldWidth": 9,
"worldHeight": 7
},
{
"yOffset": 222,
"height": 20,
"worldWidth": 21,
"worldHeight": 20
}
]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 510 KiB

+19
View File
@@ -0,0 +1,19 @@
{
"width": 768,
"height": 1024,
"cellSize": 256,
"cols": 3,
"pad": 16,
"icons": {
"crown": 0,
"traitor": 1,
"disconnected": 2,
"alliance": 3,
"allianceRequest": 4,
"target": 5,
"embargo": 6,
"nukeRed": 7,
"nukeWhite": 8,
"allianceFaded": 9
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B