auto-git:
[change] src/rendering/terrain-layer-material.ts
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user