From dff2838436f33ae92bd055e957915ee7bcca94ff Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 13 May 2026 16:49:08 +0200 Subject: [PATCH] Fix vertex height calculation using edge height scale and refactor run processing --- src/geometry/spline-road-mesh.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/geometry/spline-road-mesh.ts b/src/geometry/spline-road-mesh.ts index 76e61b32..39159d56 100644 --- a/src/geometry/spline-road-mesh.ts +++ b/src/geometry/spline-road-mesh.ts @@ -683,7 +683,12 @@ export function buildSplineRoadEdgeMeshData(options: { ); let stationCount = 0; - for (const run of stationRuns) { + for (const rawRun of stationRuns) { + const run = buildEdgeStationRunWithJunctionTapers({ + run: rawRun, + clipIntervals: options.clipIntervals ?? [], + edge + }); const runVertexOffset = positions.length / 3; for (let stationIndex = 0; stationIndex < run.length; stationIndex += 1) { @@ -716,7 +721,7 @@ export function buildSplineRoadEdgeMeshData(options: { positions.push( vertex.x, - vertex.y + profilePoint.heightOffset, + vertex.y + profilePoint.heightOffset * station.edgeHeightScale, vertex.z ); uvs.push(profileIndex / profileLastIndex, station.distance);