Skip to content

Conversation

@simplast
Copy link
Contributor

Problem Summary:

Issue: Light intensity accumulation with multiple client connections

Description: When multiple web clients connect to the same gzbridge instance, the existing client's scene becomes progressively brighter with each new client connection.

Symptoms:

  • Client A connects normally with correct lighting
  • When Client B connects, Client A's scene becomes overbright
  • With Client C connection, lighting becomes even brighter
  • Each additional client connection adds to the light accumulation

Root Cause: The initScene() function in gzscene.js creates a new sun light on every client initialization without checking if lights already exist, causing duplicate light sources to accumulate in the shared THREE.js scene.

Impact: Visual degradation where scenes become unnaturally bright as more clients connect, making the simulation unusable for existing clients.

Reproduction:

  1. Open first web client → lighting appears normal
  2. Open second web client → first client's scene becomes brighter
  3. Open third web client → lighting becomes even more overbright
  4. Repeat → progressive light accumulation

@simplast simplast requested a review from iche033 January 19, 2026 14:50
@simplast
Copy link
Contributor Author

Hi, it seems the CI job timed out while waiting for a runner. Could you please help re-run the failed check? @iche033

@iche033 iche033 closed this Jan 20, 2026
@iche033 iche033 reopened this Jan 20, 2026
@iche033
Copy link
Contributor

iche033 commented Jan 20, 2026

looks like re-run option is not available for old PRs. I just closed and re-opened the PR to retrigger the checks.

@iche033 iche033 merged commit 93b6a6f into osrf:master Jan 21, 2026
0 of 6 checks passed
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