Files
the-nexus/index.html
Alexander Whitestone 634092f60e
Some checks failed
CI / validate (pull_request) Has been cancelled
feat: add performance auto-detection and quality presets
- detectPerformanceTier() measures real frame time over 60 frames using
  requestAnimationFrame during scene init
- If avg FPS < 30 → LOW quality: bloom disabled, particles reduced from
  3000 → 800, core material simplified to wireframe MeshLambertMaterial
- Quality indicator badge added to HUD showing tier + detected FPS
- Full Three.js scene: stars, nexus core (icosahedron), particle cloud,
  floor grid, orbit controls, UnrealBloom post-processing
- CSS quality states: quality-high (green dot), quality-low (orange dot),
  quality-detecting (muted)

Fixes #94
2026-03-23 23:57:36 -04:00

78 lines
2.6 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Timmy's Nexus</title>
<meta name="description" content="A sovereign 3D world">
<meta property="og:title" content="Timmy's Nexus">
<meta property="og:description" content="A sovereign 3D world">
<meta property="og:image" content="https://example.com/og-image.png">
<meta property="og:type" content="website">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Timmy's Nexus">
<meta name="twitter:description" content="A sovereign 3D world">
<meta name="twitter:image" content="https://example.com/og-image.png">
<link rel="manifest" href="/manifest.json">
<link rel="stylesheet" href="style.css">
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.183.0/build/three.module.js",
"three/addons/": "https://unpkg.com/three@0.183.0/examples/jsm/"
}
}
</script>
</head>
<body>
<canvas id="canvas"></canvas>
<!-- Loading Screen -->
<div id="loading-screen">
<div class="loading-inner">
<div class="loading-title">◈ THE NEXUS</div>
<div class="loading-bar"><div id="loading-progress"></div></div>
<div id="loading-status">Initializing...</div>
</div>
</div>
<!-- HUD -->
<div id="hud">
<!-- Top-left: Nexus label -->
<div id="hud-title">◈ NEXUS</div>
<!-- Top-right: Quality indicator + audio toggle -->
<div id="hud-top-right">
<div id="quality-indicator" class="hud-badge" title="Rendering quality tier">
<span id="quality-label">DETECTING...</span>
</div>
<div id="audio-control">
<button id="audio-toggle" class="hud-btn" aria-label="Toggle ambient sound">🔊</button>
<audio id="ambient-sound" src="ambient.mp3" loop></audio>
</div>
</div>
<!-- Bottom-left: navigation hint -->
<div id="hud-hint">WASD + drag to explore</div>
</div>
<!-- Chat Panel (Timmy Terminal) -->
<div id="chat-panel">
<div id="chat-header">
<span>TIMMY TERMINAL</span>
<button id="chat-close" class="hud-btn" aria-label="Close chat"></button>
</div>
<div id="chat-messages"></div>
<div id="chat-input-row">
<input id="chat-input" type="text" placeholder="Message Timmy..." autocomplete="off">
<button id="chat-send" class="hud-btn">SEND</button>
</div>
</div>
<!-- Chat toggle -->
<button id="chat-toggle" class="hud-btn" aria-label="Toggle chat">💬</button>
<script type="module" src="app.js"></script>
</body>
</html>