From 2bf7c8fcf64673ca05b14795487dd677ffeed619 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 13 May 2026 18:49:23 +0200 Subject: [PATCH] Integrate junction edge seams into ViewportHost rendering logic --- src/viewport-three/viewport-host.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/viewport-three/viewport-host.ts b/src/viewport-three/viewport-host.ts index 415a3568..b475d344 100644 --- a/src/viewport-three/viewport-host.ts +++ b/src/viewport-three/viewport-host.ts @@ -210,7 +210,8 @@ import { } from "../geometry/spline-road-mesh"; import { buildSplineCorridorJunctionEdgeMeshGeometry, - buildSplineCorridorJunctionMeshGeometry + buildSplineCorridorJunctionMeshGeometry, + resolveSplineCorridorJunctionRoadEdgeSeams } from "../geometry/spline-corridor-junction-mesh"; import { detectSplineCorridorJunctionCandidates, @@ -7706,6 +7707,9 @@ export class ViewportHost { terrains: readonly Terrain[], clipIntervalsByPath: ReturnType< typeof resolveSplineCorridorJunctionClipIntervals + >, + roadEdgeSeamsByPath: ReturnType< + typeof resolveSplineCorridorJunctionRoadEdgeSeams > ): RoadSurfaceRenderObjects | null { if (!path.enabled || !path.visible || !path.road.enabled) { @@ -7734,7 +7738,8 @@ export class ViewportHost { path, side, terrains, - clipIntervals: clipIntervalsByPath.get(path.id) + clipIntervals: clipIntervalsByPath.get(path.id), + junctionEdgeSeams: roadEdgeSeamsByPath.get(path.id) }); if (edgeGeometry === null) { @@ -7816,12 +7821,18 @@ export class ViewportHost { junctions, terrains }); + const roadEdgeSeamsByPath = resolveSplineCorridorJunctionRoadEdgeSeams({ + paths, + junctions, + terrains + }); for (const path of paths) { const renderObjects = this.createRoadSurfaceRenderObjects( path, terrains, - clipIntervalsByPath + clipIntervalsByPath, + roadEdgeSeamsByPath ); if (renderObjects === null) {