auto-git:

[change] src/rendering/terrain-layer-material.ts
This commit is contained in:
2026-05-18 16:06:35 +02:00
parent 880bbf0d3d
commit 849ce834ea

View File

@@ -62,11 +62,11 @@ export function getFallbackTerrainLayerTexture(): Texture {
export function getTerrainLayerTexture( export function getTerrainLayerTexture(
material: MaterialDef | null, material: MaterialDef | null,
textureLookup: (material: MaterialDef) => Texture textureLookup: (material: MaterialDef) => Texture | null
): Texture { ): Texture {
return material === null return material === null
? getFallbackTerrainLayerTexture() ? getFallbackTerrainLayerTexture()
: textureLookup(material); : (textureLookup(material) ?? getFallbackTerrainLayerTexture());
} }
export function getTerrainLayerPreviewColor(material: MaterialDef | null): number { export function getTerrainLayerPreviewColor(material: MaterialDef | null): number {