auto-git:

[change] src/app/App.tsx
 [change] src/app/app.css
 [change] src/assets/image-assets.ts
 [change] src/commands/create-custom-material-command.ts
 [change] src/commands/set-custom-material-texture-command.ts
 [change] src/commands/update-custom-material-command.ts
 [change] src/document/migrate-scene-document.ts
 [change] src/rendering/terrain-layer-material.ts
 [change] src/runtime-three/runtime-host.ts
This commit is contained in:
2026-05-18 16:20:41 +02:00
parent 977b4cccea
commit 1fb96650c5
9 changed files with 200 additions and 105 deletions

View File

@@ -69,7 +69,9 @@ export function getTerrainLayerTexture(
: (textureLookup(material) ?? getFallbackTerrainLayerTexture());
}
export function getTerrainLayerPreviewColor(material: MaterialDef | null): number {
export function getTerrainLayerPreviewColor(
material: MaterialDef | null
): number {
return material === null
? new Color("#aea79a").getHex()
: new Color(material.swatchColorHex).getHex();
@@ -86,7 +88,9 @@ function createPaddedTerrainLayerTextures(
);
}
function createPaddedTerrainLayerColors(layerColors: readonly number[]): Color[] {
function createPaddedTerrainLayerColors(
layerColors: readonly number[]
): Color[] {
const fallbackColor = getTerrainLayerPreviewColor(null);
return Array.from(