Files
the-nexus/index.html
Alexander Whitestone f763e0aff0
Some checks failed
CI / validate (pull_request) Has been cancelled
feat: add right-click object inspection for 3D scene objects
Right-clicking any inspectable 3D mesh now shows a floating tooltip with
its name and description. Uses Three.js Raycaster for hit detection.

Also adds initial inspectable objects to the scene:
- Nexus Core (central glowing orb)
- Portal Alpha, Beta, Gamma (orbiting sentinel cubes)

Tooltip auto-positions near cursor and stays within viewport bounds.
Dismissed by clicking elsewhere or pressing Escape.

Fixes #141

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 00:02:51 -04:00

48 lines
2.0 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>
<!-- Top Right: Audio Toggle -->
<div id="audio-control" class="hud-controls" style="position: absolute; top: 8px; right: 8px;">
<button id="audio-toggle" class="chat-toggle-btn" aria-label="Toggle ambient sound" style="background-color: var(--color-primary); color: var(--color-bg); padding: 4px 8px; border-radius: 4px; font-size: 12px; cursor: pointer;">
🔊
</button>
<button id="debug-toggle" class="chat-toggle-btn" aria-label="Toggle debug mode" style="background-color: var(--color-secondary); color: var(--color-bg); padding: 4px 8px; border-radius: 4px; font-size: 12px; cursor: pointer;">
🔍
</button>
<audio id="ambient-sound" src="ambient.mp3" loop></audio>
</div>
<!-- Object inspection tooltip -->
<div id="inspect-tooltip">
<div class="inspect-name" id="inspect-name"></div>
<div class="inspect-desc" id="inspect-desc"></div>
</div>
<script type="module" src="app.js"></script>
</body>
</html>