fix(vegetation): scale-correct sapin and buisson LOD meshes
The exported sapin-LOD and buisson-LOD models do not match their full detail counterpart's baseline scale, so they appear oversized once the LOD swap kicks in. Add MAP_LOD_SCALE_MULTIPLIERS keyed by map name (sapin: 0.5, buisson: 0.8) and apply it on top of the chunk's existing scaleMultiplier whenever the resolved model path is the LOD variant.
This commit is contained in:
@@ -25,6 +25,20 @@ export function getMapLodModelPath(modelName: string): string | null {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
export const MAP_LOD_SCALE_MULTIPLIERS = {
|
||||
sapin: 0.35,
|
||||
buisson: 0.7,
|
||||
} as const satisfies Partial<Record<keyof typeof MAP_LOD_MODEL_PATHS, number>>;
|
||||
|
||||
export function getMapLodScaleMultiplier(modelName: string): number {
|
||||
return (
|
||||
MAP_LOD_SCALE_MULTIPLIERS[
|
||||
modelName as keyof typeof MAP_LOD_SCALE_MULTIPLIERS
|
||||
] ?? 1
|
||||
);
|
||||
}
|
||||
|
||||
export function selectMapModelPathByDistance({
|
||||
distance,
|
||||
modelName,
|
||||
|
||||
Reference in New Issue
Block a user