Define structures for runtime terrain rendering data

This commit is contained in:
2026-04-29 23:01:45 +02:00
parent 7808ac8567
commit 1717c38c47

View File

@@ -239,6 +239,19 @@ interface CachedMaterialTexture {
textureSet: StarterMaterialTextureSet; textureSet: StarterMaterialTextureSet;
} }
interface RuntimeTerrainRenderChunkObjects {
levels: Mesh<BufferGeometry, Material>[];
activeLevelIndex: number;
worldCenter: Vector3;
diagonal: number;
}
interface RuntimeTerrainRenderObjects {
group: Group;
chunks: RuntimeTerrainRenderChunkObjects[];
material: Material;
}
function createRuntimeGeometryBrush(brush: RuntimeBoxBrushInstance): Brush { function createRuntimeGeometryBrush(brush: RuntimeBoxBrushInstance): Brush {
const faces = Object.fromEntries( const faces = Object.fromEntries(
Object.entries(brush.faces).map(([faceId, face]) => [ Object.entries(brush.faces).map(([faceId, face]) => [