Compare commits
1 Commits
mimo/creat
...
mimo/code/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc389539f0 |
@@ -1,169 +1,132 @@
|
||||
# Legacy Matrix Audit — Migration Table
|
||||
# Legacy Matrix Audit
|
||||
|
||||
Purpose:
|
||||
Preserve quality work from `/Users/apayne/the-matrix` before the Nexus browser shell is rebuilt.
|
||||
Preserve useful work from `/Users/apayne/the-matrix` before the Nexus browser shell is rebuilt.
|
||||
|
||||
Canonical rule:
|
||||
- `Timmy_Foundation/the-nexus` is the only canonical 3D repo.
|
||||
- `/Users/apayne/the-matrix` is legacy source material, not a parallel product.
|
||||
- This document is the authoritative migration table for issue #685.
|
||||
|
||||
## Verified Legacy State
|
||||
## Verified Legacy Matrix State
|
||||
|
||||
Local legacy repo: `/Users/apayne/the-matrix`
|
||||
Local legacy repo:
|
||||
- `/Users/apayne/the-matrix`
|
||||
|
||||
Observed facts:
|
||||
- Vite browser app, vanilla JS + Three.js 0.171.0
|
||||
- 24 JS modules under `js/`
|
||||
- Smoke suite: 87 passed, 0 failed
|
||||
- Package scripts: dev, build, preview, test
|
||||
- PWA manifest + service worker
|
||||
- Vite config with code-splitting (Three.js in separate chunk)
|
||||
- Quality-tier system for hardware detection
|
||||
- WebSocket client with reconnection, heartbeat, mock mode
|
||||
- Full avatar FPS movement + PiP camera
|
||||
- Sub-world portal system with zone triggers
|
||||
- Vite browser app exists
|
||||
- `npm test` passes with `87 passed, 0 failed`
|
||||
- 23 JS modules under `js/`
|
||||
- package scripts include `dev`, `build`, `preview`, and `test`
|
||||
|
||||
## Migration Table
|
||||
## Known historical Nexus snapshot
|
||||
|
||||
Decision key:
|
||||
- **CARRY** = transplant concepts and patterns into Nexus vNext
|
||||
- **ARCHIVE** = keep as reference, do not directly transplant
|
||||
- **DROP** = do not preserve unless re-justified
|
||||
Useful in-repo reference point:
|
||||
- `0518a1c3ae3c1d0afeb24dea9772102f5a3d9a66`
|
||||
|
||||
### Core Modules
|
||||
That snapshot still contains browser-world root files such as:
|
||||
- `index.html`
|
||||
- `app.js`
|
||||
- `style.css`
|
||||
- `package.json`
|
||||
- `tests/`
|
||||
|
||||
| File | Lines | Capability | Decision | Why for Nexus |
|
||||
|------|-------|------------|----------|---------------|
|
||||
| `js/main.js` | 180 | App bootstrap, render loop, WebGL context recovery | **CARRY** | Architectural pattern. Shows clean init/teardown lifecycle, context-loss recovery, visibility pause. Nexus needs this loop but should not copy the monolithic wiring. |
|
||||
| `js/world.js` | 95 | Scene, camera, renderer, grid, lights | **CARRY** | Foundational. Quality-tier-aware renderer setup, grid floor, lighting. Nexus already has a world but should adopt the tier-aware antialiasing and pixel-ratio capping. |
|
||||
| `js/config.js` | 68 | Connection config via URL params + env vars | **ARCHIVE** | Pattern reference only. Nexus config should route through Hermes harness, not Vite env vars. The URL-override pattern (ws, token, mock) is worth remembering. |
|
||||
| `js/quality.js` | 90 | Hardware detection, quality tier (low/medium/high) | **CARRY** | Directly useful. DPR capping, core/memory/screen heuristics, WebGL renderer sniffing. Nexus needs this for graceful degradation on Mac/iPad. |
|
||||
| `js/storage.js` | 39 | Safe localStorage with in-memory fallback | **CARRY** | Small, robust, sandbox-proof. Nexus should use this or equivalent. Prevents crashes in sandboxed iframes. |
|
||||
## Rescue Candidates
|
||||
|
||||
### Agent System
|
||||
### Carry forward into Nexus vNext
|
||||
|
||||
| File | Lines | Capability | Decision | Why for Nexus |
|
||||
|------|-------|------------|----------|---------------|
|
||||
| `js/agent-defs.js` | 30 | Agent identity data (id, label, color, role, position) | **CARRY** | Seed data model. Nexus agents should be defined similarly — data-driven, not hardcoded in render logic. Color hex helper is trivial but useful. |
|
||||
| `js/agents.js` | 523 | Agent 3D objects, movement, state, connection lines, hot-add/remove | **CARRY** | Core visual system. Shared geometries (perf), movement interpolation, wallet-health stress glow, auto-placement algorithm, connection-line pulse. All valuable. Needs integration with real agent state from Hermes. |
|
||||
| `js/behaviors.js` | 413 | Autonomous agent behavior state machine | **ARCHIVE** | Pattern reference. The personality-weighted behavior selection, conversation pairing, and artifact-placement system are well-designed. But Nexus behaviors should be driven by Hermes, not a client-side simulation. Keep the architecture, drop the fake-autonomy. |
|
||||
| `js/presence.js` | 139 | Agent presence HUD (online/offline, uptime, state) | **CARRY** | Valuable UX. Live "who's here" panel with uptime tickers and state indicators. Needs real backend state, not mock assumptions. |
|
||||
1. `agent-defs.js`
|
||||
- agent identity definitions
|
||||
- useful as seed data/model for visible entities in the world
|
||||
|
||||
### Visitor & Interaction
|
||||
2. `agents.js`
|
||||
- agent objects, state machine, connection lines
|
||||
- useful for visualizing Timmy / subagents / system processes in a world-native way
|
||||
|
||||
| File | Lines | Capability | Decision | Why for Nexus |
|
||||
|------|-------|------------|----------|---------------|
|
||||
| `js/visitor.js` | 141 | Visitor enter/leave protocol, chat input | **CARRY** | Session lifecycle. Device detection, visibility-based leave/return, chat input wiring. Directly applicable to Nexus visitor tracking. |
|
||||
| `js/avatar.js` | 360 | FPS movement, PiP dual-camera, touch input | **CARRY** | Visitor embodiment. WASD + arrow movement, first/third person swap, PiP canvas, touch joystick, right-click mouse-look. Strong work. Needs tuning for Nexus world bounds. |
|
||||
| `js/interaction.js` | 296 | Raycasting, click-to-select agents, info popup | **CARRY** | Essential for any browser world. OrbitControls, pointer/tap detection, agent popup with state/role, TALK button. The popup-anchoring-to-3D-position logic is particularly well done. |
|
||||
| `js/zones.js` | 161 | Proximity trigger zones (portal enter/exit, events) | **CARRY** | Spatial event system. Portal traversal, event triggers, once-only zones. Nexus portals (#672) need this exact pattern. |
|
||||
3. `avatar.js`
|
||||
- visitor embodiment, movement, camera handling
|
||||
- strongly aligned with "training ground" and "walk the world" goals
|
||||
|
||||
### Chat & Communication
|
||||
4. `ui.js`
|
||||
- HUD, chat surfaces, overlays
|
||||
- useful if rebuilt against real harness data instead of stale fake state
|
||||
|
||||
| File | Lines | Capability | Decision | Why for Nexus |
|
||||
|------|-------|------------|----------|---------------|
|
||||
| `js/bark.js` | 141 | Speech bubble system with typing animation | **CARRY** | Timmy's voice in-world. Typing animation, queue, auto-dismiss, emotion tags, demo bark lines. Strong expressive presence. The demo lines ("The Tower watches. The Tower remembers.") are good seed content. |
|
||||
| `js/ui.js` | 285 | Chat panel, agent list, HUD, streaming tokens | **CARRY** | Chat infrastructure. Rolling chat buffer, per-agent localStorage history, streaming token display with cursor animation, HTML escaping. Needs reconnection to Hermes chat instead of WS mock. |
|
||||
| `js/transcript.js` | 183 | Conversation transcript logger, export | **ARCHIVE** | Pattern reference. The rolling buffer, structured JSON entries, TXT/JSON download, HUD badge are all solid. But transcript authority should live in Hermes, not browser localStorage. Keep the UX pattern, rebuild storage layer. |
|
||||
5. `websocket.js`
|
||||
- browser-side live bridge patterns
|
||||
- useful if retethered to Hermes-facing transport
|
||||
|
||||
### Visual Effects
|
||||
6. `transcript.js`
|
||||
- local transcript capture pattern
|
||||
- useful if durable truth still routes through Hermes and browser cache remains secondary
|
||||
|
||||
| File | Lines | Capability | Decision | Why for Nexus |
|
||||
|------|-------|------------|----------|---------------|
|
||||
| `js/effects.js` | 195 | Matrix rain particles + starfield | **CARRY** | Atmospheric foundation. Quality-tier particle counts, frame-skip optimization, adaptive draw-range (FPS-budget recovery), bounding-sphere pre-compute. This is production-grade particle work. |
|
||||
| `js/ambient.js` | 212 | Mood-driven atmosphere (lighting, fog, rain, stars) | **CARRY** | Scene mood engine. Smooth eased transitions between mood states (calm, focused, excited, contemplative, stressed), per-mood lighting/fog/rain/star parameters. Directly supports Nexus atmosphere. |
|
||||
| `js/satflow.js` | 261 | Lightning payment particle flow | **CARRY** | Economy visualization. Bezier-arc particles, staggered travel, burst-on-arrival, pooling. If Nexus shows any payment/economy flow, this is the pattern. |
|
||||
7. `ambient.js`
|
||||
- mood / atmosphere system
|
||||
- directly supports wizardly presentation without changing system authority
|
||||
|
||||
### Economy & Scene
|
||||
8. `satflow.js`
|
||||
- visual economy / payment flow motifs
|
||||
- useful if Timmy's economy/agent interactions become a real visible layer
|
||||
|
||||
| File | Lines | Capability | Decision | Why for Nexus |
|
||||
|------|-------|------------|----------|---------------|
|
||||
| `js/economy.js` | 100 | Wallet/treasury HUD panel | **ARCHIVE** | UI pattern reference. Clean sats formatting, per-agent balance rows, health-colored dots, recent transactions. Worth rebuilding when backed by real sovereign metrics. |
|
||||
| `js/scene-objects.js` | 718 | Dynamic 3D object registry, portals, sub-worlds | **CARRY** | Critical. Geometry/material factories, animation system (rotate/bob/pulse/orbit), portal visual (torus ring + glow disc + zone), sub-world load/unload, text sprites, compound groups. This is the most complex and valuable module. Nexus portals (#672) should build on this. |
|
||||
9. `economy.js`
|
||||
- treasury / wallet panel ideas
|
||||
- useful if later backed by real sovereign metrics
|
||||
|
||||
### Backend Bridge
|
||||
10. `presence.js`
|
||||
- who-is-here / online-state UI
|
||||
- useful for showing human + agent + process presence in the world
|
||||
|
||||
| File | Lines | Capability | Decision | Why for Nexus |
|
||||
|------|-------|------------|----------|---------------|
|
||||
| `js/websocket.js` | 598 | WebSocket client, message dispatcher, mock mode | **ARCHIVE** | Pattern reference only. Reconnection with exponential backoff, heartbeat/zombie detection, rich message dispatch (40+ message types), streaming chat support. The architecture is sound but must be reconnected to Hermes transport, not copied wholesale. The message-type catalog is the most valuable reference artifact. |
|
||||
| `js/demo.js` | ~300 | Demo autopilot (mock mode simulation) | **DROP** | Fake activity simulation. Deliberately creates the illusion of live data. Do not preserve. If Nexus needs a demo mode, build a clearly-labeled one that doesn't pretend to be real. |
|
||||
11. `interaction.js`
|
||||
- clicking, inspecting, selecting world entities
|
||||
- likely needed in any real browser-facing Nexus shell
|
||||
|
||||
### Testing & Build
|
||||
12. `quality.js`
|
||||
- hardware-aware quality tiering
|
||||
- useful for local-first graceful degradation on Mac hardware
|
||||
|
||||
| File | Lines | Capability | Decision | Why for Nexus |
|
||||
|------|-------|------------|----------|---------------|
|
||||
| `test/smoke.mjs` | 235 | Automated browser smoke test suite | **CARRY** | Testing discipline. Module inventory check, export verification, HTML structure validation, Vite build test, bundle-size budget, PWA manifest check. Nexus should adopt this pattern (adapted for its own module structure). |
|
||||
| `vite.config.js` | 53 | Build config with code splitting, SW generation | **ARCHIVE** | Build tooling reference. manualChunks for Three.js, SW precache generation plugin. Relevant if Nexus re-commits to Vite. |
|
||||
| `sw.js` | ~40 | Service worker with precache | **ARCHIVE** | PWA reference. Relevant only if Nexus pursues offline-first PWA. |
|
||||
| `manifest.json` | ~20 | PWA manifest | **ARCHIVE** | PWA reference. |
|
||||
13. `bark.js`
|
||||
- prominent speech / bark system
|
||||
- strong fit for Timmy's expressive presence in-world
|
||||
|
||||
### Server-Side (Python)
|
||||
14. `world.js`, `effects.js`, `scene-objects.js`, `zones.js`
|
||||
- broad visual foundation work
|
||||
- should be mined for patterns, not blindly transplanted
|
||||
|
||||
| File | Lines | Capability | Decision | Why for Nexus |
|
||||
|------|-------|------------|----------|---------------|
|
||||
| `server/bridge.py` | ~900 | WebSocket bridge server | **ARCHIVE** | Reference. Hermes replaces this role. Keep for protocol schema reference. |
|
||||
| `server/gateway.py` | ~400 | HTTP gateway | **ARCHIVE** | Reference. |
|
||||
| `server/ollama_client.py` | ~280 | Ollama integration | **ARCHIVE** | Reference. Relevant if Nexus needs local model calls. |
|
||||
| `server/research.py` | ~450 | Research pipeline | **ARCHIVE** | Reference. |
|
||||
| `server/webhooks.py` | ~350 | Webhook handler | **ARCHIVE** | Reference. |
|
||||
| `server/test_*.py` | ~5 files | Server test suites | **ARCHIVE** | Testing patterns worth studying. |
|
||||
15. `test/smoke.mjs`
|
||||
- browser smoke discipline
|
||||
- should inform rebuilt validation in canonical Nexus repo
|
||||
|
||||
## Summary by Decision
|
||||
### Archive as reference, not direct carry-forward
|
||||
|
||||
### CARRY FORWARD (17 modules)
|
||||
These modules contain patterns, algorithms, or entire implementations that should move into the Nexus browser shell:
|
||||
- demo/autopilot assumptions that pretend fake backend activity is real
|
||||
- any websocket schema that no longer matches Hermes truth
|
||||
- Vite-specific plumbing that is only useful if we consciously recommit to Vite
|
||||
|
||||
- `quality.js` — hardware detection
|
||||
- `storage.js` — safe persistence
|
||||
- `world.js` — scene foundation
|
||||
- `agent-defs.js` — agent data model
|
||||
- `agents.js` — agent visualization + movement
|
||||
- `presence.js` — online presence HUD
|
||||
- `visitor.js` — session lifecycle
|
||||
- `avatar.js` — FPS embodiment
|
||||
- `interaction.js` — click/select/raycast
|
||||
- `zones.js` — spatial triggers
|
||||
- `bark.js` — speech bubbles
|
||||
- `ui.js` — chat/HUD
|
||||
- `effects.js` — particle effects
|
||||
- `ambient.js` — mood atmosphere
|
||||
- `satflow.js` — payment flow particles
|
||||
- `scene-objects.js` — dynamic objects + portals
|
||||
- `test/smoke.mjs` — smoke test discipline
|
||||
### Deliberately drop unless re-justified
|
||||
|
||||
### ARCHIVE AS REFERENCE (9 modules/files)
|
||||
Keep for patterns, protocol schemas, and architectural reference. Do not directly transplant:
|
||||
|
||||
- `config.js` — config pattern (use Hermes instead)
|
||||
- `behaviors.js` — behavior architecture (use Hermes-driven state)
|
||||
- `transcript.js` — transcript UX (use Hermes storage)
|
||||
- `economy.js` — economy UI pattern (use real metrics)
|
||||
- `websocket.js` — message protocol catalog + reconnection patterns
|
||||
- `vite.config.js` — build tooling
|
||||
- `sw.js`, `manifest.json` — PWA reference
|
||||
- `server/*.py` — server protocol schemas
|
||||
|
||||
### DELIBERATELY DROP (2)
|
||||
Do not preserve unless re-justified:
|
||||
|
||||
- `demo.js` — fake activity simulation; creates false impression of live system
|
||||
- `main.js` monolithic wiring — the init pattern carries, the specific module wiring does not
|
||||
- anything that presents mock data as if it were live
|
||||
- anything that duplicates a better Hermes-native telemetry path
|
||||
- anything that turns the browser into the system of record
|
||||
|
||||
## Concern Separation for Nexus vNext
|
||||
|
||||
When rebuilding inside `the-nexus`, keep these concerns in separate modules:
|
||||
When rebuilding inside `the-nexus`, keep concerns separated:
|
||||
|
||||
1. **World shell** — scene, camera, renderer, grid, lights, fog
|
||||
2. **Effects layer** — rain, stars, ambient mood transitions
|
||||
3. **Agent visualization** — 3D objects, labels, connection lines, movement
|
||||
4. **Visitor embodiment** — avatar, FPS controls, PiP camera
|
||||
5. **Interaction layer** — raycasting, selection, zones, portal traversal
|
||||
6. **Communication surface** — bark, chat panel, streaming tokens
|
||||
7. **Presence & HUD** — who's-online, economy panel, transcript controls
|
||||
8. **Harness bridge** — WebSocket/API transport to Hermes (NOT a copy of websocket.js)
|
||||
9. **Quality & config** — hardware detection, runtime configuration
|
||||
10. **Smoke tests** — automated validation
|
||||
1. World shell / rendering
|
||||
- scene, camera, movement, atmosphere
|
||||
|
||||
2. Presence and embodiment
|
||||
- avatar, agent placement, selection, bark/chat surfaces
|
||||
|
||||
3. Harness bridge
|
||||
- websocket / API bridge from Hermes truth into browser state
|
||||
|
||||
4. Visualization panels
|
||||
- metrics, presence, economy, portal states, transcripts
|
||||
|
||||
5. Validation
|
||||
- smoke tests, screenshot proof, provenance checks
|
||||
|
||||
6. Game portal layer
|
||||
- Morrowind / portal-specific interaction surfaces
|
||||
|
||||
Do not collapse all of this into one giant app file again.
|
||||
Do not let visual shell code become telemetry authority.
|
||||
|
||||
110
app.js
110
app.js
@@ -2516,24 +2516,46 @@ function populateAtlas() {
|
||||
const grid = document.getElementById('atlas-grid');
|
||||
grid.innerHTML = '';
|
||||
|
||||
// Counters by status
|
||||
let onlineCount = 0;
|
||||
let standbyCount = 0;
|
||||
let rebuildingCount = 0;
|
||||
let localCount = 0;
|
||||
let blockedCount = 0;
|
||||
|
||||
// Group portals by environment
|
||||
const byEnv = { production: [], staging: [], local: [] };
|
||||
|
||||
portals.forEach(portal => {
|
||||
const config = portal.config;
|
||||
if (config.status === 'online') onlineCount++;
|
||||
if (config.status === 'standby') standbyCount++;
|
||||
const status = config.status || 'online';
|
||||
const env = config.environment || 'production';
|
||||
|
||||
// Count statuses
|
||||
if (status === 'online' || status === 'active') onlineCount++;
|
||||
else if (status === 'standby') standbyCount++;
|
||||
else if (status === 'rebuilding') rebuildingCount++;
|
||||
else if (status === 'local-only') localCount++;
|
||||
else if (status === 'blocked') blockedCount++;
|
||||
|
||||
// Group by environment
|
||||
if (byEnv[env]) {
|
||||
byEnv[env].push({ config, status });
|
||||
} else {
|
||||
byEnv['production'].push({ config, status });
|
||||
}
|
||||
|
||||
// Create atlas card
|
||||
const card = document.createElement('div');
|
||||
card.className = 'atlas-card';
|
||||
card.style.setProperty('--portal-color', config.color);
|
||||
|
||||
const statusClass = `status-${config.status || 'online'}`;
|
||||
const statusClass = `status-${status}`;
|
||||
|
||||
card.innerHTML = `
|
||||
<div class="atlas-card-header">
|
||||
<div class="atlas-card-name">${config.name}</div>
|
||||
<div class="atlas-card-status ${statusClass}">${config.status || 'ONLINE'}</div>
|
||||
<div class="atlas-card-status ${statusClass}">${status.toUpperCase()}</div>
|
||||
</div>
|
||||
<div class="atlas-card-desc">${config.description}</div>
|
||||
<div class="atlas-card-footer">
|
||||
@@ -2550,9 +2572,18 @@ function populateAtlas() {
|
||||
grid.appendChild(card);
|
||||
});
|
||||
|
||||
// Update footer counts
|
||||
document.getElementById('atlas-online-count').textContent = onlineCount;
|
||||
document.getElementById('atlas-standby-count').textContent = standbyCount;
|
||||
|
||||
document.getElementById('atlas-rebuilding-count').textContent = rebuildingCount;
|
||||
document.getElementById('atlas-local-count').textContent = localCount;
|
||||
document.getElementById('atlas-blocked-count').textContent = blockedCount;
|
||||
|
||||
// Populate status wall by environment
|
||||
populateStatusWallEnv('production', byEnv.production);
|
||||
populateStatusWallEnv('staging', byEnv.staging);
|
||||
populateStatusWallEnv('local', byEnv.local);
|
||||
|
||||
// Update Bannerlord HUD status
|
||||
const bannerlord = portals.find(p => p.config.id === 'bannerlord');
|
||||
if (bannerlord) {
|
||||
@@ -2561,6 +2592,75 @@ function populateAtlas() {
|
||||
}
|
||||
}
|
||||
|
||||
function populateStatusWallEnv(envName, portalList) {
|
||||
const container = document.getElementById(`${envName}-portals`);
|
||||
const summary = document.getElementById(`${envName}-summary`);
|
||||
container.innerHTML = '';
|
||||
|
||||
if (portalList.length === 0) {
|
||||
container.innerHTML = '<div class="status-portal-row"><span class="status-portal-name" style="font-style: italic; color: rgba(160,184,208,0.4);">No worlds</span></div>';
|
||||
summary.textContent = 'No portals in this environment';
|
||||
return;
|
||||
}
|
||||
|
||||
// Count statuses in this environment
|
||||
const statusCounts = {};
|
||||
portalList.forEach(({ config, status }) => {
|
||||
statusCounts[status] = (statusCounts[status] || 0) + 1;
|
||||
});
|
||||
|
||||
// Create portal rows
|
||||
portalList.forEach(({ config, status }) => {
|
||||
const row = document.createElement('div');
|
||||
row.className = 'status-portal-row';
|
||||
|
||||
const indicator = document.createElement('span');
|
||||
indicator.className = `status-portal-indicator status-dot ${status}`;
|
||||
|
||||
const nameSpan = document.createElement('span');
|
||||
nameSpan.className = 'status-portal-name';
|
||||
nameSpan.textContent = config.name;
|
||||
|
||||
const statusSpan = document.createElement('span');
|
||||
statusSpan.style.fontSize = '9px';
|
||||
statusSpan.style.textTransform = 'uppercase';
|
||||
statusSpan.style.marginLeft = '8px';
|
||||
statusSpan.style.color = getStatusColor(status);
|
||||
statusSpan.textContent = status;
|
||||
|
||||
row.appendChild(nameSpan);
|
||||
row.appendChild(statusSpan);
|
||||
row.appendChild(indicator);
|
||||
container.appendChild(row);
|
||||
});
|
||||
|
||||
// Create summary
|
||||
const summaryParts = Object.entries(statusCounts).map(([status, count]) =>
|
||||
`${count} ${status}`
|
||||
);
|
||||
summary.textContent = summaryParts.join(' · ');
|
||||
}
|
||||
|
||||
function getStatusColor(status) {
|
||||
switch (status) {
|
||||
case 'online':
|
||||
case 'active':
|
||||
return 'var(--color-primary)';
|
||||
case 'standby':
|
||||
return 'var(--color-gold)';
|
||||
case 'rebuilding':
|
||||
return '#ffa500';
|
||||
case 'local-only':
|
||||
return '#00ff88';
|
||||
case 'blocked':
|
||||
return '#ff0000';
|
||||
case 'offline':
|
||||
return 'var(--color-danger)';
|
||||
default:
|
||||
return 'var(--color-text-muted)';
|
||||
}
|
||||
}
|
||||
|
||||
function focusPortal(portal) {
|
||||
// Teleport player to a position in front of the portal
|
||||
const offset = new THREE.Vector3(0, 0, 6).applyEuler(new THREE.Euler(0, portal.config.rotation?.y || 0, 0));
|
||||
|
||||
46
index.html
46
index.html
@@ -264,11 +264,57 @@
|
||||
<div class="atlas-grid" id="atlas-grid">
|
||||
<!-- Portals will be injected here -->
|
||||
</div>
|
||||
<!-- Portal Status Wall -->
|
||||
<div class="atlas-status-wall">
|
||||
<div class="status-wall-header">
|
||||
<span class="status-wall-title">WORLD STATUS WALL</span>
|
||||
<span class="status-wall-subtitle">Real-time portal health</span>
|
||||
</div>
|
||||
<div class="status-wall-grid">
|
||||
<div class="status-wall-env" id="status-wall-production">
|
||||
<div class="status-env-header">
|
||||
<span class="status-env-dot production"></span>
|
||||
<span class="status-env-label">PRODUCTION</span>
|
||||
</div>
|
||||
<div class="status-env-portals" id="production-portals"></div>
|
||||
<div class="status-env-summary" id="production-summary"></div>
|
||||
</div>
|
||||
<div class="status-wall-env" id="status-wall-staging">
|
||||
<div class="status-env-header">
|
||||
<span class="status-env-dot staging"></span>
|
||||
<span class="status-env-label">STAGING</span>
|
||||
</div>
|
||||
<div class="status-env-portals" id="staging-portals"></div>
|
||||
<div class="status-env-summary" id="staging-summary"></div>
|
||||
</div>
|
||||
<div class="status-wall-env" id="status-wall-local">
|
||||
<div class="status-env-header">
|
||||
<span class="status-env-dot local"></span>
|
||||
<span class="status-env-label">LOCAL</span>
|
||||
</div>
|
||||
<div class="status-env-portals" id="local-portals"></div>
|
||||
<div class="status-env-summary" id="local-summary"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="status-wall-legend">
|
||||
<div class="legend-item"><span class="status-dot online"></span> Online</div>
|
||||
<div class="legend-item"><span class="status-dot rebuilding"></span> Rebuilding</div>
|
||||
<div class="legend-item"><span class="status-dot local-only"></span> Local-only</div>
|
||||
<div class="legend-item"><span class="status-dot blocked"></span> Blocked</div>
|
||||
<div class="legend-item"><span class="status-dot offline"></span> Offline</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="atlas-footer">
|
||||
<div class="atlas-status-summary">
|
||||
<span class="status-indicator online"></span> <span id="atlas-online-count">0</span> ONLINE
|
||||
|
||||
<span class="status-indicator standby"></span> <span id="atlas-standby-count">0</span> STANDBY
|
||||
|
||||
<span class="status-indicator rebuilding"></span> <span id="atlas-rebuilding-count">0</span> REBUILDING
|
||||
|
||||
<span class="status-indicator local-only"></span> <span id="atlas-local-count">0</span> LOCAL
|
||||
|
||||
<span class="status-indicator blocked"></span> <span id="atlas-blocked-count">0</span> BLOCKED
|
||||
</div>
|
||||
<div class="atlas-hint">Click a portal to focus or teleport</div>
|
||||
</div>
|
||||
|
||||
25
portals.json
25
portals.json
@@ -4,6 +4,7 @@
|
||||
"name": "Morrowind",
|
||||
"description": "The Vvardenfell harness. Ash storms and ancient mysteries.",
|
||||
"status": "online",
|
||||
"environment": "production",
|
||||
"color": "#ff6600",
|
||||
"position": { "x": 15, "y": 0, "z": -10 },
|
||||
"rotation": { "y": -0.5 },
|
||||
@@ -17,13 +18,13 @@
|
||||
"id": "bannerlord",
|
||||
"name": "Bannerlord",
|
||||
"description": "Calradia battle harness. Massive armies, tactical command.",
|
||||
"status": "active",
|
||||
"status": "online",
|
||||
"environment": "production",
|
||||
"color": "#ffd700",
|
||||
"position": { "x": -15, "y": 0, "z": -10 },
|
||||
"rotation": { "y": 0.5 },
|
||||
"portal_type": "game-world",
|
||||
"world_category": "strategy-rpg",
|
||||
"environment": "production",
|
||||
"access_mode": "operator",
|
||||
"readiness_state": "active",
|
||||
"telemetry_source": "hermes-harness:bannerlord",
|
||||
@@ -42,6 +43,7 @@
|
||||
"name": "Workshop",
|
||||
"description": "The creative harness. Build, script, and manifest.",
|
||||
"status": "online",
|
||||
"environment": "production",
|
||||
"color": "#4af0c0",
|
||||
"position": { "x": 0, "y": 0, "z": -20 },
|
||||
"rotation": { "y": 0 },
|
||||
@@ -56,6 +58,7 @@
|
||||
"name": "Archive",
|
||||
"description": "The repository of all knowledge. History, logs, and ancient data.",
|
||||
"status": "online",
|
||||
"environment": "production",
|
||||
"color": "#0066ff",
|
||||
"position": { "x": 25, "y": 0, "z": 0 },
|
||||
"rotation": { "y": -1.57 },
|
||||
@@ -70,6 +73,7 @@
|
||||
"name": "Chapel",
|
||||
"description": "A sanctuary for reflection and digital peace.",
|
||||
"status": "online",
|
||||
"environment": "production",
|
||||
"color": "#ffd700",
|
||||
"position": { "x": -25, "y": 0, "z": 0 },
|
||||
"rotation": { "y": 1.57 },
|
||||
@@ -84,6 +88,7 @@
|
||||
"name": "Courtyard",
|
||||
"description": "The open nexus. A place for agents to gather and connect.",
|
||||
"status": "online",
|
||||
"environment": "production",
|
||||
"color": "#4af0c0",
|
||||
"position": { "x": 15, "y": 0, "z": 10 },
|
||||
"rotation": { "y": -2.5 },
|
||||
@@ -98,6 +103,7 @@
|
||||
"name": "Gate",
|
||||
"description": "The transition point. Entry and exit from the Nexus core.",
|
||||
"status": "standby",
|
||||
"environment": "staging",
|
||||
"color": "#ff4466",
|
||||
"position": { "x": -15, "y": 0, "z": 10 },
|
||||
"rotation": { "y": 2.5 },
|
||||
@@ -106,5 +112,20 @@
|
||||
"type": "harness",
|
||||
"params": { "mode": "transit" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "dev",
|
||||
"name": "Dev Sandbox",
|
||||
"description": "Local development world. Unstable, experimental, honest.",
|
||||
"status": "local-only",
|
||||
"environment": "local",
|
||||
"color": "#00ff88",
|
||||
"position": { "x": 0, "y": 0, "z": 20 },
|
||||
"rotation": { "y": 0 },
|
||||
"destination": {
|
||||
"url": "http://localhost:3000",
|
||||
"type": "local",
|
||||
"params": { "mode": "dev" }
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
169
style.css
169
style.css
@@ -365,7 +365,11 @@ canvas#nexus-canvas {
|
||||
}
|
||||
|
||||
.status-online { background: rgba(74, 240, 192, 0.2); color: var(--color-primary); border: 1px solid var(--color-primary); }
|
||||
.status-active { background: rgba(74, 240, 192, 0.2); color: var(--color-primary); border: 1px solid var(--color-primary); }
|
||||
.status-standby { background: rgba(255, 215, 0, 0.2); color: var(--color-gold); border: 1px solid var(--color-gold); }
|
||||
.status-rebuilding { background: rgba(255, 165, 0, 0.2); color: #ffa500; border: 1px solid #ffa500; }
|
||||
.status-local-only { background: rgba(0, 255, 136, 0.2); color: #00ff88; border: 1px solid #00ff88; }
|
||||
.status-blocked { background: rgba(255, 0, 0, 0.2); color: #ff0000; border: 1px solid #ff0000; }
|
||||
.status-offline { background: rgba(255, 68, 102, 0.2); color: var(--color-danger); border: 1px solid var(--color-danger); }
|
||||
|
||||
.atlas-card-desc {
|
||||
@@ -410,6 +414,165 @@ canvas#nexus-canvas {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Portal Status Wall */
|
||||
.atlas-status-wall {
|
||||
padding: 20px 30px;
|
||||
border-top: 1px solid var(--color-border);
|
||||
background: rgba(10, 15, 40, 0.5);
|
||||
}
|
||||
|
||||
.status-wall-header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.status-wall-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
color: var(--color-primary);
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.status-wall-subtitle {
|
||||
font-family: var(--font-body);
|
||||
font-size: 11px;
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.status-wall-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 20px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.status-wall-env {
|
||||
background: rgba(20, 30, 60, 0.3);
|
||||
border: 1px solid rgba(255, 255, 255, 0.05);
|
||||
padding: 12px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.status-env-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.status-env-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.status-env-dot.production {
|
||||
background: var(--color-primary);
|
||||
box-shadow: 0 0 5px var(--color-primary);
|
||||
}
|
||||
|
||||
.status-env-dot.staging {
|
||||
background: var(--color-gold);
|
||||
box-shadow: 0 0 5px var(--color-gold);
|
||||
}
|
||||
|
||||
.status-env-dot.local {
|
||||
background: #00ff88;
|
||||
box-shadow: 0 0 5px #00ff88;
|
||||
}
|
||||
|
||||
.status-env-label {
|
||||
font-family: var(--font-display);
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
color: #fff;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.status-env-portals {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
margin-bottom: 10px;
|
||||
max-height: 120px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.status-portal-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-family: var(--font-body);
|
||||
font-size: 11px;
|
||||
color: var(--color-text-muted);
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.status-portal-name {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.status-portal-indicator {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
margin-left: 8px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.status-env-summary {
|
||||
font-family: var(--font-body);
|
||||
font-size: 10px;
|
||||
color: var(--color-text-muted);
|
||||
padding-top: 8px;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.status-wall-legend {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
padding-top: 12px;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.legend-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-family: var(--font-body);
|
||||
font-size: 10px;
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.status-dot {
|
||||
display: inline-block;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.status-dot.online { background: var(--color-primary); box-shadow: 0 0 4px var(--color-primary); }
|
||||
.status-dot.active { background: var(--color-primary); box-shadow: 0 0 4px var(--color-primary); }
|
||||
.status-dot.standby { background: var(--color-gold); box-shadow: 0 0 4px var(--color-gold); }
|
||||
.status-dot.rebuilding { background: #ffa500; box-shadow: 0 0 4px #ffa500; }
|
||||
.status-dot.local-only { background: #00ff88; box-shadow: 0 0 4px #00ff88; }
|
||||
.status-dot.blocked { background: #ff0000; box-shadow: 0 0 4px #ff0000; }
|
||||
.status-dot.offline { background: var(--color-danger); box-shadow: 0 0 4px var(--color-danger); }
|
||||
|
||||
/* Additional status indicators for footer */
|
||||
.status-indicator.rebuilding { background: #ffa500; box-shadow: 0 0 5px #ffa500; }
|
||||
.status-indicator.local-only { background: #00ff88; box-shadow: 0 0 5px #00ff88; }
|
||||
.status-indicator.blocked { background: #ff0000; box-shadow: 0 0 5px #ff0000; }
|
||||
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
@@ -423,6 +586,12 @@ canvas#nexus-canvas {
|
||||
.atlas-content {
|
||||
max-height: 90vh;
|
||||
}
|
||||
.status-wall-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.atlas-status-wall {
|
||||
padding: 15px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Debug overlay */
|
||||
|
||||
Reference in New Issue
Block a user