From f866c728274db2cb9e4408b2dcf62d2142cdfde2 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 5 Apr 2026 04:25:41 +0000 Subject: [PATCH] Add roads parks trees and cars to city scene Co-authored-by: Luke The Dev --- .../retro-office/scene/environment.tsx | 183 ++++++++++++++++++ 1 file changed, 183 insertions(+) diff --git a/src/features/retro-office/scene/environment.tsx b/src/features/retro-office/scene/environment.tsx index d94bd36..e46616f 100644 --- a/src/features/retro-office/scene/environment.tsx +++ b/src/features/retro-office/scene/environment.tsx @@ -335,6 +335,77 @@ function TownhouseBlock({ ); } +function StreetTree({ + position, + canopyColor = "#3f9142", +}: { + position: [number, number, number]; + canopyColor?: string; +}) { + return ( + + + + + + + + + + + + + + + + + + + ); +} + +function CompactCar({ + position, + rotationY = 0, + bodyColor, +}: { + position: [number, number, number]; + rotationY?: number; + bodyColor: string; +}) { + return ( + + + + + + + + + + + + + + + + + + {[ + [-0.14, 0.05, 0.11], + [0.14, 0.05, 0.11], + [-0.14, 0.05, -0.11], + [0.14, 0.05, -0.11], + ].map(([x, y, z], index) => ( + + + + + ))} + + ); +} + export const FloorAndWalls = memo(function FloorAndWalls({ showRemoteOffice = true, }: { @@ -379,6 +450,16 @@ export const FloorAndWalls = memo(function FloorAndWalls({ const localSouthWallZ = localOfficeCenterZ + localOfficeHeight / 2; const localWestWallX = localOfficeCenterX - localOfficeWidth / 2; const localEastWallX = localOfficeCenterX + localOfficeWidth / 2; + const cityRoadOffset = 1.04; + const cityRoadWidth = 0.8; + const cityRoadSpanX = localOfficeWidth + 4.6; + const cityRoadSpanZ = localOfficeHeight + 4.6; + const northRoadZ = localNorthWallZ - cityRoadOffset; + const southRoadZ = localSouthWallZ + cityRoadOffset; + const westRoadX = localWestWallX - cityRoadOffset; + const eastRoadX = localEastWallX + cityRoadOffset; + const parkDepth = 1.95; + const parkWidth = 2.2; const groundCenterX = showRemoteOffice ? districtCenterX : localOfficeCenterX; const groundCenterZ = showRemoteOffice ? districtCenterZ : localOfficeCenterZ; const groundWidth = showRemoteOffice ? districtWidth : localOfficeWidth; @@ -713,6 +794,108 @@ export const FloorAndWalls = memo(function FloorAndWalls({ ); })} + + + + + + + + + + + + + + + + + + {Array.from({ length: 12 }).map((_, index) => { + const x = localOfficeCenterX - cityRoadSpanX / 2 + 0.55 + index * 0.78; + return ( + + + + + + + + + + + ); + })} + + {Array.from({ length: 10 }).map((_, index) => { + const z = localOfficeCenterZ - cityRoadSpanZ / 2 + 0.58 + index * 0.84; + return ( + + + + + + + + + + + ); + })} + + {[ + [westRoadX - 0.75, 0, northRoadZ - 0.72], + [eastRoadX + 0.75, 0, northRoadZ - 0.72], + [westRoadX - 0.75, 0, southRoadZ + 0.72], + [eastRoadX + 0.75, 0, southRoadZ + 0.72], + ].map(([x, y, z], index) => ( + + + + + + + + + + + ))} + + {[ + [westRoadX - 1.18, 0, northRoadZ - 0.95], + [westRoadX - 0.22, 0, northRoadZ - 0.4], + [eastRoadX + 0.22, 0, northRoadZ - 0.48], + [eastRoadX + 1.14, 0, northRoadZ - 0.93], + [westRoadX - 1.12, 0, southRoadZ + 0.95], + [westRoadX - 0.22, 0, southRoadZ + 0.44], + [eastRoadX + 0.24, 0, southRoadZ + 0.46], + [eastRoadX + 1.15, 0, southRoadZ + 0.9], + ].map(([x, y, z], index) => ( + + ))} + + {[ + [localOfficeCenterX - 2.2, 0, northRoadZ + 0.05, 0, "#e53935"], + [localOfficeCenterX + 1.1, 0, northRoadZ - 0.06, 0, "#1d4ed8"], + [localOfficeCenterX - 1.4, 0, southRoadZ + 0.08, Math.PI, "#f59e0b"], + [localOfficeCenterX + 2.35, 0, southRoadZ - 0.05, Math.PI, "#16a34a"], + [westRoadX + 0.02, 0, localOfficeCenterZ - 1.7, -Math.PI / 2, "#8b5cf6"], + [westRoadX - 0.03, 0, localOfficeCenterZ + 1.6, -Math.PI / 2, "#ef4444"], + [eastRoadX - 0.02, 0, localOfficeCenterZ - 1.2, Math.PI / 2, "#0284c7"], + [eastRoadX + 0.03, 0, localOfficeCenterZ + 1.95, Math.PI / 2, "#f97316"], + ].map(([x, y, z, rotationY, bodyColor], index) => ( + + ))} + {gymZoneFloorWidth > 0 && roomZoneFloorHeight > 0 ? ( <>