auto-git:

[change] src/document/migrate-scene-document.ts
This commit is contained in:
2026-04-18 19:59:39 +02:00
parent defaa4adf0
commit 4afef32d5d

View File

@@ -1847,9 +1847,12 @@ function readTerrain(value: unknown, label: string): Terrain {
const cellSize = normalizeTerrainCellSize(
expectFiniteNumber(value.cellSize, `${label}.cellSize`)
);
const heights = expectArray(value.heights, `${label}.heights`).map(
(heightValue, index) =>
expectFiniteNumber(heightValue, `${label}.heights.${index}`)
if (!Array.isArray(value.heights)) {
throw new Error(`${label}.heights must be an array.`);
}
const heights = value.heights.map((heightValue, index) =>
expectFiniteNumber(heightValue, `${label}.heights.${index}`)
);
return createTerrain({