mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-27 06:57:15 +00:00
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:
@@ -88,6 +88,11 @@
|
||||
</select>
|
||||
<div class="form-check form-switch mb-0 small"><input class="form-check-input" type="checkbox" id="terrainToggle" data-pref="property3d.terrain" checked><label class="form-check-label" for="terrainToggle">Terrain</label></div>
|
||||
<div class="form-check form-switch mb-0 small" id="sceneryWrap" title="Every object of the zone around the property, drawn from the game client's files"><input class="form-check-input" type="checkbox" id="sceneryToggle" data-pref="property3d.scenery" checked><label class="form-check-label" for="sceneryToggle">Scenery</label></div>
|
||||
<label class="visually-hidden" for="sceneMode">Which scenes</label>
|
||||
<select id="sceneMode" class="form-select form-select-sm w-auto" data-pref="property3d.sceneMode" title="Which of the zone's scenes the scenery shows. As the game loads them: the scene under the camera, the scenes connected to it and the global scene">
|
||||
<option value="all" selected>Every scene</option>
|
||||
<option value="game">Scenes as the game loads them</option>
|
||||
</select>
|
||||
<div class="form-check form-switch mb-0 small" id="boundaryWrap"><input class="form-check-input" type="checkbox" id="boundaryToggle" data-pref="property3d.boundary" checked><label class="form-check-label" for="boundaryToggle">Build area</label></div>
|
||||
<div class="form-check form-switch mb-0 small"><input class="form-check-input" type="checkbox" id="shadowToggle" data-pref="property3d.shadows" checked><label class="form-check-label" for="shadowToggle">Shadows</label></div>
|
||||
<div class="form-check form-switch mb-0 small" title="The zone's sky, as the game draws it (with Scenery on)"><input class="form-check-input" type="checkbox" id="skyToggle" data-pref="property3d.sky" checked><label class="form-check-label" for="skyToggle">Sky</label></div>
|
||||
@@ -382,8 +387,11 @@ async function showScenery() {
|
||||
toggle.checked = false;
|
||||
toggle.disabled = true;
|
||||
document.getElementById('sceneryWrap').title = 'No scenery for this zone (the server needs client_location)';
|
||||
return;
|
||||
}
|
||||
scenery.setSceneMode(document.getElementById('sceneMode').value);
|
||||
}
|
||||
document.getElementById('sceneMode').addEventListener('change', (e) => scenery.setSceneMode(e.target.value));
|
||||
|
||||
// ---- build area (from the zone file) ----
|
||||
let boundaryAreas; // undefined: not fetched yet; null: none
|
||||
|
||||
@@ -153,6 +153,15 @@
|
||||
<div class="form-check form-switch mb-0 small" title="The zone's sky, as the game draws it (with Scenery on)"><input class="form-check-input" type="checkbox" id="skyToggle" data-pref="world3d.sky" checked><label class="form-check-label" for="skyToggle">Sky</label></div>
|
||||
<div class="form-check form-switch mb-0 small" title="Also draw, see-through, the models of objects the game doesn't draw: trigger and blocking volumes (with Scenery on)"><input class="form-check-input" type="checkbox" id="hiddenToggle" data-pref="world3d.hidden"><label class="form-check-label" for="hiddenToggle">Hidden objects</label></div>
|
||||
</div>
|
||||
<div class="fw-semibold mb-1">Scenes</div>
|
||||
<label class="visually-hidden" for="sceneMode">Which scenes</label>
|
||||
<select id="sceneMode" class="form-select form-select-sm mb-1" data-pref="world3d.sceneMode" title="Which of the zone's scenes the scenery shows. As the game loads them: the scene under the camera or the followed player, the scenes connected to it and the global scene, changing as you move">
|
||||
<option value="all" selected>Every scene</option>
|
||||
<option value="game">As the game loads them</option>
|
||||
<option value="manual">Picked scenes</option>
|
||||
</select>
|
||||
<div id="sceneStatus" class="small text-body-secondary mb-1"></div>
|
||||
<div id="sceneList" class="mb-3 small" style="max-height: 12rem; overflow-y: auto"></div>
|
||||
<div class="fw-semibold mb-1">Terrain</div>
|
||||
<div class="form-check" title="The grass, flowers and small rocks the terrain file strews over the ground, drawn near the camera like the game does (with Models on)"><input class="form-check-input" type="checkbox" id="flairToggle" data-pref="world3d.flairs" checked><label class="form-check-label" for="flairToggle">Flairs <span class="text-body-secondary" id="flairCount"></span></label></div>
|
||||
<div id="sceneLegend" class="mt-1 mb-3"></div>
|
||||
|
||||
Reference in New Issue
Block a user