refactor(environment): replace grass with terrain-mesh ghibli shader
This commit is contained in:
@@ -1,33 +1,20 @@
|
||||
import { TERRAIN_COLORS } from "@/data/world/terrainConfig";
|
||||
|
||||
export const GRASS_CONFIG = {
|
||||
enabled: true,
|
||||
chunkSize: 20,
|
||||
loadRadius: 30,
|
||||
unloadRadius: 34,
|
||||
updateInterval: 250,
|
||||
sampleStep: 1.15,
|
||||
jitter: 0.42,
|
||||
bladesPerCell: 2,
|
||||
maxBladesPerChunk: 720,
|
||||
bladeWidth: 0.12,
|
||||
minBladeHeight: 0.42,
|
||||
maxBladeHeight: 0.82,
|
||||
surfaceOffset: 0.06,
|
||||
baseColor: "#1f3512",
|
||||
windBendStrength: 0.42,
|
||||
windNoiseScale: 0.09,
|
||||
baseBladesPerChunk: 2600,
|
||||
bladeWidth: 0.08,
|
||||
maxBladeHeight: 0.36,
|
||||
randomHeightAmount: 0.25,
|
||||
surfaceOffset: 0.025,
|
||||
windNoiseScale: 0.9,
|
||||
baldPatchModifier: 2.5,
|
||||
falloffSharpness: 0.35,
|
||||
heightNoiseFrequency: 12,
|
||||
heightNoiseAmplitude: 3,
|
||||
maxBendAngle: 22,
|
||||
} as const;
|
||||
|
||||
export const GRASS_SURFACE_KEYS = new Set([
|
||||
"grass1",
|
||||
"grass2",
|
||||
"grass3",
|
||||
] as const);
|
||||
|
||||
export function getGrassTipColor(surfaceKey: string | null): string {
|
||||
if (surfaceKey === "grass1") return TERRAIN_COLORS.grass1.grassTipColor;
|
||||
if (surfaceKey === "grass2") return TERRAIN_COLORS.grass2.grassTipColor;
|
||||
if (surfaceKey === "grass3") return TERRAIN_COLORS.grass3.grassTipColor;
|
||||
return TERRAIN_COLORS.grass1.grassTipColor;
|
||||
}
|
||||
export const GRASS_COLORS = ["#84C66B", "#67B058", "#A3CA5B"] as const;
|
||||
|
||||
Reference in New Issue
Block a user