fix(graphics): tune presets, single-line ui, vegetation LOD by nearest instance
🔍 Lint / 🪄 Check lint (push) Has been cancelled
🔍 Lint / 🎨 Check format (push) Has been cancelled
🔍 Lint / 🔎 Typecheck (push) Has been cancelled
📊 Quality / 🔒 Security Audit (push) Has been cancelled
📊 Quality / 📋 Dependency Freshness (push) Has been cancelled
📊 Quality / 📦 Bundle Size (push) Has been cancelled
🔍 Lint / 🏗 Build (push) Has been cancelled

- Bump high to 30m chunk / HD<20m and ultra to HD<30m so HD models
  persist further before swapping.
- Render the 5 graphics preset cards on a single row.
- Vegetation LOD selection now uses the distance to the nearest instance
  in each chunk instead of the chunk centre, matching MapInstancingSystem
  and avoiding premature LOD swaps when the camera enters a chunk.
This commit is contained in:
Tom Boullay
2026-06-02 14:33:16 +02:00
parent 627c8d4eb9
commit 4f1b3b4ff3
3 changed files with 15 additions and 10 deletions
+4 -4
View File
@@ -39,12 +39,12 @@ export const GRAPHICS_PRESETS = {
},
high: {
label: "High",
chunkLoadRadius: 35,
chunkUnloadRadius: 45,
chunkLoadRadius: 30,
chunkUnloadRadius: 40,
chunkStreamingEnabled: true,
fogEnabled: false,
forceLodModels: false,
lodHighDetailDistance: 10,
lodHighDetailDistance: 20,
},
ultra: {
label: "Ultra",
@@ -53,7 +53,7 @@ export const GRAPHICS_PRESETS = {
chunkStreamingEnabled: true,
fogEnabled: false,
forceLodModels: false,
lodHighDetailDistance: 20,
lodHighDetailDistance: 30,
},
max: {
label: "Max",
+1 -1
View File
@@ -1544,7 +1544,7 @@ canvas {
}
.game-settings-menu__choice-group--presets {
grid-template-columns: repeat(4, minmax(0, 1fr));
grid-template-columns: repeat(5, minmax(0, 1fr));
}
.game-settings-menu__choice-group button,
+8 -3
View File
@@ -109,12 +109,17 @@ function useVegetationChunkModelPaths(
const next = new Map<string, string>();
for (const chunk of chunks) {
let nearestDistance = Number.POSITIVE_INFINITY;
for (const instance of chunk.instances) {
const distance = Math.hypot(
chunk.centerX - cameraX,
chunk.centerZ - cameraZ,
instance.position[0] - cameraX,
instance.position[2] - cameraZ,
);
if (distance < nearestDistance) nearestDistance = distance;
}
const modelPath = selectMapModelPathByDistance({
distance,
distance: nearestDistance,
modelName: VEGETATION_TYPES[chunk.type].mapName,
modelPath: chunk.modelPath,
preset,