Refactor edge geometry calculation in RuntimeHost

This commit is contained in:
2026-05-13 17:16:36 +02:00
parent b0af01a28f
commit 7415cdc8b1

View File

@@ -84,8 +84,7 @@ import {
} from "../geometry/spline-road-mesh"; } from "../geometry/spline-road-mesh";
import { import {
buildSplineCorridorJunctionEdgeMeshGeometry, buildSplineCorridorJunctionEdgeMeshGeometry,
buildSplineCorridorJunctionMeshGeometry, buildSplineCorridorJunctionMeshGeometry
resolveSplineCorridorJunctionEdgeSettings
} from "../geometry/spline-corridor-junction-mesh"; } from "../geometry/spline-corridor-junction-mesh";
import { import {
createStarterMaterialSignature, createStarterMaterialSignature,
@@ -4434,12 +4433,9 @@ export class RuntimeHost {
meshes.push(mesh); meshes.push(mesh);
} }
const edge = resolveSplineCorridorJunctionEdgeSettings({ const edge = junction.edge;
junction,
paths: runtimeScene.paths
});
const edgeGeometry = const edgeGeometry =
edge === null !edge.enabled || edge.width <= 0
? null ? null
: buildSplineCorridorJunctionEdgeMeshGeometry({ : buildSplineCorridorJunctionEdgeMeshGeometry({
junction, junction,
@@ -4448,7 +4444,7 @@ export class RuntimeHost {
edge edge
}); });
if (edge !== null && edgeGeometry !== null) { if (edgeGeometry !== null) {
const edgeMesh = new Mesh( const edgeMesh = new Mesh(
edgeGeometry, edgeGeometry,
this.createRuntimeRoadEdgeMaterial(edge) this.createRuntimeRoadEdgeMaterial(edge)