feat: implement glowing memory orbs and fix portal duplication bug
Some checks failed
CI / test (pull_request) Failing after 9s
CI / validate (pull_request) Failing after 11s
Review Approval Gate / verify-review (pull_request) Failing after 2s

This commit is contained in:
Alexander Whitestone
2026-04-09 07:17:48 -04:00
parent 112ab16441
commit 8ce22806c4
3 changed files with 27 additions and 1 deletions

17
app.js
View File

@@ -3129,3 +3129,20 @@ init().then(() => {
connectMemPalace();
mineMemPalaceContent();
});
// Project Mnemosyne — Holographic Memory
function spawnMemoryOrb(position, color = 0x4af0c0, size = 0.5) {
const geometry = new THREE.SphereGeometry(size, 32, 32);
const material = new THREE.MeshPhongMaterial({
color: color,
emissive: color,
emissiveIntensity: 2,
transparent: true,
opacity: 0.8,
shininess: 100
});
const orb = new THREE.Mesh(geometry, material);
orb.position.copy(position);
orb.userData.pulse = 0;
return orb;
}

View File

@@ -503,6 +503,11 @@ export function getSceneObjectCount() {
export function addPortal(def) {
if (!scene || !def.id) return false;
// Remove existing portal if it already exists to prevent duplication
if (registry.has(def.id)) {
removePortal(def.id);
}
const color = def.color != null ? parseColor(def.color) : 0x00ffaa;
const s = def.scale ?? 1;
const group = new THREE.Group();

View File

@@ -193,9 +193,13 @@ function handleMemoryEvent(msg) {
geometry: 'sphere',
position: { x: pos.x + (Math.random() - 0.5) * 5, y: 1, z: pos.z + (Math.random() - 0.5) * 5 },
material: {
type: 'physical',
color: categoryColors[data.category] || 0xcccccc,
emissive: categoryColors[data.category] || 0xcccccc,
emissiveIntensity: 2,
emissiveIntensity: 3,
transmission: 0.6,
roughness: 0.1,
metalness: 0.1,
opacity: 0.8,
},
scale: 0.2 + (data.trust_score || 0.5) * 0.5,