diff --git a/src/app/App.tsx b/src/app/App.tsx index ef001ac8..3ced4e9f 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -9613,6 +9613,7 @@ export function App({ sampledResolution: selectedPath.sampledResolution, glueToTerrain: selectedPath.glueToTerrain, terrainOffset: selectedPath.terrainOffset, + road: selectedPath.road, points: selectedPath.points.map((point, index) => ({ id: point.id, position: readVec3Draft( @@ -9718,6 +9719,27 @@ export function App({ commitPathChange(selectedPath, nextPath, "Updated Path terrain offset."); }; + const handlePathRoadChange = ( + road: ScenePath["road"], + successMessage: string + ) => { + if (selectedPath === null) { + setStatusMessage("Select a path before changing road settings."); + return; + } + + try { + const nextPath = createScenePath({ + ...selectedPath, + road + }); + + commitPathChange(selectedPath, nextPath, successMessage); + } catch (error) { + setStatusMessage(getErrorMessage(error)); + } + }; + const handlePathPointDraftChange = ( pointIndex: number, axis: keyof Vec3Draft,