[Mnemosyne] Fix entity resolution lines wiring (#1167) #1214

Merged
Timmy merged 2 commits from fix/entity-resolution-lines-wiring into main 2026-04-11 05:31:28 +00:00
Owner

Closes #1167

Problem

Entity resolution lines were drawn on placeMemory() but never updated with LOD culling or distance fade. Root cause: setCamera() was defined in spatial-memory.js but not exported and never called from app.js.

Without camera reference, _updateEntityLines() immediately returns at line 432 (if (!_camera) return), so all entity lines stay at full opacity regardless of camera distance.

Fix

  1. nexus/components/spatial-memory.js — Added setCamera to the module's export block
  2. app.js — Added SpatialMemory.setCamera(camera) after SpatialMemory.init(scene) to pass camera reference

Result

  • Same-entity lines (blue, opacity 0.35) and related-entity lines (purple dashed, opacity 0.25) now get proper LOD culling
  • Lines hidden when camera > 50 units from midpoint
  • Distance-based opacity fade (full opacity at center, invisible at 50 units)
Closes #1167 ## Problem Entity resolution lines were drawn on `placeMemory()` but never updated with LOD culling or distance fade. Root cause: `setCamera()` was defined in `spatial-memory.js` but not exported and never called from `app.js`. Without camera reference, `_updateEntityLines()` immediately returns at line 432 (`if (!_camera) return`), so all entity lines stay at full opacity regardless of camera distance. ## Fix 1. **`nexus/components/spatial-memory.js`** — Added `setCamera` to the module's export block 2. **`app.js`** — Added `SpatialMemory.setCamera(camera)` after `SpatialMemory.init(scene)` to pass camera reference ## Result - Same-entity lines (blue, opacity 0.35) and related-entity lines (purple dashed, opacity 0.25) now get proper LOD culling - Lines hidden when camera > 50 units from midpoint - Distance-based opacity fade (full opacity at center, invisible at 50 units)
Rockachopa added 2 commits 2026-04-11 05:06:20 +00:00
Entity resolution lines were drawn but LOD culling never activated because setCamera() was defined but not exported. Without camera reference, _updateEntityLines() was a no-op.
fix: wire SpatialMemory.setCamera(camera) for entity line LOD (#1167)
Some checks failed
CI / test (pull_request) Failing after 8s
CI / validate (pull_request) Failing after 13s
Review Approval Gate / verify-review (pull_request) Failing after 3s
75f39e4195
Pass camera reference to SpatialMemory so entity resolution lines get distance-based opacity fade and LOD culling.
Rockachopa requested review from perplexity 2026-04-11 05:06:22 +00:00
Timmy merged commit 026e4a8cae into main 2026-04-11 05:31:28 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/the-nexus#1214