feat(dashboard): 3D views show a zone's scenes as the game loads them

A "Scenes" choice in the world and property 3D views: every scene (as
before), the scenes the game keeps loaded around the camera or the followed
player (the scene under it from the terrain's scene map, the scenes its
transitions connect to, and the global scene, following as it moves), or
scenes picked from a list (world view). The lighting blends to the lighting
of the scene under the focus, as the client blends between scenes.

The scenery manifest now carries each object's scene, the zone's scenes with
their neighbours and lighting, and the scene map as runs (37 KB for Avant
Gardens); scenery-core.js finds the scene at a point exactly as ZoneScenes
does (checked against it on 2000 points of Avant Gardens).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-27 22:13:22 -05:00
parent 1b9724a7ec
commit 4df36c9849
12 changed files with 318 additions and 15 deletions

View File

@@ -63,6 +63,16 @@ TEST(ZoneScenesTests, LoadsTheConnectedScenes) {
EXPECT_TRUE(graph.Neighbours(9).empty());
}
TEST(ZoneScenesTests, SendsSceneMapsAsRuns) {
std::vector<uint8_t> cells(300, 4);
cells[0] = 1;
cells[299] = 2;
// 1, then 298 fours (a run is at most 255 long), then 2; only the first `count` cells count
EXPECT_EQ(ZoneScenes::RunLengths(cells, 300), std::string("\x01\x01\xFF\x04\x2B\x04\x01\x02", 8));
EXPECT_EQ(ZoneScenes::RunLengths(cells, 1), std::string("\x01\x01", 2));
EXPECT_EQ(ZoneScenes::RunLengths(cells, 1000).size(), 8u);
}
TEST(ZoneScenesTests, GhostsObjectsByTheirScene) {
const std::set<uint32_t> loaded{ 0, 1, 2 };
EXPECT_TRUE(ZoneScenes::InLoadedScene(2, 7, loaded)); // placed in a loaded scene, wherever it is now