Feature: Portal system — entry points to other worlds (#5) (#43)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled

Co-authored-by: Google Gemini <gemini@hermes.local>
Co-committed-by: Google Gemini <gemini@hermes.local>
This commit was merged in pull request #43.
This commit is contained in:
2026-03-24 02:29:45 +00:00
committed by Timmy Time
parent e293fbf7e4
commit d0edfe8725
4 changed files with 1079 additions and 222 deletions

1110
app.js

File diff suppressed because it is too large Load Diff

View File

@@ -101,6 +101,32 @@
<span>V</span> mode: <span id="nav-mode-label">WALK</span>
<span id="nav-mode-hint" class="nav-mode-hint"></span>
</div>
<!-- Portal Hint -->
<div id="portal-hint" class="portal-hint" style="display:none;">
<div class="portal-hint-key">F</div>
<div class="portal-hint-text">Enter <span id="portal-hint-name"></span></div>
</div>
<!-- Portal Activation Overlay -->
<div id="portal-overlay" class="portal-overlay" style="display:none;">
<div class="portal-overlay-content">
<div class="portal-overlay-header">
<div class="portal-overlay-status" id="portal-status-dot"></div>
<div class="portal-overlay-title" id="portal-overlay-title">PORTAL ACTIVATED</div>
</div>
<h2 id="portal-name-display">MORROWIND</h2>
<p id="portal-desc-display">The Vvardenfell harness. Ash storms and ancient mysteries.</p>
<div class="portal-redirect-box" id="portal-redirect-box">
<div class="portal-redirect-label">REDIRECTING IN</div>
<div class="portal-redirect-timer" id="portal-timer">5</div>
</div>
<div class="portal-error-box" id="portal-error-box" style="display:none;">
<div class="portal-error-msg">DESTINATION NOT YET LINKED</div>
<button id="portal-close-btn" class="portal-close-btn">CLOSE</button>
</div>
</div>
</div>
</div>
<!-- Click to Enter -->

44
portals.json Normal file
View File

@@ -0,0 +1,44 @@
[
{
"id": "morrowind",
"name": "Morrowind",
"description": "The Vvardenfell harness. Ash storms and ancient mysteries.",
"status": "online",
"color": "#ff6600",
"position": { "x": 15, "y": 0, "z": -10 },
"rotation": { "y": -0.5 },
"destination": {
"url": "https://morrowind.timmy.foundation",
"type": "harness",
"params": { "world": "vvardenfell" }
}
},
{
"id": "bannerlord",
"name": "Bannerlord",
"description": "Calradia battle harness. Massive armies, tactical command.",
"status": "online",
"color": "#ffd700",
"position": { "x": -15, "y": 0, "z": -10 },
"rotation": { "y": 0.5 },
"destination": {
"url": "https://bannerlord.timmy.foundation",
"type": "harness",
"params": { "world": "calradia" }
}
},
{
"id": "workshop",
"name": "Workshop",
"description": "The creative harness. Build, script, and manifest.",
"status": "online",
"color": "#4af0c0",
"position": { "x": 0, "y": 0, "z": -20 },
"rotation": { "y": 0 },
"destination": {
"url": "https://workshop.timmy.foundation",
"type": "harness",
"params": { "mode": "creative" }
}
}
]

121
style.css
View File

@@ -221,6 +221,127 @@ canvas#nexus-canvas {
letter-spacing: 0.05em;
}
/* Portal Hint */
.portal-hint {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, 100px);
display: flex;
align-items: center;
gap: var(--space-2);
background: rgba(0, 0, 0, 0.8);
padding: var(--space-2) var(--space-4);
border: 1px solid var(--color-primary);
border-radius: 4px;
animation: hint-float 2s ease-in-out infinite;
}
@keyframes hint-float {
0%, 100% { transform: translate(-50%, 100px); }
50% { transform: translate(-50%, 90px); }
}
.portal-hint-key {
background: var(--color-primary);
color: var(--color-bg);
font-weight: 700;
padding: 2px 8px;
border-radius: 2px;
}
.portal-hint-text {
font-size: var(--text-sm);
font-weight: 500;
letter-spacing: 0.05em;
}
#portal-hint-name {
color: var(--color-primary);
font-weight: 700;
}
/* Portal Activation Overlay */
.portal-overlay {
position: fixed;
inset: 0;
background: rgba(5, 5, 16, 0.95);
display: flex;
align-items: center;
justify-content: center;
pointer-events: auto;
z-index: 1000;
}
.portal-overlay-content {
width: 100%;
max-width: 500px;
text-align: center;
padding: var(--space-8);
}
.portal-overlay-header {
display: flex;
align-items: center;
justify-content: center;
gap: var(--space-3);
margin-bottom: var(--space-4);
}
.portal-overlay-status {
width: 12px;
height: 12px;
border-radius: 50%;
background: var(--color-primary);
box-shadow: 0 0 10px var(--color-primary);
}
.portal-overlay-title {
font-family: var(--font-display);
font-size: var(--text-sm);
letter-spacing: 0.2em;
color: var(--color-primary);
}
.portal-overlay-content h2 {
font-family: var(--font-display);
font-size: var(--text-2xl);
margin-bottom: var(--space-4);
letter-spacing: 0.1em;
}
.portal-overlay-content p {
color: var(--color-text-muted);
font-size: var(--text-base);
line-height: 1.6;
margin-bottom: var(--space-8);
}
.portal-redirect-box {
border: 1px solid var(--color-primary-dim);
padding: var(--space-6);
border-radius: var(--panel-radius);
}
.portal-redirect-label {
font-size: var(--text-xs);
letter-spacing: 0.2em;
margin-bottom: var(--space-2);
}
.portal-redirect-timer {
font-family: var(--font-display);
font-size: 48px;
font-weight: 700;
color: var(--color-primary);
}
.portal-error-box {
border: 1px solid var(--color-danger);
padding: var(--space-6);
border-radius: var(--panel-radius);
}
.portal-error-msg {
color: var(--color-danger);
font-weight: 700;
margin-bottom: var(--space-4);
}
.portal-close-btn {
background: var(--color-danger);
color: white;
border: none;
padding: var(--space-2) var(--space-6);
border-radius: 4px;
font-family: var(--font-display);
cursor: pointer;
}
/* === CHAT PANEL === */
.chat-panel {
position: absolute;