From c508fe4d554eb34167f4e392e68532cffeeef177 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 13 May 2026 17:23:13 +0200 Subject: [PATCH] Remove resolveSplineCorridorJunctionEdgeSettings utility function --- src/geometry/spline-corridor-junction-mesh.ts | 36 ------------------- 1 file changed, 36 deletions(-) diff --git a/src/geometry/spline-corridor-junction-mesh.ts b/src/geometry/spline-corridor-junction-mesh.ts index 3a7afec5..2dfd8cf6 100644 --- a/src/geometry/spline-corridor-junction-mesh.ts +++ b/src/geometry/spline-corridor-junction-mesh.ts @@ -72,42 +72,6 @@ function shouldConformToTerrain(options: { }); } -export function resolveSplineCorridorJunctionEdgeSettings< - TPath extends SplineCorridorJunctionMeshPathLike ->(options: { - junction: SplineCorridorJunction; - paths: readonly TPath[]; -}): TPath["road"]["edges"]["left"] | TPath["road"]["edges"]["right"] | null { - const sides = ["left", "right"] as const; - const enabledEdges: Array< - TPath["road"]["edges"]["left"] | TPath["road"]["edges"]["right"] - > = []; - - for (const connection of options.junction.connections) { - const path = - options.paths.find((candidate) => candidate.id === connection.pathId) ?? - null; - - if (path === null || !path.road.enabled) { - continue; - } - - for (const side of sides) { - const edge = path.road.edges[side]; - - if (edge.enabled && edge.width > 0) { - enabledEdges.push(edge); - } - } - } - - return ( - enabledEdges.find((edge) => edge.kind !== "softShoulder") ?? - enabledEdges[0] ?? - null - ); -} - function buildJunctionEdgeProfile( edge: ScenePathRoadEdgeSettings ): JunctionEdgeProfilePoint[] {