Skip to content

Develop - #1

Merged
Muazzaz merged 4 commits into
mainfrom
develop
Jul 26, 2026
Merged

Develop#1
Muazzaz merged 4 commits into
mainfrom
develop

Conversation

@Muazzaz

@Muazzaz Muazzaz commented Jul 26, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings July 26, 2026 17:22
@Muazzaz
Muazzaz merged commit f0d2e9e into main Jul 26, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the scene’s daytime atmosphere and significantly reworks the orchard road visuals to better match a 2‑lane highway look (continuous asphalt surface, painted center/edge lines, updated roundabout), with a couple of related visual tweaks in the vehicle and terrain.

Changes:

  • Adjusts daytime fog/hemisphere lighting parameters for a cooler, more muted look.
  • Rebuilds OrchardRoads geometry/materials to a continuous 2‑lane road with center/edge striping and updated roundabout meshes.
  • Tweaks vehicle visual alignment logic and updates some scene accent materials (and removes the decorative terrain start pad).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/lib/timeOfDay.ts Updates daytime lighting/fog/hemisphere parameters.
src/components/scene/Vehicle.tsx Adjusts visual chassis Y snap logic and changes a material’s color/emissive.
src/components/scene/Terrain.tsx Removes the decorative start pad mesh.
src/components/scene/OrchardRoads.tsx Reworks road/roundabout geometry generation and materials (2‑lane road + painted lines/curbs).
Comments suppressed due to low confidence (2)

src/components/scene/OrchardRoads.tsx:143

  • Outer edge-line vertices use a single ely computed from getTerrainHeight(pt.x, pt.z), but the edge-line points are far from pt (near ±halfW). This can cause edge lines to intersect the asphalt on sloped terrain. Compute Y per edge-line vertex instead.
    const ely = getTerrainHeight(pt.x, pt.z) + roadElevation + 0.003;

src/components/scene/OrchardRoads.tsx:214

  • roadVerts uses varying Y values to follow the terrain, but normals are hard-coded to (0,1,0). This makes lighting incorrect on sloped sections (specular/diffuse won't match the actual road surface). Compute vertex normals from the geometry.
  const roadGeo = new THREE.BufferGeometry();
  roadGeo.setAttribute('position', new THREE.Float32BufferAttribute(roadVerts, 3));
  roadGeo.setAttribute('normal', new THREE.Float32BufferAttribute(roadNorms, 3));
  roadGeo.setIndex(roadIndices);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +220 to +221
// Snap visual chassis to road/ground height under the car so it follows terrain and road surface
const visualY = getTerrainHeight(pos.x, pos.z) + 0.06 + 0.58; // 0.06m road elevation + 0.58m tire radius offset
Comment on lines +114 to 119
const cy = getTerrainHeight(pt.x, pt.z) + roadElevation + 0.003;
const cBase = centerVerts.length / 3;
centerVerts.push(
pt.x + normX * lineHalfW, cy, pt.z + normZ * lineHalfW,
pt.x - normX * lineHalfW, cy, pt.z - normZ * lineHalfW
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants