Refactor edge geometry calculation in RuntimeHost
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user