diff --git a/apps/web/src/app/games/complement-race/components/RaceTrack/SteamTrainJourney.tsx b/apps/web/src/app/games/complement-race/components/RaceTrack/SteamTrainJourney.tsx index 99ea744d..2abd7553 100644 --- a/apps/web/src/app/games/complement-race/components/RaceTrack/SteamTrainJourney.tsx +++ b/apps/web/src/app/games/complement-race/components/RaceTrack/SteamTrainJourney.tsx @@ -13,6 +13,7 @@ import { getRouteTheme } from '../../lib/routeThemes' import { PressureGauge } from '../PressureGauge' import { useGameMode } from '@/contexts/GameModeContext' import { useUserProfile } from '@/contexts/UserProfileContext' +import { TrainTerrainBackground } from './TrainTerrainBackground' const BoardingPassengerAnimation = memo(({ animation }: { animation: BoardingAnimation }) => { const spring = useSpring({ @@ -241,183 +242,12 @@ export function SteamTrainJourney({ momentum, trainPosition, pressure, elapsedTi overflow: 'visible' }} > - {/* Gradient definitions for mountain shading and ground */} - - - - - - - - - - - - - - - - - - {/* Ground layer - extends full width and height to cover entire track area */} - - {/* Ground surface gradient for depth */} - - - {/* Ground texture - scattered rocks/pebbles */} - {groundTextureCircles.map((circle) => ( - - ))} - - {/* Railroad ballast (gravel bed) */} - - - {/* Left mountain and tunnel */} - - {/* Mountain base - extends from left edge */} - - - {/* Mountain peak - triangular slope */} - - - {/* Mountain ridge shading */} - - - - {/* Tunnel depth/interior (dark entrance) */} - - - {/* Tunnel arch opening */} - - - {/* Tunnel arch rim (stone bricks) */} - - - {/* Stone brick texture around arch */} - - - - {/* Right mountain and tunnel */} - - {/* Mountain base - extends to right edge */} - - - {/* Mountain peak - triangular slope */} - - - {/* Mountain ridge shading */} - - - - {/* Tunnel depth/interior (dark entrance) */} - - - {/* Tunnel arch opening */} - - - {/* Tunnel arch rim (stone bricks) */} - - - {/* Stone brick texture around arch */} - - - {/* Railroad ties */} {tiesAndRails?.ties.map((tie, index) => ( +} + +export const TrainTerrainBackground = memo(({ ballastPath, groundTextureCircles }: TrainTerrainBackgroundProps) => { + return ( + <> + {/* Gradient definitions for mountain shading and ground */} + + + + + + + + + + + + + + + + + + {/* Ground layer - extends full width and height to cover entire track area */} + + + {/* Ground surface gradient for depth */} + + + {/* Ground texture - scattered rocks/pebbles */} + {groundTextureCircles.map((circle) => ( + + ))} + + {/* Railroad ballast (gravel bed) */} + + + {/* Left mountain and tunnel */} + + {/* Mountain base - extends from left edge */} + + + {/* Mountain peak - triangular slope */} + + + {/* Mountain ridge shading */} + + + + {/* Tunnel depth/interior (dark entrance) */} + + + {/* Tunnel arch opening */} + + + {/* Tunnel arch rim (stone bricks) */} + + + {/* Stone brick texture around arch */} + + + + {/* Right mountain and tunnel */} + + {/* Mountain base - extends to right edge */} + + + {/* Mountain peak - triangular slope */} + + + {/* Mountain ridge shading */} + + + + {/* Tunnel depth/interior (dark entrance) */} + + + {/* Tunnel arch opening */} + + + {/* Tunnel arch rim (stone bricks) */} + + + {/* Stone brick texture around arch */} + + + + ) +}) + +TrainTerrainBackground.displayName = 'TrainTerrainBackground'