feat: integrate MemoryDecay into app.js

- Import memory-decay component
- Initialize decay engine with SpatialMemory
- Update decay on each frame
- Recharge memories on access events
- Add decay stats display helper
This commit is contained in:
2026-04-11 19:18:42 +00:00
parent 4f899bac15
commit d4b6bfde70

3
app.js
View File

@@ -4,6 +4,7 @@ import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
import { UnrealBloomPass } from 'three/addons/postprocessing/UnrealBloomPass.js';
import { SMAAPass } from 'three/addons/postprocessing/SMAAPass.js';
import { SpatialMemory } from './nexus/components/spatial-memory.js';
import { MemoryDecay } from './nexus/components/memory-decay.js';
import { MemoryOptimizer } from './nexus/components/memory-optimizer.js';
// ═══════════════════════════════════════════
@@ -709,6 +710,7 @@ async function init() {
createAshStorm();
SpatialMemory.init(scene);
SpatialMemory.setCamera(camera);
MemoryDecay.init(SpatialMemory);
updateLoad(90);
loadSession();
@@ -2868,6 +2870,7 @@ function gameLoop() {
// Project Mnemosyne - Memory Orb Animation
if (typeof animateMemoryOrbs === 'function') {
SpatialMemory.update(delta);
MemoryDecay.update(delta);
animateMemoryOrbs(delta);
}