From d5a962a1d474b9e7bfb6a5c34079e6296d4bd948 Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Wed, 11 Nov 2026 18:04:49 -0600 Subject: [PATCH] fix(dashboard): convert scenery models again now node rotations are read row by row Converted models are kept on disk and in browsers by conversion format, so without a new format the 3D views would keep drawing the old conversions with turned nodes the wrong way round. Format 7. Co-Authored-By: Claude Fable 5.2 --- dDashboardServer/routes/Scenery.cpp | 4 ++-- dDashboardServer/static/js/scenery-core.js | 2 +- docs/Dashboard.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dDashboardServer/routes/Scenery.cpp b/dDashboardServer/routes/Scenery.cpp index 7f47833d3..ae9d19a99 100644 --- a/dDashboardServer/routes/Scenery.cpp +++ b/dDashboardServer/routes/Scenery.cpp @@ -279,9 +279,9 @@ namespace { * isn't drawn with newer code. 2: meshes carry their multishader tag; conversions without it drew glom parts with * the LEGO shader. 3: dark textures and the UV set each texture names. 4: the game's shaders draw the models * (manifest "techniques"), vertex colors go to them as stored. 5: an animated material alpha is its highest key. 6: flair tints are bytes over - * 255 (they were over 63). + * 255 (they were over 63). 7: node rotations are read row by row, so models with turned nodes are converted again. */ - constexpr uint32_t FORMAT_VERSION = 6; + constexpr uint32_t FORMAT_VERSION = 7; // A zone's lighting (WorldScene::Lighting) for the viewers' shaders nlohmann::json LightingJson(const WorldScene::Lighting& lighting) { diff --git a/dDashboardServer/static/js/scenery-core.js b/dDashboardServer/static/js/scenery-core.js index 34f40c0c5..f8022806b 100644 --- a/dDashboardServer/static/js/scenery-core.js +++ b/dDashboardServer/static/js/scenery-core.js @@ -183,7 +183,7 @@ export const TECHNIQUE = { * The conversion format (Scenery.cpp FORMAT_VERSION) these views are written for. Manifest URLs carry it, so a * browser never draws with a manifest it kept from an older server (they are cached for up to a day). */ -export const SCENERY_FORMAT = 6; +export const SCENERY_FORMAT = 7; /** A manifest URL asking for SCENERY_FORMAT's manifest (the server ignores the parameter; browsers cache by it). */ export function manifestUrl(url) { diff --git a/docs/Dashboard.md b/docs/Dashboard.md index 7a7ea1de8..4a571eb4e 100644 --- a/docs/Dashboard.md +++ b/docs/Dashboard.md @@ -1530,7 +1530,7 @@ Powerups, Orb, TV Screen and Head Icon effects (drawn as LEGO or unlit), Flair's client's environment textures come from `/api/scenery/env/:name` (`reflection`, `polished`, `brushed`, `brushedNoise`). Placed player models are drawn by the viewer's own lighting. -The views ask for a zone's manifest with the conversion format they're written for (`?format=6`, +The views ask for a zone's manifest with the conversion format they're written for (`?format=7`, `scenery-core.js` `SCENERY_FORMAT`, which follows `Scenery.cpp` `FORMAT_VERSION`), since browsers keep manifests for up to a day. A manifest without `techniques` (an older server's) is drawn with the viewer's own lights and its `textureAlpha` table instead of guessing every shader as LEGO, which laid see-through textures over white vertex