mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-28 11:00:31 +00:00
delete canvas2D NameLayer; render names via WebGL NamePass
Stop drawing names on canvas2D — NamePass already gets the placement data (gameView.frameData().names) and lerps positions in-shader. Drop the runtime passEnabled.name=false override in ClientGameRunner, remove NameLayer from the layers list, and delete NameLayer.ts. Known gaps (deferred): - Player-uploaded flags not in the bundled atlas render as no-flag; needs a JIT atlas built at game start. - The shared computePlayerStatus is the replay variant, so the alliance / target / embargo / nukeTargetsMe status icons stay off for the local player's perspective. Needs a live-aware variant.
This commit is contained in:
@@ -286,10 +286,6 @@ function mountWebGLDebugRenderer(
|
||||
captureCaf,
|
||||
);
|
||||
|
||||
// Names are rendered by the existing HTML NameLayer; disable the renderer's
|
||||
// NamePass to avoid drawing them twice.
|
||||
view.getSettings().passEnabled.name = false;
|
||||
|
||||
window.addEventListener("keydown", (e) => {
|
||||
if (e.key === "\\") {
|
||||
glCanvas.style.display =
|
||||
|
||||
Reference in New Issue
Block a user