feat(world): add map lod graphics presets

This commit is contained in:
Tom Boullay
2026-05-31 19:03:55 +02:00
parent 564a455520
commit 34c198ebfd
13 changed files with 717 additions and 131 deletions
@@ -4,6 +4,7 @@ import { FOG_CONFIG, type FogState } from "@/data/world/fogConfig";
import { WIND_DEFAULTS, type WindState } from "@/data/world/windConfig";
import {
GRAPHICS_DEFAULTS,
type GraphicsPreset,
type GraphicsState,
} from "@/data/world/graphicsConfig";
@@ -21,6 +22,7 @@ interface WorldSettingsActions {
setWindSpeed: (speed: number) => void;
setWindDirection: (direction: number) => void;
setWindStrength: (strength: number) => void;
setGraphicsPreset: (preset: GraphicsPreset) => void;
setGraphics: (graphics: Partial<GraphicsState>) => void;
setDynamicGrass: (enabled: boolean) => void;
setDynamicTrees: (enabled: boolean) => void;
@@ -82,6 +84,11 @@ export const useWorldSettingsStore = create<WorldSettingsStore>()((set) => ({
graphics: { ...state.graphics, ...graphicsUpdate },
})),
setGraphicsPreset: (preset) =>
set((state) => ({
graphics: { ...state.graphics, preset },
})),
setDynamicGrass: (dynamicGrass) =>
set((state) => ({
graphics: { ...state.graphics, dynamicGrass },