Initial commit — Singular Particular Space v1
Homepage (site/index.html): integration-v14 promoted, Writings section integrated with 33 pieces clustered by type (stories/essays/miscellany), Writings welcome lightbox, content frame at 98% opacity. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,596 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!--
|
||||
DRAFT: Starfield Bold v3 (The Prismatic Ruins)
|
||||
AUTHOR: Gemini (Designer Agent)
|
||||
DATE: 2026-03-26
|
||||
|
||||
DESCRIPTION:
|
||||
The "BOLDER" direction v2: Vaporwave + Mad Max + Rainforest + Fairies.
|
||||
Focus on "Visible Personality" for stars and a deeper "Enchanted Twilight" feel.
|
||||
|
||||
NEW IN THIS VERSION:
|
||||
- STAR NODE PERSONALITIES: Each node is a unique celestial/magical object (Beacon, Binary, Pulsar, Flora, Hearth, Nebula Point, Spark, Flow).
|
||||
- REFINED CRT GHOST: Precision scanlines (0.04) and phosphor vignette. 1px phosphor line on Lightbox.
|
||||
- ENHANCED STAR FIELD: Weighted 8-color distribution (Cool/Warm White, Blue, Gold, Pink, Orchid, Mint, Coral).
|
||||
- PRISMATIC NEBULAE: 5 layers with slightly higher saturation but low opacity (0.05).
|
||||
- LUSH SKYLINE: Polychromatic window lights (Amber/Teal/Orchid/Pink/Phosphor) and Mint/Orchid bioluminescence.
|
||||
- BUMPED TEXT: 13px star labels, 12px billboards, 16px lightbox body.
|
||||
- CAMPFIRE LIGHTBOX: Double-border with orchid-fairy magic and phosphor cursor line.
|
||||
|
||||
CONSTRAINTS:
|
||||
- No transform animations on hover (using width/height).
|
||||
- Transitions 150ms ease.
|
||||
- Border-radius max 10px.
|
||||
- Box-shadow blur max 8px.
|
||||
- Font: Space Grotesk.
|
||||
-->
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Singular Particular Space | Starfield Bold v3</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Emoji&family=Space+Grotesk:wght@300;400;500;600&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
:root {
|
||||
/* Core Void */
|
||||
--bg-void: #04060b;
|
||||
--bg-deep: #060a14;
|
||||
--bg-warm: #0d1320;
|
||||
|
||||
/* The Campfire */
|
||||
--fire-amber: #e8943a;
|
||||
--fire-coral: #d4654a;
|
||||
--paradise: #ff7f3f;
|
||||
|
||||
/* Prismatic/Fairy Palette */
|
||||
--orchid: #c558d9;
|
||||
--fairy-pink: #f472b6;
|
||||
--toucan-gold: #ffcf40;
|
||||
--mint-glow: #86efac;
|
||||
--neon-teal: #2ac4b3;
|
||||
--waterfall: #3fbfaf;
|
||||
--cosmic-purple:#4a1d6e;
|
||||
|
||||
/* CRT Ghost */
|
||||
--phosphor: #00ff41;
|
||||
|
||||
/* Text */
|
||||
--text-warm: #e8d5b8;
|
||||
--text-muted: #6a7a8a;
|
||||
}
|
||||
|
||||
*, *::before, *::after {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
|
||||
background: var(--bg-void);
|
||||
color: var(--text-warm);
|
||||
overflow: hidden;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* ── CRT GHOST LAYERS ── */
|
||||
|
||||
/* Static Scanlines */
|
||||
body::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: repeating-linear-gradient(
|
||||
0deg,
|
||||
transparent,
|
||||
transparent 2px,
|
||||
rgba(0, 0, 0, 0.04) 2px,
|
||||
rgba(0, 0, 0, 0.04) 4px
|
||||
);
|
||||
pointer-events: none;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
/* Phosphor Vignette */
|
||||
body::after {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.35) 100%);
|
||||
pointer-events: none;
|
||||
z-index: 9998;
|
||||
}
|
||||
|
||||
/* ── Zone 1: Star Map ── */
|
||||
|
||||
#star-zone {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
background: radial-gradient(circle at 50% 50%, #0a0e1a 0%, var(--bg-void) 100%);
|
||||
}
|
||||
|
||||
#nebula-canvas, #star-canvas {
|
||||
position: absolute;
|
||||
top: 0; left: 0;
|
||||
width: 100%; height: 100%;
|
||||
}
|
||||
|
||||
#nebula-canvas { z-index: 0; }
|
||||
#star-canvas { z-index: 1; }
|
||||
|
||||
#constellation-svg {
|
||||
position: absolute;
|
||||
top: 0; left: 0;
|
||||
width: 100%; height: 100%;
|
||||
z-index: 2;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.constellation-line {
|
||||
stroke-width: 1.2;
|
||||
stroke-linecap: round;
|
||||
animation: line-pulse 10s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes line-pulse {
|
||||
0%, 100% { stroke-opacity: 0.08; }
|
||||
50% { stroke-opacity: 0.25; }
|
||||
}
|
||||
|
||||
/* ── Star Nodes (Personality Layer) ── */
|
||||
|
||||
.star-node {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
cursor: pointer;
|
||||
transform: translate(-50%, -50%);
|
||||
outline: none;
|
||||
border: none;
|
||||
background: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.star-visual {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.star-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
transition: width 150ms ease, height 150ms ease, box-shadow 150ms ease, background 150ms ease;
|
||||
box-shadow: 0 0 4px #fff;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.star-label {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: var(--text-muted);
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: lowercase;
|
||||
white-space: nowrap;
|
||||
opacity: 0.6;
|
||||
transition: opacity 150ms ease, color 150ms ease;
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
/* Star Bloom (Hover/Focus) */
|
||||
.star-node:hover .star-dot,
|
||||
.star-node:focus .star-dot,
|
||||
.star-node.current .star-dot {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: var(--fire-amber) !important;
|
||||
box-shadow: 0 0 8px var(--fire-amber) !important;
|
||||
}
|
||||
|
||||
.star-node:hover .star-label,
|
||||
.star-node:focus .star-label,
|
||||
.star-node.current .star-label {
|
||||
color: var(--text-warm);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Personality 1: Writings (The Beacon) - Cross-hair glow */
|
||||
.star-node[data-star="writings"] .star-dot { background: var(--orchid); box-shadow: 0 0 6px var(--orchid); }
|
||||
.star-node[data-star="writings"] .star-visual::before,
|
||||
.star-node[data-star="writings"] .star-visual::after {
|
||||
content: ''; position: absolute; background: var(--orchid); opacity: 0.2; transition: opacity 150ms;
|
||||
}
|
||||
.star-node[data-star="writings"] .star-visual::before { width: 1px; height: 100%; }
|
||||
.star-node[data-star="writings"] .star-visual::after { width: 100%; height: 1px; }
|
||||
|
||||
/* Personality 2: Videos (The Binary) - Twin dots */
|
||||
.star-node[data-star="videos"] .star-dot { background: var(--fire-coral); box-shadow: 0 0 6px var(--fire-coral); }
|
||||
.star-node[data-star="videos"] .star-visual::before {
|
||||
content: ''; position: absolute; width: 4px; height: 4px; border-radius: 50%;
|
||||
background: var(--fire-coral); top: 0; right: 0; opacity: 0.5;
|
||||
}
|
||||
|
||||
/* Personality 3: Music (The Pulsar) - Multiple small dots */
|
||||
.star-node[data-star="music"] .star-dot { background: var(--neon-teal); box-shadow: 0 0 6px var(--neon-teal); }
|
||||
.star-node[data-star="music"] .star-visual::before {
|
||||
content: '· ·'; position: absolute; color: var(--neon-teal); font-size: 16px; top: -10px; opacity: 0.4;
|
||||
}
|
||||
|
||||
/* Personality 4: Images (The Flora) - Soft halo */
|
||||
.star-node[data-star="images"] .star-dot { background: var(--mint-glow); box-shadow: 0 0 6px var(--mint-glow); }
|
||||
.star-node[data-star="images"] .star-visual::before {
|
||||
content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%;
|
||||
border: 1px solid var(--mint-glow); opacity: 0.15;
|
||||
}
|
||||
|
||||
/* Personality 5: Playlists (The Hearth) - Intense flicker */
|
||||
.star-node[data-star="playlists"] .star-dot {
|
||||
background: var(--fairy-pink); box-shadow: 0 0 6px var(--fairy-pink);
|
||||
animation: hearth-flicker 4s ease-in-out infinite;
|
||||
}
|
||||
@keyframes hearth-flicker { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
|
||||
|
||||
/* Personality 6: Watchlists (The Nebula Point) - Tiny cloud */
|
||||
.star-node[data-star="watchlists"] .star-dot { background: var(--cosmic-purple); box-shadow: 0 0 6px var(--cosmic-purple); }
|
||||
.star-node[data-star="watchlists"] .star-visual::before {
|
||||
content: ''; position: absolute; width: 24px; height: 24px; border-radius: 50%;
|
||||
background: radial-gradient(circle, var(--cosmic-purple) 0%, transparent 70%); opacity: 0.2;
|
||||
}
|
||||
|
||||
/* Personality 7: Tools (The Spark) - Sharp intense */
|
||||
.star-node[data-star="toolsntoys"] .star-dot { background: var(--toucan-gold); box-shadow: 0 0 8px var(--toucan-gold); width: 6px; height: 6px; }
|
||||
|
||||
/* Personality 8: Creatorlists (The Flow) - Trail */
|
||||
.star-node[data-star="creatorlists"] .star-dot { background: var(--waterfall); box-shadow: 0 0 6px var(--waterfall); }
|
||||
.star-node[data-star="creatorlists"] .star-visual::before {
|
||||
content: '...'; position: absolute; color: var(--waterfall); right: -12px; font-size: 10px; opacity: 0.3;
|
||||
}
|
||||
|
||||
/* ── Transition Zone: Skyline ── */
|
||||
|
||||
#transition-zone {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 80vh;
|
||||
background: linear-gradient(to bottom, var(--bg-void) 0%, #080c14 40%, var(--bg-warm) 100%);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#skyline {
|
||||
position: absolute;
|
||||
bottom: 0; left: 0;
|
||||
width: 100%;
|
||||
height: 70%;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.building {
|
||||
background: #05080f;
|
||||
flex-shrink: 0;
|
||||
position: relative;
|
||||
border-top: 1px solid rgba(232, 148, 58, 0.04);
|
||||
}
|
||||
|
||||
/* Bioluminescent Moss & Highlights */
|
||||
.building.bio-orchid::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 15%; left: 0;
|
||||
width: 2px; height: 40%;
|
||||
background: var(--orchid);
|
||||
box-shadow: 0 0 6px var(--orchid);
|
||||
opacity: 0.12;
|
||||
}
|
||||
|
||||
.building.bio-mint::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 25%; right: 0;
|
||||
width: 1px; height: 35%;
|
||||
background: var(--mint-glow);
|
||||
box-shadow: 0 0 6px var(--mint-glow);
|
||||
opacity: 0.1;
|
||||
}
|
||||
|
||||
.billboard-nav {
|
||||
position: absolute;
|
||||
top: -2px; left: 50%;
|
||||
transform: translate(-50%, -100%);
|
||||
padding: 4px 10px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
border: 1px solid;
|
||||
background: rgba(4, 6, 11, 0.95);
|
||||
white-space: nowrap;
|
||||
text-decoration: none;
|
||||
transition: color 150ms ease, border-color 150ms ease;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.bb-teal { color: var(--neon-teal); border-color: rgba(42, 196, 179, 0.2); }
|
||||
.bb-amber { color: var(--fire-amber); border-color: rgba(232, 148, 58, 0.2); }
|
||||
.bb-orchid { color: var(--orchid); border-color: rgba(197, 88, 217, 0.2); }
|
||||
.bb-pink { color: var(--fairy-pink); border-color: rgba(244, 114, 182, 0.2); }
|
||||
.bb-mint { color: var(--mint-glow); border-color: rgba(134, 239, 172, 0.2); }
|
||||
|
||||
.billboard-nav:hover {
|
||||
color: var(--fire-amber) !important;
|
||||
border-color: var(--fire-amber) !important;
|
||||
}
|
||||
|
||||
/* ── Lightbox: Campfire Note ── */
|
||||
|
||||
#lightbox-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.85);
|
||||
z-index: 10000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#lightbox-overlay.hidden { display: none; }
|
||||
|
||||
#lightbox {
|
||||
background: var(--bg-warm);
|
||||
border: 1px solid var(--fire-amber);
|
||||
border-top: 4px solid var(--phosphor); /* CRT Cursor Line */
|
||||
border-radius: 4px;
|
||||
padding: 40px;
|
||||
max-width: 520px;
|
||||
width: 90%;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Orchid Inner Border (Fairy Magic) */
|
||||
#lightbox::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 6px;
|
||||
border: 1px solid rgba(197, 88, 217, 0.15);
|
||||
pointer-events: none;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
#lightbox p {
|
||||
font-size: 16px;
|
||||
line-height: 1.7;
|
||||
color: var(--text-warm);
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.nav-hint {
|
||||
font-size: 13px;
|
||||
color: var(--text-muted);
|
||||
margin-bottom: 32px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#lightbox-enter {
|
||||
padding: 10px 32px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--bg-void);
|
||||
background: var(--fire-amber);
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
transition: opacity 150ms ease;
|
||||
}
|
||||
|
||||
#lightbox-enter:hover { opacity: 0.9; }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="star-zone">
|
||||
<canvas id="nebula-canvas"></canvas>
|
||||
<canvas id="star-canvas"></canvas>
|
||||
<svg id="constellation-svg" xmlns="http://www.w3.org/2000/svg"></svg>
|
||||
</div>
|
||||
|
||||
<div id="transition-zone">
|
||||
<div id="skyline"></div>
|
||||
</div>
|
||||
|
||||
<div id="lightbox-overlay" class="hidden">
|
||||
<div id="lightbox">
|
||||
<p>Hello traveller, welcome to a singular, particular space. Feel free to explore this little pocket of the universe. It's an adventure, bring snacks. Happy wanderings, Myster Wizzard</p>
|
||||
<span class="nav-hint">click stars · arrow keys · escape to return</span>
|
||||
<button id="lightbox-enter">Enter</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
const STARS = [
|
||||
{ id: 'writings', label: 'Writings', x: 25, y: 18, color: '#c558d9' },
|
||||
{ id: 'videos', label: 'Videos', x: 68, y: 15, color: '#d4654a' },
|
||||
{ id: 'music', label: 'Music', x: 12, y: 42, color: '#2ac4b3' },
|
||||
{ id: 'images', label: 'Images', x: 55, y: 35, color: '#86efac' },
|
||||
{ id: 'playlists', label: 'Playlists', x: 78, y: 48, color: '#f472b6' },
|
||||
{ id: 'watchlists', label: 'Watchlists', x: 22, y: 65, color: '#4a1d6e' },
|
||||
{ id: 'toolsntoys', label: 'ToolsnToys', x: 50, y: 72, color: '#ffcf40' },
|
||||
{ id: 'creatorlists', label: 'Creatorlists', x: 75, y: 70, color: '#3fbfaf' }
|
||||
];
|
||||
|
||||
const CONNECTIONS = [
|
||||
['writings', 'videos'], ['music', 'playlists'], ['images', 'videos'],
|
||||
['watchlists', 'toolsntoys'], ['toolsntoys', 'creatorlists'], ['music', 'watchlists']
|
||||
];
|
||||
|
||||
const nebulaCanvas = document.getElementById('nebula-canvas');
|
||||
const starCanvas = document.getElementById('star-canvas');
|
||||
const nCtx = nebulaCanvas.getContext('2d');
|
||||
const sCtx = starCanvas.getContext('2d');
|
||||
let bgStars = [];
|
||||
|
||||
function resize() {
|
||||
nebulaCanvas.width = starCanvas.width = window.innerWidth;
|
||||
nebulaCanvas.height = starCanvas.height = window.innerHeight;
|
||||
drawNebulae();
|
||||
initStars();
|
||||
}
|
||||
|
||||
function drawNebulae() {
|
||||
nCtx.clearRect(0, 0, nebulaCanvas.width, nebulaCanvas.height);
|
||||
const washes = [
|
||||
{ x: 0.2, y: 0.3, r: 0.5, color: 'rgba(197, 88, 217, 0.05)' }, // Orchid
|
||||
{ x: 0.8, y: 0.2, r: 0.6, color: 'rgba(42, 196, 179, 0.05)' }, // Teal
|
||||
{ x: 0.5, y: 0.7, r: 0.5, color: 'rgba(244, 114, 182, 0.05)' }, // Fairy Pink
|
||||
{ x: 0.7, y: 0.8, r: 0.4, color: 'rgba(74, 29, 110, 0.06)' }, // Deep Purple
|
||||
{ x: 0.3, y: 0.6, r: 0.5, color: 'rgba(232, 148, 58, 0.04)' } // Amber
|
||||
];
|
||||
|
||||
washes.forEach(w => {
|
||||
const grad = nCtx.createRadialGradient(
|
||||
w.x * nebulaCanvas.width, w.y * nebulaCanvas.height, 0,
|
||||
w.x * nebulaCanvas.width, w.y * nebulaCanvas.height, w.r * nebulaCanvas.width
|
||||
);
|
||||
grad.addColorStop(0, w.color);
|
||||
grad.addColorStop(1, 'transparent');
|
||||
nCtx.fillStyle = grad;
|
||||
nCtx.fillRect(0, 0, nebulaCanvas.width, nebulaCanvas.height);
|
||||
});
|
||||
}
|
||||
|
||||
function initStars() {
|
||||
bgStars = [];
|
||||
const colorClasses = [
|
||||
'rgba(200,210,230,', // Cool White
|
||||
'rgba(240,220,190,', // Warm White
|
||||
'rgba(140,180,230,', // Pale Blue
|
||||
'rgba(255,207,64,', // Toucan Gold
|
||||
'rgba(244,114,182,', // Fairy Pink
|
||||
'rgba(197,88,217,', // Orchid
|
||||
'rgba(134,239,172,', // Mint Green
|
||||
'rgba(212,101,74,' // Coral
|
||||
];
|
||||
|
||||
for(let i=0; i<350; i++) {
|
||||
const r = Math.random() < 0.1 ? Math.random() * 1.5 + 1.5 : Math.random() * 1.5 + 0.3;
|
||||
bgStars.push({
|
||||
x: Math.random() * starCanvas.width,
|
||||
y: Math.random() * starCanvas.height,
|
||||
r: r,
|
||||
colorBase: colorClasses[Math.floor(Math.random()*colorClasses.length)],
|
||||
opacity: Math.random() * 0.7 + 0.3,
|
||||
speed: Math.random() * 0.6 + 0.2,
|
||||
phase: Math.random() * Math.PI * 2
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function draw(time) {
|
||||
sCtx.clearRect(0, 0, starCanvas.width, starCanvas.height);
|
||||
const t = time * 0.001;
|
||||
bgStars.forEach(s => {
|
||||
const a = s.opacity + Math.sin(t * s.speed + s.phase) * 0.2;
|
||||
sCtx.beginPath();
|
||||
sCtx.arc(s.x, s.y, s.r, 0, Math.PI*2);
|
||||
sCtx.fillStyle = s.colorBase + Math.max(0.1, Math.min(1, a)) + ')';
|
||||
sCtx.fill();
|
||||
});
|
||||
requestAnimationFrame(draw);
|
||||
}
|
||||
|
||||
// Nodes & Lines
|
||||
const starZone = document.getElementById('star-zone');
|
||||
const svg = document.getElementById('constellation-svg');
|
||||
|
||||
STARS.forEach(s => {
|
||||
const btn = document.createElement('button');
|
||||
btn.className = 'star-node';
|
||||
btn.dataset.star = s.id;
|
||||
btn.style.left = s.x + '%';
|
||||
btn.style.top = s.y + '%';
|
||||
btn.innerHTML = `<div class="star-visual"><span class="star-dot"></span></div><span class="star-label">${s.label}</span>`;
|
||||
starZone.appendChild(btn);
|
||||
});
|
||||
|
||||
CONNECTIONS.forEach(pair => {
|
||||
const s1 = STARS.find(s => s.id === pair[0]);
|
||||
const s2 = STARS.find(s => s.id === pair[1]);
|
||||
const line = document.createElementNS('http://www.w3.org/2000/svg', 'line');
|
||||
line.setAttribute('x1', s1.x + '%'); line.setAttribute('y1', s1.y + '%');
|
||||
line.setAttribute('x2', s2.x + '%'); line.setAttribute('y2', s2.y + '%');
|
||||
line.setAttribute('class', 'constellation-line');
|
||||
line.setAttribute('stroke', s1.color);
|
||||
line.setAttribute('stroke-opacity', '0.15');
|
||||
svg.appendChild(line);
|
||||
});
|
||||
|
||||
// Skyline
|
||||
function initSkyline() {
|
||||
const skyline = document.getElementById('skyline');
|
||||
const bbColors = ['bb-teal', 'bb-amber', 'bb-orchid', 'bb-pink', 'bb-mint'];
|
||||
const winColors = ['var(--fire-amber)', 'var(--neon-teal)', 'var(--orchid)', 'var(--fairy-pink)', 'var(--phosphor)'];
|
||||
|
||||
for(let i=0; i<45; i++) {
|
||||
const b = document.createElement('div');
|
||||
b.className = 'building';
|
||||
const bio = Math.random();
|
||||
if(bio > 0.88) b.classList.add('bio-orchid');
|
||||
else if(bio > 0.75) b.classList.add('bio-mint');
|
||||
|
||||
const w = 18 + Math.random() * 55;
|
||||
const h = 40 + Math.random() * 320;
|
||||
b.style.width = w + 'px';
|
||||
b.style.height = h + 'px';
|
||||
b.style.marginRight = '2px';
|
||||
|
||||
if(h > 80) {
|
||||
for(let j=0; j<Math.floor(h/35); j++) {
|
||||
const win = document.createElement('div');
|
||||
const wc = winColors[Math.floor(Math.random()*winColors.length)];
|
||||
win.style.cssText = `position:absolute; width:2px; height:2px; background:${wc}; opacity:${Math.random()*0.3}; left:${Math.random()*w}px; top:${30+j*30}px;`;
|
||||
b.appendChild(win);
|
||||
}
|
||||
}
|
||||
|
||||
if(Math.random() > 0.88) {
|
||||
const bb = document.createElement('div');
|
||||
bb.className = 'billboard-nav ' + bbColors[Math.floor(Math.random()*bbColors.length)];
|
||||
bb.textContent = 'SIGNAL';
|
||||
b.appendChild(bb);
|
||||
}
|
||||
skyline.appendChild(b);
|
||||
}
|
||||
}
|
||||
|
||||
// Lightbox
|
||||
const overlay = document.getElementById('lightbox-overlay');
|
||||
if(!localStorage.getItem('sp-welcomed')) overlay.classList.remove('hidden');
|
||||
document.getElementById('lightbox-enter').onclick = () => {
|
||||
overlay.classList.add('hidden');
|
||||
localStorage.setItem('sp-welcomed', 'true');
|
||||
};
|
||||
|
||||
window.onresize = resize;
|
||||
resize();
|
||||
initSkyline();
|
||||
requestAnimationFrame(draw);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user