Spaces:
Paused
Paused
STUDIUS R1: restore original 3D engine-core/node scene as main view (springs, momentum, zoom/pinch, modern intro, no retro)
Browse files- app.js +238 -348
- index.html +21 -62
- style.css +129 -162
app.js
CHANGED
|
@@ -1,37 +1,20 @@
|
|
| 1 |
import * as THREE from './vendor/three.module.min.js';
|
| 2 |
-
import { STUDIOS, stopLoops } from './widgets.js?v=
|
| 3 |
-
import { icon } from './icons.js?v=
|
|
|
|
| 4 |
import { EffectComposer } from './vendor/addons/postprocessing/EffectComposer.js';
|
| 5 |
import { RenderPass } from './vendor/addons/postprocessing/RenderPass.js';
|
| 6 |
import { UnrealBloomPass } from './vendor/addons/postprocessing/UnrealBloomPass.js';
|
| 7 |
import { OutputPass } from './vendor/addons/postprocessing/OutputPass.js';
|
| 8 |
-
import { RoomEnvironment } from './vendor/addons/environments/RoomEnvironment.js';
|
| 9 |
|
| 10 |
const $ = (s) => document.querySelector(s);
|
| 11 |
const isMobile = matchMedia('(pointer:coarse)').matches || innerWidth < 700;
|
| 12 |
let quality = isMobile ? 'low' : 'high', qMode = 'AUTO';
|
| 13 |
-
const GOLD = 0xf2c94c;
|
| 14 |
-
const DESC = {
|
| 15 |
-
chat: 'Sprich mit dem Schwarm. Antworten entstehen aus vielen kleinen Agenten, die zusammenarbeiten.',
|
| 16 |
-
image: 'Bilder bearbeiten mit Farbton, Pinsel und Ebenen – schnell, direkt, ohne Umwege.',
|
| 17 |
-
videogen: 'Aus einer Idee wird ein Clip. Prompt eingeben, Engine rendert die Szene.',
|
| 18 |
-
videoedit: 'Clips auf der Timeline anordnen, schneiden und abspielen.',
|
| 19 |
-
audio: 'Wellenform bearbeiten, Bereiche auswählen und die Lautstärke formen.',
|
| 20 |
-
stems: 'Einen Song in Gesang, Drums, Bass und Rest zerlegen.',
|
| 21 |
-
music: 'Musik aus Text erzeugen – Stil wählen, generieren, anhören.',
|
| 22 |
-
auto: 'Workflows aus Knoten bauen: Trigger, Agenten, Filter und Aktionen.',
|
| 23 |
-
agent: 'Eigene Agenten mit Rolle, Werkzeugen und Gedächtnis zusammenstellen.',
|
| 24 |
-
code: 'Code schreiben und direkt im Studio ausführen.',
|
| 25 |
-
community: 'Entdecken, teilen und liken, was andere im Schwarm gebaut haben.',
|
| 26 |
-
sandbox: 'Eine isolierte Shell zum Experimentieren.',
|
| 27 |
-
design: 'Formen, Layouts und Ideen auf einem gemeinsamen Board.',
|
| 28 |
-
canvas: 'Freihand zeichnen – Skizzen, Notizen, Konzepte.',
|
| 29 |
-
merge: 'Neue Module an die Meta-Engine andocken und den Schwarm erweitern.',
|
| 30 |
-
};
|
| 31 |
|
| 32 |
/* ---------- sound (off by default) ---------- */
|
| 33 |
let ac = null, soundOn = false;
|
| 34 |
-
function beep(f = 440, d = .06, type = '
|
| 35 |
if (!soundOn) return; try {
|
| 36 |
ac = ac || new (window.AudioContext || window.webkitAudioContext)();
|
| 37 |
const o = ac.createOscillator(), g = ac.createGain(); o.type = type; o.frequency.value = f;
|
|
@@ -39,360 +22,267 @@ function beep(f = 440, d = .06, type = 'sine', v = .035) {
|
|
| 39 |
o.connect(g).connect(ac.destination); o.start(); o.stop(ac.currentTime + d);
|
| 40 |
} catch (e) {}
|
| 41 |
}
|
| 42 |
-
function toggleSound() { soundOn = !soundOn;
|
|
|
|
| 43 |
|
| 44 |
-
/* ---------- three ---------- */
|
| 45 |
let renderer = null, gl3d = true, composer = null, bloom = null;
|
| 46 |
try {
|
| 47 |
-
renderer = new THREE.WebGLRenderer({ canvas: $('#gl'), antialias:
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
if (
|
| 52 |
-
|
| 53 |
-
const
|
| 54 |
-
const
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
}
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
const
|
| 63 |
-
scene.add(new THREE.
|
| 64 |
-
|
| 65 |
-
const
|
| 66 |
-
|
| 67 |
-
const energyMat = new THREE.ShaderMaterial({
|
| 68 |
-
uniforms: { t: { value: 0 }, pulse: { value: 0 }, gain: { value: 1 } },
|
| 69 |
-
vertexShader: `varying vec3 vP; varying vec3 vN; varying vec3 vV; uniform float t;
|
| 70 |
-
void main(){ vP=position; vN=normalize(normalMatrix*normal); vec4 mv=modelViewMatrix*vec4(position,1.); vV=normalize(-mv.xyz); gl_Position=projectionMatrix*mv; }`,
|
| 71 |
-
fragmentShader: `varying vec3 vP; varying vec3 vN; varying vec3 vV; uniform float t; uniform float pulse; uniform float gain;
|
| 72 |
-
float h(vec3 p){return fract(sin(dot(p,vec3(127.1,311.7,74.7)))*43758.5453);}
|
| 73 |
-
float n(vec3 p){vec3 i=floor(p),f=fract(p);f=f*f*(3.-2.*f);
|
| 74 |
-
return mix(mix(mix(h(i),h(i+vec3(1,0,0)),f.x),mix(h(i+vec3(0,1,0)),h(i+vec3(1,1,0)),f.x),f.y),mix(mix(h(i+vec3(0,0,1)),h(i+vec3(1,0,1)),f.x),mix(h(i+vec3(0,1,1)),h(i+vec3(1,1,1)),f.x),f.y),f.z);}
|
| 75 |
-
float fbm(vec3 p){float a=.5,s=0.;for(int i=0;i<5;i++){s+=a*n(p);p*=2.03;a*=.5;}return s;}
|
| 76 |
-
void main(){ vec3 p=normalize(vP)*2.2; float q=fbm(p+vec3(0.,t*.25,t*.15)); float r=fbm(p*1.7+q*2.2-vec3(t*.2,0.,0.));
|
| 77 |
-
float veins=smoothstep(.47,.53,r)*(1.-smoothstep(.53,.6,r));
|
| 78 |
-
float fr=pow(1.-max(dot(vN,vV),0.),2.2);
|
| 79 |
-
vec3 deep=vec3(.035,.018,.004), mid=vec3(.42,.24,.05), gold=vec3(1.,.74,.26), hot=vec3(1.,.9,.62);
|
| 80 |
-
float body=smoothstep(.25,.85,q);
|
| 81 |
-
vec3 c=mix(deep,mid,body*.8)+gold*veins*(1.1+pulse)+hot*pow(veins,3.)*.5+gold*fr*1.1;
|
| 82 |
-
gl_FragColor=vec4(c*(1.+pulse*.6)*gain,1.); }`,
|
| 83 |
-
});
|
| 84 |
-
const energy = new THREE.Mesh(new THREE.SphereGeometry(1.25, 96, 96), energyMat); orb.add(energy);
|
| 85 |
-
const glassMat = new THREE.MeshPhysicalMaterial({ color: 0xffffff, metalness: 0, roughness: .04, transmission: 1, thickness: 1.2, ior: 1.45, clearcoat: 1, clearcoatRoughness: .05,
|
| 86 |
-
iridescence: .35, iridescenceIOR: 1.3, attenuationColor: new THREE.Color(0xffe2a0), attenuationDistance: 6, specularIntensity: 1, envMapIntensity: 1.4, transparent: true });
|
| 87 |
-
const glass = new THREE.Mesh(new THREE.SphereGeometry(1.85, 128, 128), glassMat); orb.add(glass);
|
| 88 |
-
const goldMat = new THREE.MeshPhysicalMaterial({ color: 0xe8b84a, metalness: 1, roughness: .18, clearcoat: .6, clearcoatRoughness: .1, envMapIntensity: 1.6 });
|
| 89 |
-
const rings = [[2.55, .028, 1.2, 0, .12], [2.95, .016, 1.75, .5, -.08], [3.4, .04, 1.45, -.35, .05]].map(([R, tube, rx, ry, sp]) => {
|
| 90 |
-
const m = new THREE.Mesh(new THREE.TorusGeometry(R, tube, 32, 300), goldMat); m.rotation.set(rx, ry, 0); m.userData.sp = sp; m.castShadow = true; orb.add(m); return m; });
|
| 91 |
-
// fine tick ring (flat)
|
| 92 |
-
{ const g = new THREE.RingGeometry(4.1, 4.13, 256); const m = new THREE.Mesh(g, new THREE.MeshBasicMaterial({ color: GOLD, transparent: true, opacity: .25, side: THREE.DoubleSide })); m.rotation.x = Math.PI / 2 + .32; m.rotation.y = .2; m.visible = false; orb.add(m); }
|
| 93 |
-
// studio satellites
|
| 94 |
-
const satGeo = new THREE.SphereGeometry(.16, 48, 48);
|
| 95 |
-
const sats = STUDIOS.map((s, i) => {
|
| 96 |
-
const m = new THREE.Mesh(satGeo, new THREE.MeshPhysicalMaterial({ color: s.id === 'merge' ? 0xf85525 : 0xf2c94c, metalness: .9, roughness: .15, clearcoat: 1, emissive: s.id === 'merge' ? 0xf85525 : 0xf2c94c, emissiveIntensity: .05 }));
|
| 97 |
-
m.castShadow = true; m.userData = { a: i / STUDIOS.length * Math.PI * 2, R: 4.1, y: 0 }; orb.add(m); return m; });
|
| 98 |
-
// floor (soft shadow catcher + faint reflection)
|
| 99 |
-
const floor = new THREE.Mesh(new THREE.CircleGeometry(30, 96), new THREE.ShadowMaterial({ opacity: .45, color: 0x000000 })); floor.rotation.x = -Math.PI / 2; floor.position.y = -3.4; floor.receiveShadow = true; scene.add(floor);
|
| 100 |
-
const shadowCatcher = floor;
|
| 101 |
-
// fine particles
|
| 102 |
-
const PN = isMobile ? 700 : 1800; const pp = new Float32Array(PN * 3), pv = new Float32Array(PN * 3), pseed = new Float32Array(PN);
|
| 103 |
-
for (let i = 0; i < PN; i++) { const r = 3 + Math.random() * 14, a = Math.random() * 6.283, y = (Math.random() - .5) * 8; pp.set([Math.cos(a) * r, y, Math.sin(a) * r], i * 3); pseed[i] = Math.random(); }
|
| 104 |
-
const pGeo = new THREE.BufferGeometry(); pGeo.setAttribute('position', new THREE.BufferAttribute(pp, 3));
|
| 105 |
-
const dotTex = (() => { const c = document.createElement('canvas'); c.width = c.height = 64; const x = c.getContext('2d'); const g = x.createRadialGradient(32, 32, 0, 32, 32, 32); g.addColorStop(0, 'rgba(255,240,200,1)'); g.addColorStop(.25, 'rgba(242,201,76,.6)'); g.addColorStop(1, 'rgba(0,0,0,0)'); x.fillStyle = g; x.fillRect(0, 0, 64, 64); const t = new THREE.CanvasTexture(c); t.colorSpace = THREE.SRGBColorSpace; return t; })();
|
| 106 |
-
const parts = new THREE.Points(pGeo, new THREE.PointsMaterial({ size: .07, map: dotTex, transparent: true, opacity: .7, depthWrite: false, blending: THREE.AdditiveBlending })); scene.add(parts);
|
| 107 |
-
let bursting = 0; function burst(k = 1) { bursting = Math.max(bursting, k); }
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
|
| 119 |
-
/*
|
| 120 |
const CATS = ['Alle', 'Text', 'Bild', 'Video', 'Audio', 'Automation', 'Code', 'Community', 'Design'];
|
| 121 |
-
const
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
const
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
}
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
$('#hOpen').onclick = () => open(sel);
|
| 149 |
-
const pop = $('#pop'), scrim = $('#scrim');
|
| 150 |
function open(i) {
|
| 151 |
-
|
| 152 |
-
pop.innerHTML = `<div class="ph"><span class="pi">${icon(s.id)}</span><span class="pt"><b>${s.name}</b><small>${s.cat === '+' ? 'Modul' : s.cat} · ${s.like}</small></span><button
|
| 153 |
-
pop.
|
| 154 |
-
pop.querySelector('.ph button').onclick = close; s.build(pop.querySelector('.pb'));
|
| 155 |
-
sats.forEach((m, k) => m.material.emissiveIntensity = k === i ? .8 : .05);
|
| 156 |
}
|
| 157 |
-
function close() {
|
| 158 |
-
|
| 159 |
-
|
|
|
|
|
|
|
|
|
|
| 160 |
}
|
| 161 |
-
scrim.onclick = () => { if (guideOn) toggleGuide(false); else close(); };
|
| 162 |
-
window.addEventListener('studius-merge', () => { burst(); toast('Neues Modul angedockt'); });
|
| 163 |
-
function toast(msg) { const t = $('#toast'); t.innerHTML = `<img src="assets/einswarm-mascot.webp" alt="">${msg}`; t.hidden = false; t.style.animation = 'none'; void t.offsetWidth; t.style.animation = ''; clearTimeout(toast.h); toast.h = setTimeout(() => t.hidden = true, 4000); }
|
| 164 |
-
// guide
|
| 165 |
-
const gEl = $('#guide');
|
| 166 |
-
CATS.forEach((c, k) => { const b = document.createElement('button'); b.type = 'button'; b.className = 'gi'; b.innerHTML = `${icon(k ? (STUDIOS.find(s => s.cat === c) || STUDIOS[0]).id : 'home')}${c === 'Alle' ? 'Startseite' : c}<em>${k ? STUDIOS.filter(s => s.cat === c).length : STUDIOS.length}</em>`;
|
| 167 |
-
b.onclick = () => { ci = k; setCat(c); toggleGuide(false); }; $('#gcats').append(b); });
|
| 168 |
-
$('#notes').innerHTML = [['spark', '<b>14 Studios + Merge</b> sind bereit'], ['gear', '<b>Meta-Engine</b> läuft im Simulationsmodus'], ['bell', '<b>Tipp:</b> G öffnet den Guide, Tab wechselt Kategorien']].map(([i, t]) => `<div class="note">${icon(i)}<span>${t}</span></div>`).join('');
|
| 169 |
-
$('#gQ').onclick = () => cycleQ(); $('#gS').onclick = () => toggleSound();
|
| 170 |
-
function syncSettings() { $('#gQ').innerHTML = `${icon('gear')}Grafikqualität<em>${$('#q').textContent}</em>`; $('#gS').innerHTML = `${icon(soundOn ? 'sound' : 'mute')}Sound<em>${soundOn ? 'An' : 'Aus'}</em>`; $('#snd').innerHTML = icon(soundOn ? 'sound' : 'mute'); }
|
| 171 |
-
function guideItems() { return [...gEl.querySelectorAll('.gi')]; }
|
| 172 |
-
function toggleGuide(on = !guideOn) {
|
| 173 |
-
guideOn = on; if (on) { gEl.hidden = false; scrim.hidden = false; void gEl.offsetWidth; gEl.classList.add('on'); scrim.classList.add('on'); gi = 0; markGuide(); beep(740, .05); }
|
| 174 |
-
else { gEl.classList.remove('on'); if (openId == null) scrim.classList.remove('on'); setTimeout(() => { if (!guideOn) { gEl.hidden = true; if (openId == null) scrim.hidden = true; } }, 500); }
|
| 175 |
-
}
|
| 176 |
-
function markGuide() { guideItems().forEach((b, k) => b.classList.toggle('kf', k === gi)); guideItems()[gi]?.scrollIntoView({ block: 'nearest' }); }
|
| 177 |
-
$('#guideBtn').onclick = () => toggleGuide(); $('#bell').onclick = () => toggleGuide(true); $('#bell').innerHTML = icon('bell') + '<span class="dot"></span>';
|
| 178 |
-
$('#snd').onclick = toggleSound;
|
| 179 |
-
function cycleQ() { qMode = qMode === 'AUTO' ? 'HIGH' : qMode === 'HIGH' ? 'LOW' : 'AUTO'; if (qMode !== 'AUTO') quality = qMode.toLowerCase(); applyQuality(); }
|
| 180 |
-
$('#q').onclick = cycleQ;
|
| 181 |
-
const tick = () => { const d = new Date(); $('#clock').textContent = d.toLocaleTimeString('de-DE', { hour: '2-digit', minute: '2-digit' }); }; tick(); setInterval(tick, 10000);
|
| 182 |
|
| 183 |
-
/
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
else if (zone === 'pins') { if (dir === 'left' || dir === 'right') { pi = Math.max(0, Math.min(PINS.length - 1, pi + (dir === 'right' ? 1 : -1))); focusStudio(STUDIOS.findIndex(s => s.id === PINS[pi]), 'pins'); }
|
| 193 |
-
else if (dir === 'up') focusStudio(v[fi] ?? v[0], 'tiles'); }
|
| 194 |
-
}
|
| 195 |
-
function accept() { if (guideOn) { guideItems()[gi]?.click(); return; } if (openId != null) return; if (zone === 'cats') { focusStudio(visible()[0], 'tiles'); return; } open(sel); }
|
| 196 |
-
function back() { if (guideOn) toggleGuide(false); else if (openId != null) close(); else if (zone !== 'tiles') focusStudio(sel, 'tiles'); }
|
| 197 |
addEventListener('keydown', e => {
|
| 198 |
-
if (!started) {
|
| 199 |
-
if (e.target.matches('input,textarea'))
|
| 200 |
-
const k =
|
| 201 |
-
if (['ArrowRight', 'd', 'D'].includes(
|
| 202 |
-
else if (['ArrowLeft', 'a', 'A'].includes(
|
| 203 |
-
else if (
|
| 204 |
-
else if (
|
| 205 |
-
else if (
|
| 206 |
-
else if (
|
| 207 |
-
else if (
|
| 208 |
-
else if (k === 'g' || k === 'G') toggleGuide();
|
| 209 |
-
else if (k === 'q' || k === 'Q') cycleQ();
|
| 210 |
-
else if (k === 'm' || k === 'M') toggleSound();
|
| 211 |
});
|
| 212 |
-
const mouse =
|
| 213 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 214 |
addEventListener('resize', () => { camera.aspect = innerWidth / innerHeight; camera.updateProjectionMatrix(); applyQuality(); });
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
const
|
| 219 |
-
if (!started
|
| 220 |
-
if (
|
| 221 |
-
|
| 222 |
-
if (
|
| 223 |
-
if (x > .5 || b[15]) { nav('right'); gpCool = 10; } else if (x < -.5 || b[14]) { nav('left'); gpCool = 10; } else if (y > .5 || b[13]) { nav('down'); gpCool = 12; } else if (y < -.5 || b[12]) { nav('up'); gpCool = 12; }
|
| 224 |
}
|
| 225 |
|
| 226 |
-
/* ---------- intro
|
| 227 |
-
let
|
| 228 |
-
const
|
| 229 |
stage(1, 120); stage(2, 1100); stage(3, 2300); stage(4, 3300); stage(5, 4600);
|
| 230 |
-
setTimeout(() => { if (!started) beep(196, .8, 'sine', .04); }, 1100);
|
| 231 |
-
let introT = 0; const autoT = 0; // auto-continue is driven by rendered frame time (see loop), so slow devices still see the full reveal
|
| 232 |
intro.addEventListener('pointermove', e => { const x = e.clientX / innerWidth - .5, y = e.clientY / innerHeight - .5; $('#reveal').style.transform = `translate(${x * -18}px,${y * -14}px) rotateY(${x * 6}deg)`; });
|
| 233 |
-
$('#skip').onclick = (e) => { e.stopPropagation(); start(); };
|
| 234 |
-
intro.addEventListener('pointerdown', (e) => { if (e.target.id !== 'skip') start(); });
|
| 235 |
function start() {
|
| 236 |
-
if (started) return; started = true;
|
| 237 |
intro.classList.add('out'); setTimeout(() => intro.remove(), 1100);
|
| 238 |
-
|
| 239 |
-
cam.r.x = 26; whoosh = 1; ci = 0; setCat('Alle'); focusStudio(visible()[0], 'tiles', false);
|
| 240 |
}
|
|
|
|
|
|
|
|
|
|
| 241 |
|
| 242 |
/* ---------- loop ---------- */
|
| 243 |
-
|
| 244 |
-
const
|
| 245 |
-
const
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
const
|
| 249 |
-
const
|
| 250 |
-
const
|
| 251 |
-
const
|
| 252 |
-
const satAngle = (i) => sats[i].userData.a + sys.rot; const FOFF = +(new URLSearchParams(location.search).get('foff') ?? -1.2);
|
| 253 |
-
function poke() { idleT = 0; }
|
| 254 |
-
// --- additional visuals ---
|
| 255 |
-
const shared = { uHit: { value: new THREE.Vector3(0, 0, 1) }, uMag: { value: 0 }, uRip: { value: new THREE.Vector3(0, 0, 1) }, uRipT: { value: 9 } };
|
| 256 |
-
const DISP = `uniform vec3 uHit; uniform float uMag; uniform vec3 uRip; uniform float uRipT;
|
| 257 |
-
float dispAt(vec3 n){ float d=dot(n,normalize(uHit)); float bulge=uMag*.16*smoothstep(.55,1.,d);
|
| 258 |
-
float ang=acos(clamp(dot(n,normalize(uRip)),-1.,1.)); float rip=exp(-uRipT*1.6)*sin(ang*12.-uRipT*11.)*.07*smoothstep(0.,.15,uRipT)*smoothstep(uRipT*1.6+.2,uRipT*1.6-.4,ang);
|
| 259 |
-
return bulge+rip; }`;
|
| 260 |
-
Object.assign(energyMat.uniforms, shared);
|
| 261 |
-
energyMat.vertexShader = energyMat.vertexShader.replace('void main(){', DISP + '\n void main(){').replace('vP=position;', 'vec3 nn=normalize(position); vec3 pos=position+nn*dispAt(nn)*1.2; vP=position;').replace('vec4(position,1.)', 'vec4(pos,1.)');
|
| 262 |
-
glassMat.onBeforeCompile = (sh) => { Object.assign(sh.uniforms, shared); sh.vertexShader = DISP + '\n' + sh.vertexShader.replace('#include <begin_vertex>', '#include <begin_vertex>\n transformed += normalize(position) * dispAt(normalize(position)) * 1.6;'); };
|
| 263 |
-
if ('dispersion' in glassMat) glassMat.dispersion = .35;
|
| 264 |
-
// fresnel aura shell = soft volumetric rim glow that also ripples
|
| 265 |
-
const auraMat = new THREE.ShaderMaterial({ uniforms: { ...shared, t: energyMat.uniforms.t, uPulse: energyMat.uniforms.pulse }, transparent: true, depthWrite: false, blending: THREE.AdditiveBlending, side: THREE.BackSide,
|
| 266 |
-
vertexShader: DISP + `varying vec3 vN; varying vec3 vV; varying float vD; void main(){ vec3 n=normalize(position); float d=dispAt(n); vD=d; vec4 mv=modelViewMatrix*vec4(position+n*d*2.,1.); vN=normalize(normalMatrix*normal); vV=normalize(-mv.xyz); gl_Position=projectionMatrix*mv; }`,
|
| 267 |
-
fragmentShader: `varying vec3 vN; varying vec3 vV; varying float vD; uniform float uPulse; void main(){ float f=pow(1.-abs(dot(vN,vV)),2.5); vec3 c=mix(vec3(1.,.7,.25),vec3(1.,.92,.7),clamp(vD*6.,0.,1.)); gl_FragColor=vec4(c*(f*.55+abs(vD)*2.5)*(1.+uPulse*.5),f*.6); }` });
|
| 268 |
-
const aura = new THREE.Mesh(new THREE.SphereGeometry(2.25, 96, 96), auraMat); orb.add(aura);
|
| 269 |
-
const haloTex = (() => { const c = document.createElement('canvas'); c.width = c.height = 256; const x = c.getContext('2d'); const g = x.createRadialGradient(128, 128, 0, 128, 128, 128); g.addColorStop(0, 'rgba(255,214,120,.55)'); g.addColorStop(.35, 'rgba(242,170,60,.18)'); g.addColorStop(1, 'rgba(0,0,0,0)'); x.fillStyle = g; x.fillRect(0, 0, 256, 256); const t = new THREE.CanvasTexture(c); t.colorSpace = THREE.SRGBColorSpace; return t; })();
|
| 270 |
-
const halo = new THREE.Sprite(new THREE.SpriteMaterial({ map: haloTex, transparent: true, depthWrite: false, blending: THREE.AdditiveBlending, opacity: .55 })); halo.scale.set(11, 11, 1); halo.renderOrder = -1; orb.add(halo);
|
| 271 |
-
// floor haze + faint mirrored glow (cheap reflection)
|
| 272 |
-
const haze = new THREE.Mesh(new THREE.CircleGeometry(9, 64), new THREE.MeshBasicMaterial({ map: haloTex, transparent: true, depthWrite: false, blending: THREE.AdditiveBlending, opacity: .45 })); haze.rotation.x = -Math.PI / 2; haze.position.y = -3.38; scene.add(haze);
|
| 273 |
-
// energy beam core -> focused studio
|
| 274 |
-
const beamMat = new THREE.ShaderMaterial({ uniforms: { t: energyMat.uniforms.t, a: { value: 0 } }, transparent: true, depthWrite: false, blending: THREE.AdditiveBlending, side: THREE.DoubleSide,
|
| 275 |
-
vertexShader: `varying vec2 vU; varying vec3 vN; varying vec3 vV; void main(){ vU=uv; vec4 mv=modelViewMatrix*vec4(position,1.); vN=normalize(normalMatrix*normal); vV=normalize(-mv.xyz); gl_Position=projectionMatrix*mv; }`,
|
| 276 |
-
fragmentShader: `varying vec2 vU; varying vec3 vN; varying vec3 vV; uniform float t; uniform float a; void main(){ float core=pow(abs(dot(vN,vV)),2.); float flow=.8+.2*sin(vU.y*18.-t*9.); float ends=smoothstep(0.,.12,vU.y)*smoothstep(1.,.85,vU.y);
|
| 277 |
-
gl_FragColor=vec4(vec3(1.,.8,.4)*(core*1.6)*flow, core*flow*ends*a); }` });
|
| 278 |
-
const beam = new THREE.Mesh(new THREE.CylinderGeometry(.035, .035, 1, 16, 1, true), beamMat); const beamGlow = new THREE.Mesh(new THREE.CylinderGeometry(.13, .13, 1, 16, 1, true), beamMat.clone());
|
| 279 |
-
beamGlow.material.uniforms = { t: energyMat.uniforms.t, a: { value: 0 } }; orb.add(beam, beamGlow);
|
| 280 |
-
const UP = new THREE.Vector3(0, 1, 0), vA = new THREE.Vector3(), vB = new THREE.Vector3(), vC = new THREE.Vector3();
|
| 281 |
-
function placeBeam(m, from, to) { vC.subVectors(to, from); const L = vC.length(); m.position.copy(from).addScaledVector(vC, .5); m.quaternion.setFromUnitVectors(UP, vC.normalize()); m.scale.set(1, L, 1); }
|
| 282 |
-
// satellites: hover springs
|
| 283 |
-
sats.forEach(m => Object.assign(m.userData, { lift: S(0), glow: S(.05), sc: S(1), tilt: S(0) }));
|
| 284 |
-
// particle flow field (polar coords, curl-like swirl)
|
| 285 |
-
const pr_ = new Float32Array(PN), pa_ = new Float32Array(PN), py_ = new Float32Array(PN);
|
| 286 |
-
for (let i = 0; i < PN; i++) { pr_[i] = Math.hypot(pp[i * 3], pp[i * 3 + 2]); pa_[i] = Math.atan2(pp[i * 3 + 2], pp[i * 3]); py_[i] = pp[i * 3 + 1]; }
|
| 287 |
-
parts.material.size = .05; parts.material.opacity = .65;
|
| 288 |
-
// --- adaptive resolution ---
|
| 289 |
-
const AR = { pr: 1, ema: 16.7, t: 0, slow: 0 };
|
| 290 |
-
const maxPR = () => (quality === 'high' ? Math.min(devicePixelRatio, 2) : Math.min(devicePixelRatio, 1.25));
|
| 291 |
function setPR(p) { if (!renderer) return; AR.pr = p; renderer.setPixelRatio(p); renderer.setSize(innerWidth, innerHeight, false); if (composer) { composer.setPixelRatio(p); composer.setSize(innerWidth, innerHeight); } }
|
| 292 |
-
// --- pointer interaction on the 3D scene ---
|
| 293 |
-
const cv = $('#gl'), ray = new THREE.Raycaster(), ndc = new THREE.Vector2(), ptrs = new Map(); let hoverI = -1, orbHover = false, drag = null, pinch0 = 0, lastMoveT = 0;
|
| 294 |
-
const lbl = $('#satLabel');
|
| 295 |
-
function pick(cx, cy) {
|
| 296 |
-
ndc.set(cx / innerWidth * 2 - 1, -(cy / innerHeight) * 2 + 1); ray.setFromCamera(ndc, camera); let best = -1, bd = 1e9;
|
| 297 |
-
sats.forEach((m, i) => { m.getWorldPosition(vA); const d = ray.ray.distanceSqToPoint(vA), z = vA.distanceTo(ray.ray.origin); const r = .42 * m.userData.sc.x; if (d < r * r && z < bd) { bd = z; best = i; } });
|
| 298 |
-
orb.getWorldPosition(vA); const hit = ray.ray.intersectSphere(new THREE.Sphere(vA, 1.9), vB); const orbHit = !!hit && vB.distanceTo(ray.ray.origin) < bd;
|
| 299 |
-
return { sat: orbHit ? -1 : best, orb: orbHit ? vB.clone().sub(vA).normalize() : null };
|
| 300 |
-
}
|
| 301 |
-
cv.addEventListener('pointerdown', e => { if (!started) return; cv.setPointerCapture(e.pointerId); ptrs.set(e.pointerId, { x: e.clientX, y: e.clientY }); poke();
|
| 302 |
-
if (ptrs.size === 1) drag = { x: e.clientX, y: e.clientY, sx: e.clientX, sy: e.clientY, t: performance.now(), moved: 0, v: 0 };
|
| 303 |
-
if (ptrs.size === 2) { const [a, b] = [...ptrs.values()]; pinch0 = Math.hypot(a.x - b.x, a.y - b.y); drag = null; } });
|
| 304 |
-
cv.addEventListener('pointermove', e => { if (!started) return; const p = ptrs.get(e.pointerId);
|
| 305 |
-
if (p) { p.x = e.clientX; p.y = e.clientY; poke(); }
|
| 306 |
-
if (ptrs.size === 2) { const [a, b] = [...ptrs.values()]; const d = Math.hypot(a.x - b.x, a.y - b.y); if (pinch0) zoomT = Math.max(ZMIN, Math.min(ZMAX, zoomT * pinch0 / d)); pinch0 = d; return; }
|
| 307 |
-
if (drag) { const now = performance.now(), dx = e.clientX - drag.x, dy = e.clientY - drag.y, dts = Math.max(.001, (now - lastMoveT) / 1000); lastMoveT = now;
|
| 308 |
-
drag.moved += Math.abs(dx) + Math.abs(dy); drag.x = e.clientX; drag.y = e.clientY;
|
| 309 |
-
if (drag.moved > 5) { follow = false; const w = dx * .0065; sys.rot += w; drag.v = damp(drag.v, w / dts, 18, dts); camT.ph = Math.max(.95, Math.min(1.55, camT.ph - dy * .004)); cv.style.cursor = 'grabbing'; } return; }
|
| 310 |
-
if (e.pointerType === 'mouse') hover(e.clientX, e.clientY); });
|
| 311 |
-
function endPtr(e) { if (!ptrs.has(e.pointerId)) return; ptrs.delete(e.pointerId); if (ptrs.size < 2) pinch0 = 0;
|
| 312 |
-
if (drag && ptrs.size === 0) { const quick = performance.now() - drag.t < 400;
|
| 313 |
-
if (drag.moved <= 5 && quick) tap(e.clientX, e.clientY, e.pointerType);
|
| 314 |
-
else sys.vel = Math.max(-4, Math.min(4, drag.v)); // momentum
|
| 315 |
-
drag = null; cv.style.cursor = ''; } }
|
| 316 |
-
cv.addEventListener('pointerup', endPtr); cv.addEventListener('pointercancel', endPtr);
|
| 317 |
-
cv.addEventListener('pointerleave', () => { if (!drag) { hoverI = -1; orbHover = false; lbl.classList.remove('on'); cv.style.cursor = ''; } });
|
| 318 |
-
cv.addEventListener('wheel', e => { if (!started) return; e.preventDefault(); poke(); zoomT = Math.max(ZMIN, Math.min(ZMAX, zoomT * Math.exp(e.deltaY * .0012))); }, { passive: false });
|
| 319 |
-
function hover(x, y) { const h = pick(x, y); if (h.sat !== hoverI) { hoverI = h.sat; if (hoverI >= 0) { beep(1500, .012, 'sine', .02); lbl.innerHTML = `${icon(STUDIOS[hoverI].id)}<span><b>${STUDIOS[hoverI].name}</b><small>${STUDIOS[hoverI].like}</small></span>`; } lbl.classList.toggle('on', hoverI >= 0); }
|
| 320 |
-
orbHover = !!h.orb; if (h.orb) shared.uHit.value.lerp(h.orb, .5); cv.style.cursor = hoverI >= 0 ? 'pointer' : orbHover ? 'crosshair' : 'grab'; }
|
| 321 |
-
function tap(x, y, type) { const h = pick(x, y); if (type !== 'mouse') hover(x, y);
|
| 322 |
-
if (h.sat >= 0) { flyTo(h.sat); navigator.vibrate?.(8); }
|
| 323 |
-
else if (h.orb) { shared.uRip.value.copy(h.orb); shared.uRipT.value = 0; burst(.35); beep(240, .25, 'sine', .05); navigator.vibrate?.([6, 30, 6]); } }
|
| 324 |
-
function flyTo(i) { focusStudio(i, 'tiles'); follow = true; zoomT = Math.max(ZMIN, Math.min(zoomT, isMobile ? 13 : 10.5)); beep(880, .06, 'triangle'); }
|
| 325 |
-
function stickOrbit(x, y, lt, rt) { if (Math.abs(x) > .15) { sys.rot += x * .04; follow = false; poke(); } if (Math.abs(y) > .15) { camT.ph = Math.max(.95, Math.min(1.55, camT.ph + y * .02)); poke(); }
|
| 326 |
-
if (lt > .05 || rt > .05) { zoomT = Math.max(ZMIN, Math.min(ZMAX, zoomT * (1 + (lt - rt) * .02))); poke(); } }
|
| 327 |
-
addEventListener('keydown', poke); addEventListener('pointermove', () => { idleT = Math.min(idleT, 4); });
|
| 328 |
-
|
| 329 |
-
/* ---------- loop ---------- */
|
| 330 |
-
const clock = new THREE.Clock(); let frames = 0, fpsT = 0, statT = 0, last = performance.now();
|
| 331 |
-
const engine = $('#engine'); const tmpV = new THREE.Vector3();
|
| 332 |
function frame(now) {
|
| 333 |
requestAnimationFrame(frame);
|
| 334 |
-
now = now ?? performance.now(); const rawMs = now -
|
| 335 |
-
frames++; fpsT +=
|
| 336 |
-
// adaptive resolution: nudge pixel ratio toward a 60fps budget instead of hard quality drops
|
| 337 |
if (renderer && started && qMode === 'AUTO') { AR.ema = AR.ema * .9 + rawMs * .1; AR.t += dt;
|
| 338 |
-
if (AR.t > .6) { AR.t = 0; const
|
| 339 |
-
if (AR.ema > 19) p = Math.max(.6, p - (AR.ema > 30 ? .15 : .08)); else if (AR.ema < 14.5) p = Math.min(
|
| 340 |
-
if (Math.abs(p - AR.pr) > .01) setPR(+p.toFixed(2));
|
| 341 |
AR.slow = AR.pr <= .6 && AR.ema > 34 ? AR.slow + 1 : 0; if (AR.slow > 4 && quality === 'high') { quality = 'low'; applyQuality(); AR.slow = 0; } } }
|
| 342 |
-
window.__pr = AR.pr;
|
| 343 |
pollPad();
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
//
|
| 348 |
-
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
//
|
| 354 |
-
const
|
| 355 |
-
|
| 356 |
-
|
| 357 |
-
|
| 358 |
-
|
| 359 |
-
//
|
| 360 |
-
const
|
| 361 |
-
|
| 362 |
-
|
| 363 |
-
|
| 364 |
-
|
| 365 |
-
|
| 366 |
-
//
|
| 367 |
-
|
| 368 |
-
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
const
|
| 376 |
-
|
| 377 |
-
|
| 378 |
-
|
| 379 |
-
|
| 380 |
-
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
|
| 388 |
-
|
| 389 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 390 |
}
|
| 391 |
-
function updEngine(t) { const ld = (55 + Math.sin(t * .4) * 20) | 0;
|
| 392 |
-
engine.innerHTML = `<h4>Meta-Engine <i>● Online</i></h4><dl><dt>Agenten aktiv</dt><dd>${120 + (Math.sin(t) * 8 | 0)}</dd><dt>Tokens / s</dt><dd>${(4200 + Math.random() * 900) | 0}</dd><dt>Studios</dt><dd>${STUDIOS.length - 1} + 1</dd><dt>Auslastung</dt><dd>${ld}%</dd></dl><div class="bar"><i style="width:${ld}%"></i></div>`; }
|
| 393 |
-
applyQuality(); syncSettings(); updEngine(0);
|
| 394 |
-
if (/[?&]dbg/.test(location.search)) window.__dbg = { setPR, AR, aura, beam, beamGlow, parts, glass, energy, halo, haze, rings, sats, floor };
|
| 395 |
-
window.__dbg = { aura, halo, haze, beam, beamGlow, parts, glass, energy, rings }; window.__studius = { open, close, visible, get sel() { return sel; }, get hover() { return hoverI; }, get zoom() { return cam.r.x; }, get rot() { return sys.rot; }, get vel() { return sys.vel; }, get ripple() { return shared.uRipT.value; }, get vel() { return sys.vel; },
|
| 396 |
-
satScreen: (i) => { sats[i].getWorldPosition(vA).project(camera); return { x: (vA.x + 1) / 2 * innerWidth, y: (1 - vA.y) / 2 * innerHeight }; },
|
| 397 |
-
orbScreen: () => { orb.getWorldPosition(vA).project(camera); return { x: (vA.x + 1) / 2 * innerWidth, y: (1 - vA.y) / 2 * innerHeight }; } };
|
| 398 |
-
if (gl3d) requestAnimationFrame(frame); else { setTimeout(() => start(), 7800); const loop2 = () => { requestAnimationFrame(loop2); pollPad(); }; loop2(); }
|
|
|
|
| 1 |
import * as THREE from './vendor/three.module.min.js';
|
| 2 |
+
import { STUDIOS, stopLoops } from './widgets.js?v=30';
|
| 3 |
+
import { icon } from './icons.js?v=30';
|
| 4 |
+
import { RoomEnvironment } from './vendor/addons/environments/RoomEnvironment.js';
|
| 5 |
import { EffectComposer } from './vendor/addons/postprocessing/EffectComposer.js';
|
| 6 |
import { RenderPass } from './vendor/addons/postprocessing/RenderPass.js';
|
| 7 |
import { UnrealBloomPass } from './vendor/addons/postprocessing/UnrealBloomPass.js';
|
| 8 |
import { OutputPass } from './vendor/addons/postprocessing/OutputPass.js';
|
|
|
|
| 9 |
|
| 10 |
const $ = (s) => document.querySelector(s);
|
| 11 |
const isMobile = matchMedia('(pointer:coarse)').matches || innerWidth < 700;
|
| 12 |
let quality = isMobile ? 'low' : 'high', qMode = 'AUTO';
|
| 13 |
+
const GOLD = 0xf2c94c, ORANGE = 0xfaa968, TEAL = 0x028391, CYAN = 0x8cbfb8, RED = 0xf85525;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
/* ---------- sound (off by default) ---------- */
|
| 16 |
let ac = null, soundOn = false;
|
| 17 |
+
function beep(f = 440, d = .06, type = 'square', v = .04) {
|
| 18 |
if (!soundOn) return; try {
|
| 19 |
ac = ac || new (window.AudioContext || window.webkitAudioContext)();
|
| 20 |
const o = ac.createOscillator(), g = ac.createGain(); o.type = type; o.frequency.value = f;
|
|
|
|
| 22 |
o.connect(g).connect(ac.destination); o.start(); o.stop(ac.currentTime + d);
|
| 23 |
} catch (e) {}
|
| 24 |
}
|
| 25 |
+
function toggleSound() { soundOn = !soundOn; $('#snd').innerHTML = icon(soundOn ? 'sound' : 'mute'); beep(880, .1); }
|
| 26 |
+
$('#snd').onclick = toggleSound; $('#snd').innerHTML = icon('mute');
|
| 27 |
|
| 28 |
+
/* ---------- three setup ---------- */
|
| 29 |
let renderer = null, gl3d = true, composer = null, bloom = null;
|
| 30 |
try {
|
| 31 |
+
renderer = new THREE.WebGLRenderer({ canvas: $('#gl'), antialias: !isMobile, powerPreference: 'high-performance' });
|
| 32 |
+
} catch (e) { gl3d = false; console.warn('WebGL unavailable, 2D fallback'); }
|
| 33 |
+
if (renderer) { renderer.toneMapping = THREE.ACESFilmicToneMapping; renderer.toneMappingExposure = 1.05; }
|
| 34 |
+
if (renderer) { try { const g = renderer.getContext(), ext = g.getExtension('WEBGL_debug_renderer_info'); const nm = ext ? g.getParameter(ext.UNMASKED_RENDERER_WEBGL) : '';
|
| 35 |
+
if (/swiftshader|llvmpipe|software|basic render/i.test(nm)) quality = 'low'; } catch (e) {} }
|
| 36 |
+
const scene = new THREE.Scene(); scene.fog = new THREE.FogExp2(0x020c17, 0.028);
|
| 37 |
+
const camera = new THREE.PerspectiveCamera(55, innerWidth / innerHeight, .1, 200);
|
| 38 |
+
const cam = { base: isMobile ? 26 : 21, r: isMobile ? 26 : 21, th: 0.4, ph: 1.15, tr: 21, tth: .4, tph: 1.15 };
|
| 39 |
+
function applyQuality() {
|
| 40 |
+
if (!renderer) return;
|
| 41 |
+
renderer.setPixelRatio(Math.min(AR.pr, quality === 'high' ? Math.min(devicePixelRatio, 2) : Math.min(devicePixelRatio, 1.25)));
|
| 42 |
+
renderer.setSize(innerWidth, innerHeight, false);
|
| 43 |
+
if (composer) { composer.setPixelRatio(renderer.getPixelRatio()); composer.setSize(innerWidth, innerHeight); }
|
| 44 |
+
if (swarm) swarm.count = quality === 'high' ? SW_MAX : SW_MAX / 3 | 0;
|
| 45 |
+
if (dust) dust.geometry.setDrawRange(0, quality === 'high' ? DUST : DUST / 3 | 0);
|
| 46 |
+
$('#q').textContent = 'Q:' + (qMode === 'AUTO' ? 'AUTO·' + quality[0].toUpperCase() : quality.toUpperCase());
|
| 47 |
}
|
| 48 |
+
if (renderer) { try { composer = new EffectComposer(renderer); composer.addPass(new RenderPass(scene, camera));
|
| 49 |
+
bloom = new UnrealBloomPass(new THREE.Vector2(innerWidth, innerHeight), .6, .5, .42); composer.addPass(bloom); composer.addPass(new OutputPass()); } catch (e) { composer = null; } }
|
| 50 |
+
if (renderer) { const pm = new THREE.PMREMGenerator(renderer); scene.environment = pm.fromScene(new RoomEnvironment(), .04).texture; scene.environmentIntensity = .5; }
|
| 51 |
+
scene.add(new THREE.AmbientLight(0x334455, 1.2));
|
| 52 |
+
const coreLight = new THREE.PointLight(GOLD, 60, 40, 1.6); scene.add(coreLight);
|
| 53 |
+
const key = new THREE.DirectionalLight(0xfff1c8, 2.2); key.position.set(8, 12, 10); scene.add(key);
|
| 54 |
+
const rim = new THREE.DirectionalLight(ORANGE, 1.2); rim.position.set(-10, 8, -6); scene.add(rim);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
+
/* core */
|
| 57 |
+
const core = new THREE.Group(); scene.add(core);
|
| 58 |
+
const coreMat = new THREE.MeshPhysicalMaterial({ color: 0xe0b04a, emissive: 0xc9962a, emissiveIntensity: .2, metalness: 1, roughness: .28, clearcoat: 1, clearcoatRoughness: .1, flatShading: true });
|
| 59 |
+
const coreMesh = new THREE.Mesh(new THREE.IcosahedronGeometry(2.2, 1), coreMat); core.add(coreMesh);
|
| 60 |
+
const shell = new THREE.Mesh(new THREE.IcosahedronGeometry(3.1, 1), new THREE.MeshBasicMaterial({ color: ORANGE, wireframe: true, transparent: true, opacity: .35 })); core.add(shell);
|
| 61 |
+
const shell2 = new THREE.Mesh(new THREE.IcosahedronGeometry(3.8, 2), new THREE.MeshBasicMaterial({ color: GOLD, wireframe: true, transparent: true, opacity: .07 })); core.add(shell2);
|
| 62 |
+
const glowTex = (() => { const c = document.createElement('canvas'); c.width = c.height = 128; const x = c.getContext('2d'); const g = x.createRadialGradient(64, 64, 0, 64, 64, 64); g.addColorStop(0, 'rgba(255,230,150,1)'); g.addColorStop(.3, 'rgba(242,201,76,.5)'); g.addColorStop(1, 'rgba(0,0,0,0)'); x.fillStyle = g; x.fillRect(0, 0, 128, 128); return new THREE.CanvasTexture(c); })();
|
| 63 |
+
const glow = new THREE.Sprite(new THREE.SpriteMaterial({ map: glowTex, blending: THREE.AdditiveBlending, depthWrite: false, transparent: true })); glow.scale.set(14, 14, 1); core.add(glow);
|
| 64 |
+
// orbit rings
|
| 65 |
+
for (let i = 0; i < 3; i++) { const ring = new THREE.Mesh(new THREE.TorusGeometry(5 + i * 1.1, .025, 6, 120), new THREE.MeshBasicMaterial({ color: [GOLD, GOLD, CYAN][i], transparent: true, opacity: i === 2 ? .22 : .45 })); ring.rotation.x = Math.PI / 2 + i * .35; ring.rotation.y = i * .6; ring.userData.spin = .2 + i * .15; core.add(ring); }
|
| 66 |
+
// hex floor grid
|
| 67 |
+
{
|
| 68 |
+
const pts = []; const R = .9, W = R * Math.sqrt(3);
|
| 69 |
+
for (let q = -14; q <= 14; q++) for (let r = -14; r <= 14; r++) {
|
| 70 |
+
const cx = W * (q + r / 2), cz = 1.5 * R * r; if (cx * cx + cz * cz > 420) continue;
|
| 71 |
+
for (let k = 0; k < 6; k++) { const a = Math.PI / 6 + k * Math.PI / 3, b = a + Math.PI / 3; pts.push(cx + R * Math.cos(a), 0, cz + R * Math.sin(a), cx + R * Math.cos(b), 0, cz + R * Math.sin(b)); }
|
| 72 |
+
}
|
| 73 |
+
const g = new THREE.BufferGeometry(); g.setAttribute('position', new THREE.Float32BufferAttribute(pts, 3));
|
| 74 |
+
const floor = new THREE.LineSegments(g, new THREE.LineBasicMaterial({ color: 0xd4a63a, transparent: true, opacity: .13 })); floor.position.y = -6; scene.add(floor);
|
| 75 |
}
|
| 76 |
+
// hex swarm (instanced)
|
| 77 |
+
const SW_MAX = isMobile ? 260 : 620;
|
| 78 |
+
const hexGeo = new THREE.CylinderGeometry(.11, .11, .04, 6);
|
| 79 |
+
const swarm = new THREE.InstancedMesh(hexGeo, new THREE.MeshPhysicalMaterial({ color: GOLD, emissive: 0x4a3008, metalness: 1, roughness: .25, clearcoat: .5 }), SW_MAX);
|
| 80 |
+
const swData = [...Array(SW_MAX)].map(() => ({ r: 4.5 + Math.random() * 9, a: Math.random() * 6.28, y: (Math.random() - .5) * 7, s: (.1 + Math.random() * .4) * (Math.random() < .5 ? -1 : 1), w: Math.random() * 6 }));
|
| 81 |
+
const tmp = new THREE.Object3D(), tmpC = new THREE.Color();
|
| 82 |
+
swData.forEach((d, i) => swarm.setColorAt(i, tmpC.set([GOLD, GOLD, 0xd4a63a, GOLD, ORANGE, CYAN][i % 6])));
|
| 83 |
+
scene.add(swarm);
|
| 84 |
+
// dust / burst particles
|
| 85 |
+
const DUST = isMobile ? 1500 : 4000;
|
| 86 |
+
const dpos = new Float32Array(DUST * 3), dvel = new Float32Array(DUST * 3);
|
| 87 |
+
for (let i = 0; i < DUST; i++) { const v = new THREE.Vector3().randomDirection().multiplyScalar(10 + Math.random() * 40); dpos.set([v.x, v.y, v.z], i * 3); }
|
| 88 |
+
const dGeo = new THREE.BufferGeometry(); dGeo.setAttribute('position', new THREE.BufferAttribute(dpos, 3));
|
| 89 |
+
const dust = new THREE.Points(dGeo, new THREE.PointsMaterial({ color: 0xf6dcac, size: .07, transparent: true, opacity: .55, blending: THREE.AdditiveBlending, depthWrite: false })); scene.add(dust);
|
| 90 |
+
function burst() { for (let i = 0; i < DUST; i++) { const v = new THREE.Vector3().randomDirection().multiplyScalar(.3 + Math.random() * 1.2); dpos.set([0, 0, 0], i * 3); dvel.set([v.x, v.y, v.z], i * 3); } bursting = 1; }
|
| 91 |
+
let bursting = 0;
|
| 92 |
|
| 93 |
+
/* studio nodes */
|
| 94 |
const CATS = ['Alle', 'Text', 'Bild', 'Video', 'Audio', 'Automation', 'Code', 'Community', 'Design'];
|
| 95 |
+
const nodes = []; const nodeGeo = new THREE.CylinderGeometry(.75, .75, .35, 6);
|
| 96 |
+
const streamPts = [];
|
| 97 |
+
STUDIOS.forEach((s, i) => {
|
| 98 |
+
const a = i / STUDIOS.length * Math.PI * 2, R = 10 + (i % 2) * 1.6;
|
| 99 |
+
const col = s.id === 'merge' ? RED : [GOLD, GOLD, ORANGE, GOLD, CYAN][CATS.indexOf(s.cat) % 5];
|
| 100 |
+
const m = new THREE.Mesh(nodeGeo, new THREE.MeshPhysicalMaterial({ color: 0x2a2010, emissive: col, emissiveIntensity: .45, metalness: .85, roughness: .22, clearcoat: 1, clearcoatRoughness: .08 }));
|
| 101 |
+
const edge = new THREE.LineSegments(new THREE.EdgesGeometry(nodeGeo), new THREE.LineBasicMaterial({ color: GOLD, transparent: true, opacity: .9 })); m.add(edge);
|
| 102 |
+
m.rotation.x = Math.PI / 2; m.userData = { s, a, R, y: Math.sin(i * 1.7) * 2.2, i, col, lift: { x: 0, v: 0 }, sc: { x: 1, v: 0 } };
|
| 103 |
+
scene.add(m); nodes.push(m);
|
| 104 |
+
// data stream line node→core
|
| 105 |
+
const lg = new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(), new THREE.Vector3()]);
|
| 106 |
+
const line = new THREE.Line(lg, new THREE.LineBasicMaterial({ color: col, transparent: true, opacity: .25 })); scene.add(line); m.userData.line = line;
|
| 107 |
+
for (let k = 0; k < 3; k++) streamPts.push({ n: m, t: Math.random() });
|
| 108 |
+
});
|
| 109 |
+
const spGeo = new THREE.BufferGeometry(); const spPos = new Float32Array(streamPts.length * 3); spGeo.setAttribute('position', new THREE.BufferAttribute(spPos, 3));
|
| 110 |
+
scene.add(new THREE.Points(spGeo, new THREE.PointsMaterial({ color: 0xfff1b0, size: .28, transparent: true, blending: THREE.AdditiveBlending, depthWrite: false, map: glowTex })));
|
| 111 |
+
|
| 112 |
+
/* ---------- HUD, labels ---------- */
|
| 113 |
+
let cat = 'Alle', sel = 0, openId = null;
|
| 114 |
+
const cats = $('#cats');
|
| 115 |
+
CATS.forEach(c => { const b = document.createElement('button'); b.textContent = c.toUpperCase(); b.dataset.c = c; b.onclick = () => setCat(c); cats.append(b); });
|
| 116 |
+
function setCat(c) { cat = c; [...cats.children].forEach(b => b.classList.toggle('on', b.dataset.c === c)); beep(520); const v = visible(); if (!v.includes(sel)) select(v[0]); }
|
| 117 |
+
function visible() { return nodes.map((n, i) => i).filter(i => cat === 'Alle' || nodes[i].userData.s.cat === cat || nodes[i].userData.s.id === 'merge'); }
|
| 118 |
+
const labels = STUDIOS.map((s, i) => { const d = document.createElement('div'); d.className = 'lbl'; d.innerHTML = `${icon(s.id)}<span>${s.name}</span>`; d.dataset.cat = s.cat; d.title = s.cat + ' · ' + s.like;
|
| 119 |
+
d.onmouseenter = () => select(i); d.onclick = (e) => { e.stopPropagation(); select(i); open(i); }; $('#labels').append(d); return d; });
|
| 120 |
+
function select(i) { if (i == null) return; if (sel !== i) beep(660, .03); sel = i; labels.forEach((l, k) => l.classList.toggle('sel', k === i)); }
|
| 121 |
+
const pop = $('#pop');
|
|
|
|
|
|
|
| 122 |
function open(i) {
|
| 123 |
+
stopLoops(); openId = i; const s = STUDIOS[i]; beep(990, .08, 'triangle');
|
| 124 |
+
pop.innerHTML = `<div class="ph"><span class="pi">${icon(s.id)}</span><span class="pt"><b>${s.name}</b><small>${s.cat === '+' ? 'Modul' : s.cat} · ${s.like}</small></span><button aria-label="schließen">${icon('close')}</button></div><div class="pb"></div><div class="pf"><span>STUDIO ${String(i + 1).padStart(2, '0')}/${STUDIOS.length}</span><span>● SIMULATION</span></div>`;
|
| 125 |
+
pop.classList.remove('in'); void pop.offsetWidth; pop.classList.add('in'); focusNode(i);
|
| 126 |
+
pop.hidden = false; pop.querySelector('.ph button').onclick = close; s.build(pop.querySelector('.pb')); placePop(); $('#wire').classList.add('on'); setTimeout(placePop, 60);
|
|
|
|
| 127 |
}
|
| 128 |
+
function close() { stopLoops(); if (openId != null) cam.tr = cam.base; openId = null; pop.hidden = true; $('#wire').classList.remove('on'); beep(300); }
|
| 129 |
+
function placePop() {
|
| 130 |
+
if (openId == null || innerWidth < 700) return;
|
| 131 |
+
const W = pop.offsetWidth, H = pop.offsetHeight; const x = innerWidth - W - Math.max(40, innerWidth * .06);
|
| 132 |
+
const y = Math.max(76, Math.min((innerHeight - H) / 2, innerHeight - H - 200));
|
| 133 |
+
pop.style.left = x + 'px'; pop.style.top = y + 'px';
|
| 134 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
|
| 136 |
+
// smooth camera focus: swing the orbit so the node faces the camera
|
| 137 |
+
function focusNode(i) { if (!started) return; const n = nodes[i]; const a = Math.atan2(n.position.z, n.position.x);
|
| 138 |
+
let d = a - cam.tth; d = Math.atan2(Math.sin(d), Math.cos(d)); cam.tth += d; spin = 0; cam.tr = Math.max(14, cam.base - 4); cam.tph = 1.12; }
|
| 139 |
+
function screenPos(o) { const v = o.getWorldPosition(new THREE.Vector3()).project(camera); return { x: (v.x + 1) / 2 * innerWidth, y: (1 - v.y) / 2 * innerHeight, z: v.z }; }
|
| 140 |
+
window.addEventListener('studius-merge', () => { burst(); beep(200, .3, 'sawtooth'); });
|
| 141 |
+
|
| 142 |
+
/* ---------- input ---------- */
|
| 143 |
+
const keys = {};
|
| 144 |
+
let started = false, lookK = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
addEventListener('keydown', e => {
|
| 146 |
+
if (!started) { start(); return; }
|
| 147 |
+
if (e.target.matches('input,textarea')) return;
|
| 148 |
+
const v = visible(), k = v.indexOf(sel);
|
| 149 |
+
if (['ArrowRight', 'd', 'D', 'ArrowDown', 's', 'S'].includes(e.key)) select(v[(k + 1) % v.length]);
|
| 150 |
+
else if (['ArrowLeft', 'a', 'A', 'ArrowUp', 'w', 'W'].includes(e.key)) select(v[(k - 1 + v.length) % v.length]);
|
| 151 |
+
else if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); open(sel); }
|
| 152 |
+
else if (e.key === 'Escape' || e.key === 'Backspace') close();
|
| 153 |
+
else if (e.key === 'q' || e.key === 'Q') cycleQ();
|
| 154 |
+
else if (e.key === 'm' || e.key === 'M') toggleSound();
|
| 155 |
+
else if (e.key === 'Tab') { e.preventDefault(); setCat(CATS[(CATS.indexOf(cat) + 1) % CATS.length]); }
|
|
|
|
|
|
|
|
|
|
| 156 |
});
|
| 157 |
+
const mouse = new THREE.Vector2(9, 9), ray = new THREE.Raycaster(); let drag = null;
|
| 158 |
+
const cv = $('#gl');
|
| 159 |
+
const ptrs = new Map(); let pinch0 = 0, lastMv = 0, idleT = 0; const ZMIN = 12, ZMAX = 34;
|
| 160 |
+
addEventListener('pointermove', e => { mouse.set(e.clientX / innerWidth * 2 - 1, -(e.clientY / innerHeight) * 2 + 1); });
|
| 161 |
+
cv.addEventListener('pointerdown', e => { if (!started) return; cv.setPointerCapture(e.pointerId); ptrs.set(e.pointerId, { x: e.clientX, y: e.clientY }); idleT = 0;
|
| 162 |
+
if (ptrs.size === 1) drag = { x: e.clientX, y: e.clientY, moved: 0, t: performance.now(), v: 0, vp: 0 };
|
| 163 |
+
if (ptrs.size === 2) { const [a, b] = [...ptrs.values()]; pinch0 = Math.hypot(a.x - b.x, a.y - b.y); drag = null; } });
|
| 164 |
+
cv.addEventListener('pointermove', e => { const p = ptrs.get(e.pointerId); if (!p) return; p.x = e.clientX; p.y = e.clientY; idleT = 0;
|
| 165 |
+
if (ptrs.size === 2) { const [a, b] = [...ptrs.values()]; const d = Math.hypot(a.x - b.x, a.y - b.y); if (pinch0) cam.tr = Math.max(ZMIN, Math.min(ZMAX, cam.tr * pinch0 / d)); pinch0 = d; return; }
|
| 166 |
+
if (!drag) return; const now = performance.now(), dts = Math.max(.008, (now - (lastMv || now)) / 1000); lastMv = now;
|
| 167 |
+
const dx = e.clientX - drag.x, dy = e.clientY - drag.y; drag.moved += Math.abs(dx) + Math.abs(dy); drag.x = e.clientX; drag.y = e.clientY;
|
| 168 |
+
if (drag.moved > 6) { const w = -dx * .005; cam.tth += w; cam.th += w; drag.v = drag.v * .6 + (w / dts) * .4; cam.tph = Math.max(.45, Math.min(1.5, cam.tph - dy * .004)); cv.style.cursor = 'grabbing'; } });
|
| 169 |
+
function endPtr(e) { if (!ptrs.has(e.pointerId)) return; ptrs.delete(e.pointerId); if (ptrs.size < 2) pinch0 = 0; lastMv = 0;
|
| 170 |
+
if (drag && ptrs.size === 0) { if (drag.moved <= 6) { mouse.set(e.clientX / innerWidth * 2 - 1, -(e.clientY / innerHeight) * 2 + 1); ray.setFromCamera(mouse, camera); const h = ray.intersectObjects(nodes, false)[0];
|
| 171 |
+
if (h) { select(h.object.userData.i); open(h.object.userData.i); navigator.vibrate?.(8); } }
|
| 172 |
+
else spin = Math.max(-3, Math.min(3, drag.v)); drag = null; cv.style.cursor = ''; } }
|
| 173 |
+
cv.addEventListener('pointerup', endPtr); cv.addEventListener('pointercancel', endPtr);
|
| 174 |
+
cv.addEventListener('wheel', e => { if (!started) return; e.preventDefault(); idleT = 0; cam.tr = Math.max(ZMIN, Math.min(ZMAX, cam.tr * Math.exp(e.deltaY * .0012))); }, { passive: false });
|
| 175 |
+
let spin = 0;
|
| 176 |
+
function cycleQ() { qMode = qMode === 'AUTO' ? 'HIGH' : qMode === 'HIGH' ? 'LOW' : 'AUTO'; if (qMode !== 'AUTO') quality = qMode.toLowerCase(); applyQuality(); }
|
| 177 |
+
$('#q').onclick = cycleQ;
|
| 178 |
addEventListener('resize', () => { camera.aspect = innerWidth / innerHeight; camera.updateProjectionMatrix(); applyQuality(); });
|
| 179 |
+
// gamepad
|
| 180 |
+
let gpCool = 0;
|
| 181 |
+
function pollPad() { const p = navigator.getGamepads ? [...navigator.getGamepads()].find(Boolean) : null; if (!p) return; if (Math.abs(p.axes[2] || 0) > .15) cam.tth += p.axes[2] * .04; if (Math.abs(p.axes[3] || 0) > .15) cam.tph = Math.max(.45, Math.min(1.5, cam.tph + p.axes[3] * .02)); if (gpCool-- > 0) return;
|
| 182 |
+
const x = p.axes[0] || 0, v = visible(), k = v.indexOf(sel);
|
| 183 |
+
if (!started && p.buttons.some(b => b.pressed)) { start(); gpCool = 20; return; }
|
| 184 |
+
if (x > .5 || p.buttons[15]?.pressed) { select(v[(k + 1) % v.length]); gpCool = 12; }
|
| 185 |
+
else if (x < -.5 || p.buttons[14]?.pressed) { select(v[(k - 1 + v.length) % v.length]); gpCool = 12; }
|
| 186 |
+
else if (p.buttons[0]?.pressed) { open(sel); gpCool = 20; } else if (p.buttons[1]?.pressed) { close(); gpCool = 20; }
|
|
|
|
| 187 |
}
|
| 188 |
|
| 189 |
+
/* ---------- intro ---------- */
|
| 190 |
+
const intro = $('#intro'); let introT = 0;
|
| 191 |
+
const stage = (n, ms) => setTimeout(() => !started && intro.classList.add('s' + n), ms);
|
| 192 |
stage(1, 120); stage(2, 1100); stage(3, 2300); stage(4, 3300); stage(5, 4600);
|
|
|
|
|
|
|
| 193 |
intro.addEventListener('pointermove', e => { const x = e.clientX / innerWidth - .5, y = e.clientY / innerHeight - .5; $('#reveal').style.transform = `translate(${x * -18}px,${y * -14}px) rotateY(${x * 6}deg)`; });
|
|
|
|
|
|
|
| 194 |
function start() {
|
| 195 |
+
if (started) return; started = true; beep(110, .5, 'sine', .06); burst();
|
| 196 |
intro.classList.add('out'); setTimeout(() => intro.remove(), 1100);
|
| 197 |
+
['#hud', '#hint', '#core-stats', '#frame', '#mm'].forEach(s => $(s).hidden = false); document.body.classList.add('live'); cam.tr = cam.base; setCat('Alle'); select(0);
|
|
|
|
| 198 |
}
|
| 199 |
+
$('#skip').onclick = (e) => { e.stopPropagation(); start(); };
|
| 200 |
+
intro.addEventListener('pointerdown', (e) => { if (e.target.id !== 'skip') start(); });
|
| 201 |
+
cam.r = 60; cam.tr = 40;
|
| 202 |
|
| 203 |
/* ---------- loop ---------- */
|
| 204 |
+
const clock = new THREE.Clock(); let frames = 0, fpsT = 0, lowStreak = 0, statT = 0, mmT = 0;
|
| 205 |
+
const mm = $('#mm'); const mmDots = STUDIOS.map((s, i) => { const c = document.createElementNS('http://www.w3.org/2000/svg', 'circle'); c.setAttribute('r', 2.6); mm.querySelector('#mmd').append(c); return c; });
|
| 206 |
+
function drawMinimap(v) { const vw = mm.querySelector('#mmv'); nodes.forEach((n, i) => { const c = mmDots[i]; c.setAttribute('cx', 50 + n.position.x * 3.4); c.setAttribute('cy', 50 + n.position.z * 3.4);
|
| 207 |
+
c.setAttribute('class', i === sel ? 'sel' : v.includes(i) ? 'on' : 'off'); });
|
| 208 |
+
const a = Math.atan2(camera.position.z, camera.position.x) * 180 / Math.PI; vw.setAttribute('transform', `rotate(${a} 50 50)`); }
|
| 209 |
+
const stats = $('#core-stats');
|
| 210 |
+
const spring = (s, target, dt, w) => { const n = Math.max(1, Math.ceil(dt / .008)), h = dt / n; for (let k = 0; k < n; k++) { const a = w * w * (target - s.x) - 2 * w * s.v; s.v += a * h; s.x += s.v * h; } return s.x; };
|
| 211 |
+
const sp = { th: { x: 0, v: 0 }, ph: { x: 1.15, v: 0 }, r: { x: 60, v: 0 }, lk: { x: 0, v: 0 }, mx: { x: 0, v: 0 }, my: { x: 0, v: 0 } };
|
| 212 |
+
const AR = { pr: 1, ema: 16.7, t: 0, slow: 0 }; let lastT = performance.now();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 213 |
function setPR(p) { if (!renderer) return; AR.pr = p; renderer.setPixelRatio(p); renderer.setSize(innerWidth, innerHeight, false); if (composer) { composer.setPixelRatio(p); composer.setSize(innerWidth, innerHeight); } }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 214 |
function frame(now) {
|
| 215 |
requestAnimationFrame(frame);
|
| 216 |
+
now = now ?? performance.now(); const rawMs = now - lastT; lastT = now; const dt = Math.min(rawMs / 1000, .1) || .016; clock.elapsedTime += dt; const t = clock.elapsedTime;
|
| 217 |
+
frames++; fpsT += dt; if (fpsT > 1) { const fps = Math.round(frames / fpsT); $('#fps').textContent = fps + ' fps'; window.__fps = fps; frames = 0; fpsT = 0; }
|
|
|
|
| 218 |
if (renderer && started && qMode === 'AUTO') { AR.ema = AR.ema * .9 + rawMs * .1; AR.t += dt;
|
| 219 |
+
if (AR.t > .6) { AR.t = 0; const mxp = quality === 'high' ? Math.min(devicePixelRatio, 2) : Math.min(devicePixelRatio, 1.25); let p = AR.pr;
|
| 220 |
+
if (AR.ema > 19) p = Math.max(.6, p - (AR.ema > 30 ? .15 : .08)); else if (AR.ema < 14.5) p = Math.min(mxp, p + .05); if (Math.abs(p - AR.pr) > .01) setPR(+p.toFixed(2));
|
|
|
|
| 221 |
AR.slow = AR.pr <= .6 && AR.ema > 34 ? AR.slow + 1 : 0; if (AR.slow > 4 && quality === 'high') { quality = 'low'; applyQuality(); AR.slow = 0; } } }
|
| 222 |
+
window.__pr = AR.pr; if (!started) { introT += dt; if (introT > 7.8 && intro.classList.contains('s5')) start(); }
|
| 223 |
pollPad();
|
| 224 |
+
// camera (intro: slow fly; mouse parallax)
|
| 225 |
+
idleT += dt; const idle = started && idleT > 9 && openId == null;
|
| 226 |
+
const drift = openId != null ? 0 : started ? dt * (idle ? .09 : .03) : dt * .12; cam.tth += drift + spin * dt; spin *= Math.exp(-dt * 1.6);
|
| 227 |
+
if (drag) sp.th.x = cam.tth; // direct manipulation while dragging, springs take over on release
|
| 228 |
+
cam.th = spring(sp.th, cam.tth, dt, 3.4); cam.ph = spring(sp.ph, cam.tph + (idle ? Math.sin(t * .25) * .05 : 0), dt, 4); cam.r = spring(sp.r, cam.tr, dt, started ? 3.2 : 1.1);
|
| 229 |
+
const mx = mouse.x < 5 ? spring(sp.mx, mouse.x, dt, 4) : 0, my = mouse.y < 5 ? spring(sp.my, mouse.y, dt, 4) : 0;
|
| 230 |
+
camera.position.set(cam.r * Math.sin(cam.ph) * Math.cos(cam.th) + mx * 1.5, cam.r * Math.cos(cam.ph) + my * 1.5, cam.r * Math.sin(cam.ph) * Math.sin(cam.th)); const mob = innerWidth < 700, want = openId == null ? 0 : 1; lookK = spring(sp.lk, want, dt, 4);
|
| 231 |
+
const ox = mob ? 0 : .19 * cam.r * camera.aspect * lookK, oy = mob ? -.27 * cam.r * lookK : 0;
|
| 232 |
+
camera.lookAt(Math.sin(cam.th) * ox, oy, -Math.cos(cam.th) * ox);
|
| 233 |
+
// core pulse
|
| 234 |
+
const pulse = 1 + Math.sin(t * 2.4) * .06 + (bursting * .5);
|
| 235 |
+
coreMesh.scale.setScalar(pulse); coreMesh.rotation.y += dt * .4; coreMesh.rotation.x += dt * .15; coreMat.emissiveIntensity = .18 + Math.max(0, Math.sin(t * 2.4)) * .22;
|
| 236 |
+
shell.rotation.y -= dt * .25; shell2.rotation.x += dt * .1; glow.scale.setScalar(9 + Math.sin(t * 2.4) * 1 + bursting * 10);
|
| 237 |
+
core.children.forEach(c => { if (c.userData.spin) c.rotation.z += dt * c.userData.spin; });
|
| 238 |
+
coreLight.intensity = 35 + Math.sin(t * 2.4) * 10;
|
| 239 |
+
// swarm
|
| 240 |
+
const sc = swarm.count;
|
| 241 |
+
for (let i = 0; i < sc; i++) { const d = swData[i]; d.a += d.s * dt * (1 + bursting * 4);
|
| 242 |
+
const r = d.r + Math.sin(t + d.w) * .6 + bursting * 6;
|
| 243 |
+
tmp.position.set(Math.cos(d.a) * r, d.y + Math.sin(t * .7 + d.w) * .8, Math.sin(d.a) * r);
|
| 244 |
+
tmp.rotation.set(t + d.w, d.a, 0); tmp.scale.setScalar(.7 + .3 * Math.sin(t * 3 + d.w)); tmp.updateMatrix(); swarm.setMatrixAt(i, tmp.matrix); }
|
| 245 |
+
swarm.instanceMatrix.needsUpdate = true;
|
| 246 |
+
// dust burst
|
| 247 |
+
if (bursting > 0) { for (let i = 0; i < DUST * 3; i++) { dpos[i] += dvel[i]; dvel[i] *= .985; } dGeo.attributes.position.needsUpdate = true; bursting = Math.max(0, bursting - dt * .5); }
|
| 248 |
+
dust.rotation.y += dt * .02;
|
| 249 |
+
// nodes
|
| 250 |
+
const v = visible();
|
| 251 |
+
nodes.forEach((n, i) => { const u = n.userData; u.ph = (u.ph || 0) + (openId != null ? 0 : dt * .04); const a = u.a + u.ph; const on = v.includes(i); spring(u.lift, i === sel ? .45 : 0, dt, 8); const s = spring(u.sc, (i === sel ? 1.35 : 1) * (on ? 1 : .6), dt, 9);
|
| 252 |
+
n.position.set(Math.cos(a) * u.R, u.y + Math.sin(t + i) * .3 + u.lift.x + (idle ? Math.sin(t * 1.3 + i) * .15 : 0), Math.sin(a) * u.R);
|
| 253 |
+
n.rotation.z += dt * (i === sel ? 1.5 : .3); n.scale.setScalar(s);
|
| 254 |
+
n.material.emissiveIntensity = i === sel ? .9 + Math.sin(t * 4) * .2 : on ? .32 : .08;
|
| 255 |
+
const p = u.line.geometry.attributes.position; p.setXYZ(1, n.position.x, n.position.y, n.position.z); p.needsUpdate = true; u.line.material.opacity = on ? (i === sel ? .8 : .25) : .05; });
|
| 256 |
+
streamPts.forEach((s, k) => { s.t = (s.t + dt * .35) % 1; const p = s.n.position; spPos[k * 3] = p.x * (1 - s.t); spPos[k * 3 + 1] = p.y * (1 - s.t); spPos[k * 3 + 2] = p.z * (1 - s.t); });
|
| 257 |
+
spGeo.attributes.position.needsUpdate = true;
|
| 258 |
+
// hover raycast
|
| 259 |
+
if (started && !drag && mouse.x < 5 && openId == null) { ray.setFromCamera(mouse, camera); const h = ray.intersectObjects(nodes, false)[0]; cv.style.cursor = h ? 'pointer' : 'grab'; if (h && h.object.userData.i !== sel) select(h.object.userData.i); }
|
| 260 |
+
if (renderer) { if (composer && quality === 'high') composer.render(); else renderer.render(scene, camera); }
|
| 261 |
+
// labels + wire
|
| 262 |
+
if (started) {
|
| 263 |
+
const placed = []; const camP = camera.position;
|
| 264 |
+
const blk = ['#hud', '#core-stats', '#mm', '#pop', '#hint', '#bmc'].map(q => $(q)).filter(e => e && !e.hidden && e.offsetParent !== null).map(e => e.getBoundingClientRect());
|
| 265 |
+
nodes.map((n, i) => ({ n, i, d: n.position.distanceTo(camP) })).sort((a, b) => a.d - b.d).forEach(({ n, i, d }, rank) => {
|
| 266 |
+
const p = screenPos(n); const l = labels[i]; if (p.z >= 1) { l.style.display = 'none'; return; } l.style.display = '';
|
| 267 |
+
const far = rank > 9 && i !== sel && i !== openId; l.classList.toggle('far', far);
|
| 268 |
+
const w = far ? 30 : l.offsetWidth || 110, h = 26; let y = p.y + 34;
|
| 269 |
+
for (let k = 0; k < 6; k++) { const hit = placed.find(r => Math.abs(r.x - p.x) < (r.w + w) / 2 + 4 && Math.abs(r.y - y) < h); if (!hit) break; y = hit.y + (y >= hit.y ? h : -h); }
|
| 270 |
+
placed.push({ x: p.x, y, w });
|
| 271 |
+
const lx0 = p.x - w / 2, lx1 = p.x + w / 2; l.classList.toggle('hid', blk.some(r => lx0 < r.right && lx1 > r.left && y - 13 < r.bottom && y + 13 > r.top)); l.style.transform = `translate(${p.x}px,${y}px) translate(-50%,-50%)`; l.style.zIndex = 100 - rank;
|
| 272 |
+
l.classList.toggle('dim', !v.includes(i)); });
|
| 273 |
+
if ((mmT += dt) > .1) { mmT = 0; drawMinimap(v); }
|
| 274 |
+
if (openId != null && !pop.hidden) { const p = screenPos(nodes[openId]); const r = pop.getBoundingClientRect(); const wl = $('#wl');
|
| 275 |
+
const tx = p.x < r.left ? r.left : r.right; wl.setAttribute('x1', p.x); wl.setAttribute('y1', p.y); wl.setAttribute('x2', tx); wl.setAttribute('y2', r.top + 14);
|
| 276 |
+
}
|
| 277 |
+
if ((statT += dt) > .5) { statT = 0; const ld = (55 + Math.sin(t * .7) * 20) | 0; stats.innerHTML = `<h4>META-ENGINE CORE</h4><dl><dt>Agenten</dt><dd>${120 + (Math.sin(t) * 8 | 0)}</dd><dt>Tokens/s</dt><dd>${(4200 + Math.random() * 900) | 0}</dd><dt>Studios</dt><dd>${STUDIOS.length - 1}+1</dd><dt>Last</dt><dd>${ld}%</dd></dl><div class="bar"><i style="width:${ld}%"></i></div><p>● SIMULATION</p>`; }
|
| 278 |
+
}
|
| 279 |
+
}
|
| 280 |
+
setPR(1); applyQuality();
|
| 281 |
+
window.__studius = { core: () => screenPos(core), get sel() { return sel; }, get openId() { return openId; }, get zoom() { return cam.r; }, get th() { return cam.th; }, nodeScreen: (i) => screenPos(nodes[i]), open: (i) => { select(i); open(i); } };
|
| 282 |
+
if (gl3d) requestAnimationFrame(frame); else { setTimeout(() => start(), 7800);
|
| 283 |
+
document.body.insertAdjacentHTML('beforeend', '<div style="position:fixed;left:14px;top:60px;z-index:16;color:#faa968;font-size:11px">⚠ WebGL nicht verfügbar – 2D-Modus</div>');
|
| 284 |
+
// minimal 2D loop to keep labels in a ring
|
| 285 |
+
const tick = () => { requestAnimationFrame(tick); const t = performance.now() / 1000; nodes.forEach((n, i) => { const u = n.userData; const a = u.a + t * .04; n.position.set(Math.cos(a) * u.R, u.y, Math.sin(a) * u.R); });
|
| 286 |
+
camera.position.set(0, 18, 18); camera.lookAt(0, 0, 0); camera.updateMatrixWorld(); if (started) nodes.forEach((n, i) => { n.updateMatrixWorld(); const p = screenPos(n); labels[i].style.transform = `translate(${p.x}px,${p.y}px) translate(-50%,-50%)`; }); };
|
| 287 |
+
tick();
|
| 288 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
index.html
CHANGED
|
@@ -5,19 +5,16 @@
|
|
| 5 |
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
|
| 6 |
<meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Expires" content="0">
|
| 7 |
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
|
| 8 |
-
<meta name="theme-color" content="#050505">
|
| 9 |
<title>STUDIUS · DAS Studio — Einswarm</title>
|
| 10 |
<link rel="icon" href="assets/einswarm-mascot.webp">
|
| 11 |
<link rel="preload" href="fonts/outfit-latin-wght.woff2" as="font" type="font/woff2" crossorigin>
|
| 12 |
-
<link rel="stylesheet" href="style.css?v=
|
| 13 |
</head>
|
| 14 |
<body>
|
| 15 |
<canvas id="gl"></canvas>
|
| 16 |
-
<div id="
|
| 17 |
-
<div id="veil"></div>
|
| 18 |
-
<div id="satLabel" aria-hidden="true"></div>
|
| 19 |
|
| 20 |
-
<!-- INTRO
|
| 21 |
<section id="intro" aria-label="Intro">
|
| 22 |
<div class="sweep"></div>
|
| 23 |
<div class="halo"></div>
|
|
@@ -32,64 +29,26 @@
|
|
| 32 |
<div id="ibar"><i></i></div>
|
| 33 |
</section>
|
| 34 |
|
| 35 |
-
<!--
|
| 36 |
-
<
|
| 37 |
-
<
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
</
|
| 41 |
-
<
|
| 42 |
-
<
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
<div class="hcat" id="hCat">Studio</div>
|
| 53 |
-
<h2 id="hName">Chat</h2>
|
| 54 |
-
<p id="hDesc"></p>
|
| 55 |
-
<div class="hact">
|
| 56 |
-
<button id="hOpen" class="primary" type="button"><span class="btnA">A</span> Öffnen</button>
|
| 57 |
-
<span class="meta" id="hMeta"></span>
|
| 58 |
-
</div>
|
| 59 |
-
</section>
|
| 60 |
-
<section class="row" aria-label="Studios">
|
| 61 |
-
<h3 id="rowTitle">Alle Studios</h3>
|
| 62 |
-
<div id="tiles" role="listbox"></div>
|
| 63 |
-
</section>
|
| 64 |
-
<section class="row small" aria-label="Schnellzugriff">
|
| 65 |
-
<h3>Angeheftet</h3>
|
| 66 |
-
<div id="pins"></div>
|
| 67 |
-
</section>
|
| 68 |
-
</main>
|
| 69 |
-
|
| 70 |
-
<aside id="engine" aria-label="Meta-Engine Status"></aside>
|
| 71 |
-
<footer id="hints"><span><b class="btnA">A</b> Auswählen</span><span><b class="btnB">B</b> Zurück</span><span><b class="btnK">G</b> Guide</span><span><b class="btnK">Tab</b> Kategorie</span></footer>
|
| 72 |
-
</div>
|
| 73 |
-
|
| 74 |
-
<!-- GUIDE -->
|
| 75 |
-
<aside id="guide" aria-label="Guide" hidden>
|
| 76 |
-
<div class="gh"><img src="assets/einswarm-mascot.webp" alt=""><div><b>Einswarm</b><small>STUDIUS Guide</small></div></div>
|
| 77 |
-
<div id="gcats"></div>
|
| 78 |
-
<div class="gsec">Einstellungen</div>
|
| 79 |
-
<button class="gi" id="gQ" type="button"></button>
|
| 80 |
-
<button class="gi" id="gS" type="button"></button>
|
| 81 |
-
<div class="gsec">Benachrichtigungen</div>
|
| 82 |
-
<div id="notes"></div>
|
| 83 |
-
<p class="gfoot">Simulation · keine echten Backends</p>
|
| 84 |
-
</aside>
|
| 85 |
-
<div id="scrim" hidden></div>
|
| 86 |
-
|
| 87 |
-
<!-- WIDGET CARD -->
|
| 88 |
-
<div id="pop" hidden role="dialog" aria-modal="true"></div>
|
| 89 |
-
<div id="toast" hidden></div>
|
| 90 |
|
| 91 |
<a id="bmc" href="https://www.buymeacoffee.com/2btainment" target="_blank" rel="noopener noreferrer">Buy me a coffee</a>
|
| 92 |
<noscript><p style="color:#f2c94c;padding:2em">STUDIUS braucht JavaScript.</p></noscript>
|
| 93 |
-
<script type="module" src="app.js?v=
|
| 94 |
</body>
|
| 95 |
</html>
|
|
|
|
| 5 |
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
|
| 6 |
<meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Expires" content="0">
|
| 7 |
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
|
|
|
|
| 8 |
<title>STUDIUS · DAS Studio — Einswarm</title>
|
| 9 |
<link rel="icon" href="assets/einswarm-mascot.webp">
|
| 10 |
<link rel="preload" href="fonts/outfit-latin-wght.woff2" as="font" type="font/woff2" crossorigin>
|
| 11 |
+
<link rel="stylesheet" href="style.css?v=30">
|
| 12 |
</head>
|
| 13 |
<body>
|
| 14 |
<canvas id="gl"></canvas>
|
| 15 |
+
<div id="hexbg"></div>
|
|
|
|
|
|
|
| 16 |
|
| 17 |
+
<!-- INTRO -->
|
| 18 |
<section id="intro" aria-label="Intro">
|
| 19 |
<div class="sweep"></div>
|
| 20 |
<div class="halo"></div>
|
|
|
|
| 29 |
<div id="ibar"><i></i></div>
|
| 30 |
</section>
|
| 31 |
|
| 32 |
+
<!-- HUD -->
|
| 33 |
+
<header id="hud" hidden>
|
| 34 |
+
<div class="brand"><img src="assets/einswarm-mascot.webp" alt=""><b>STUDIUS</b><span>by EINSWARM</span><em>META-STUDIO</em></div>
|
| 35 |
+
<nav id="cats"></nav>
|
| 36 |
+
<div class="hudr">
|
| 37 |
+
<span id="fps">-- fps</span>
|
| 38 |
+
<button id="q" type="button" title="Qualität (Q)">Q:AUTO</button>
|
| 39 |
+
<button id="snd" type="button" title="Sound (M)" aria-label="Sound"></button>
|
| 40 |
+
</div>
|
| 41 |
+
</header>
|
| 42 |
+
<div id="core-stats" hidden></div>
|
| 43 |
+
<div id="frame" hidden><i class="c tl"></i><i class="c tr"></i><i class="c bl"></i><i class="c br"></i></div>
|
| 44 |
+
<svg id="mm" hidden viewBox="0 0 100 100" aria-label="Minimap"><circle cx="50" cy="50" r="46" class="r1"/><circle cx="50" cy="50" r="34" class="r2"/><circle cx="50" cy="50" r="4" class="core"/><g id="mmv"><path d="M50 50 L96 38 A47 47 0 0 1 96 62 Z" class="cone"/></g><g id="mmd"></g></svg>
|
| 45 |
+
<div id="labels"></div>
|
| 46 |
+
<svg id="wire"><line id="wl" x1="0" y1="0" x2="0" y2="0"/></svg>
|
| 47 |
+
<div id="pop" hidden></div>
|
| 48 |
+
<footer id="hint" hidden><kbd>←→</kbd><kbd>WASD</kbd> wählen <kbd>ENTER</kbd> öffnen <kbd>ESC</kbd> zurück <kbd>TAB</kbd> Kategorie <kbd>Q</kbd> Qualität · Ziehen = Orbit</footer>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
<a id="bmc" href="https://www.buymeacoffee.com/2btainment" target="_blank" rel="noopener noreferrer">Buy me a coffee</a>
|
| 51 |
<noscript><p style="color:#f2c94c;padding:2em">STUDIUS braucht JavaScript.</p></noscript>
|
| 52 |
+
<script type="module" src="app.js?v=30"></script>
|
| 53 |
</body>
|
| 54 |
</html>
|
style.css
CHANGED
|
@@ -1,22 +1,23 @@
|
|
| 1 |
@font-face{font-family:Outfit;src:url(fonts/outfit-latin-wght.woff2) format("woff2");font-weight:100 900;font-display:swap}
|
| 2 |
@font-face{font-family:JBM;src:url(fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2");font-weight:400;font-display:swap}
|
|
|
|
| 3 |
:root{
|
| 4 |
-
--
|
| 5 |
-
--
|
| 6 |
-
--
|
| 7 |
-
--
|
| 8 |
-
--spring:cubic-bezier(.34,1.56,.64,1);--ease:cubic-bezier(.16,1,.3,1);--r:14px;
|
| 9 |
-
font-family:Outfit,system-ui,-apple-system,"Segoe UI",sans-serif;
|
| 10 |
}
|
| 11 |
*{box-sizing:border-box}
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
| 20 |
.btnA,.btnB,.btnK{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:10px;font:700 11px/1 Outfit,sans-serif;color:#000;background:#7bd84f}
|
| 21 |
.btnB{background:#e8524a}.btnK{background:rgba(255,255,255,.14);color:var(--txt);border-radius:5px}
|
| 22 |
/* ---------- intro ---------- */
|
|
@@ -48,156 +49,122 @@ body.no3d #bg2d{display:block}
|
|
| 48 |
#ibar{position:absolute;left:50%;bottom:6vh;width:120px;height:2px;margin-left:-60px;background:rgba(255,255,255,.08);border-radius:2px;overflow:hidden}
|
| 49 |
#ibar i{display:block;height:100%;width:100%;background:var(--gold);transform-origin:left;transform:scaleX(0)}
|
| 50 |
#intro.s1 #ibar i{transition:transform 7.6s linear;transform:scaleX(1)}
|
| 51 |
-
/* ----------
|
| 52 |
-
#
|
| 53 |
-
#
|
| 54 |
-
#
|
| 55 |
-
.
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
#cats
|
| 64 |
-
#cats button
|
| 65 |
-
#cats button
|
| 66 |
-
.
|
| 67 |
-
.
|
| 68 |
-
.
|
| 69 |
-
.
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
#
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
#
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
#
|
| 79 |
-
#
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
.
|
| 84 |
-
.
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
.
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
.
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
.
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
.
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
.
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
.
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
#
|
| 112 |
-
#
|
| 113 |
-
#
|
| 114 |
-
#
|
| 115 |
-
#
|
| 116 |
-
|
| 117 |
-
#
|
| 118 |
-
#
|
| 119 |
-
|
| 120 |
-
#
|
| 121 |
-
|
| 122 |
-
#
|
| 123 |
-
.
|
| 124 |
-
|
| 125 |
-
.
|
| 126 |
-
.
|
| 127 |
-
|
| 128 |
-
.
|
| 129 |
-
.
|
| 130 |
-
.
|
| 131 |
-
.
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
#pop.in{animation:cardIn .6s var(--spring)}
|
| 139 |
-
#pop.outA{animation:cardOut .28s var(--ease) forwards}
|
| 140 |
-
@keyframes cardIn{from{opacity:0;transform:translate(-50%,-46%) scale(.9)}}
|
| 141 |
-
@keyframes cardOut{to{opacity:0;transform:translate(-50%,-50%) scale(.95)}}
|
| 142 |
-
#pop .ph{position:relative;display:flex;align-items:center;gap:16px;padding:22px 22px 18px;background:radial-gradient(120% 140% at 0% 0%,rgba(242,201,76,.2),transparent 60%)}
|
| 143 |
-
#pop .pi{width:52px;height:52px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(160deg,#f9de82,var(--gold2));color:#000;box-shadow:0 8px 24px rgba(242,201,76,.3);flex:none}
|
| 144 |
-
#pop .pi .ic{width:26px;height:26px}
|
| 145 |
-
#pop .pt{flex:1;min-width:0}#pop .pt b{display:block;font-size:22px;font-weight:700}#pop .pt small{font-size:13px;color:var(--mut)}
|
| 146 |
-
#pop .ph button{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.07);color:var(--txt);transition:background .2s,transform .3s var(--spring)}
|
| 147 |
-
#pop .ph button:hover,#pop .ph button:focus-visible{background:rgba(255,255,255,.16);transform:scale(1.08);outline:none}
|
| 148 |
-
#pop .pb{padding:4px 22px 18px;overflow:auto;animation:fadeUp .6s .12s var(--ease) backwards}
|
| 149 |
-
@keyframes fadeUp{from{opacity:0;transform:translateY(10px)}}
|
| 150 |
-
#pop .pf{display:flex;justify-content:space-between;align-items:center;padding:12px 22px;border-top:1px solid rgba(255,255,255,.06);font-size:12px;color:var(--dim)}
|
| 151 |
-
#pop .pf span{display:flex;gap:7px;align-items:center}
|
| 152 |
-
#pop input,#pop textarea{width:100%;background:rgba(0,0,0,.35);border:0;box-shadow:inset 0 0 0 1px rgba(255,255,255,.1);border-radius:10px;color:var(--txt);font:inherit;padding:10px 12px;outline:none;transition:box-shadow .2s}
|
| 153 |
-
#pop input:focus,#pop textarea:focus{box-shadow:inset 0 0 0 2px var(--gold)}
|
| 154 |
-
#pop input[type=range]{padding:0;box-shadow:none;background:none;accent-color:var(--gold)}
|
| 155 |
-
#pop .row{display:flex;gap:8px;align-items:center;margin-top:10px;flex-wrap:wrap}
|
| 156 |
-
#pop .btn{border-radius:999px;padding:9px 18px;font-weight:600;font-size:13px;color:#000;background:linear-gradient(180deg,#f9de82,var(--gold2));transition:transform .3s var(--spring),filter .2s}
|
| 157 |
-
#pop .btn:hover{transform:scale(1.05)}#pop .btn:active{transform:scale(.97)}
|
| 158 |
-
#pop .btn.alt{background:rgba(255,255,255,.08);color:var(--txt)}
|
| 159 |
-
#pop canvas{width:100%;display:block;background:#000;border-radius:12px;touch-action:none}
|
| 160 |
-
.chat{height:200px;overflow:auto;background:rgba(0,0,0,.3);border-radius:12px;padding:12px;margin-bottom:8px}
|
| 161 |
-
.chat p{margin:0 0 8px;line-height:1.5}.chat .u{color:var(--gold)}.chat .a{color:var(--txt)}
|
| 162 |
-
.prog{height:6px;border-radius:6px;background:rgba(255,255,255,.08);overflow:hidden}.prog i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--gold2),#ffe7a0);transition:width .2s}
|
| 163 |
-
.track{position:relative;height:24px;background:rgba(0,0,0,.4);border-radius:6px;margin-top:4px}
|
| 164 |
-
.clip{position:absolute;top:2px;bottom:2px;border-radius:4px;cursor:grab;font-size:10px;color:#000;padding-left:5px;overflow:hidden}
|
| 165 |
-
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
|
| 166 |
-
.grid div{aspect-ratio:1.3;border-radius:10px;background:rgba(255,255,255,.05);display:flex;align-items:flex-end;padding:8px;font-size:12px;cursor:pointer;transition:transform .3s var(--spring),box-shadow .2s}
|
| 167 |
-
.grid div:hover{transform:scale(1.04);box-shadow:0 0 0 2px var(--gold)}
|
| 168 |
-
.code{background:rgba(0,0,0,.45);border-radius:10px;padding:12px;font:12px/1.5 JBM,monospace;min-height:90px;white-space:pre;overflow:auto;color:var(--cy)}
|
| 169 |
-
.k{color:var(--acc)}.s{color:var(--gold)}
|
| 170 |
input[type=range]{accent-color:var(--gold);flex:1}
|
| 171 |
-
#
|
| 172 |
-
#
|
| 173 |
-
|
| 174 |
#bmc{position:fixed;right:14px;bottom:12px;z-index:60;background:#FFDD00;color:#000;font:700 13px/1 system-ui,sans-serif;padding:10px 14px;border-radius:8px;text-decoration:none;box-shadow:0 2px 10px rgba(0,0,0,.5)}
|
| 175 |
-
@media (min-width:
|
| 176 |
-
@media (max-
|
| 177 |
-
@media (max-width:
|
| 178 |
@media (max-width:700px){
|
| 179 |
-
#
|
| 180 |
-
#cats{
|
| 181 |
-
#cats button{padding:
|
| 182 |
-
#
|
| 183 |
-
#
|
| 184 |
-
#
|
| 185 |
-
|
| 186 |
-
.
|
| 187 |
-
#veil{background:linear-gradient(0deg,rgba(5,5,5,.95) 0%,rgba(5,5,5,.5) 55%,transparent 80%),radial-gradient(120% 90% at 50% 40%,transparent 50%,rgba(0,0,0,.6))}
|
| 188 |
-
#pop{left:0;top:auto;bottom:0;width:100%;max-height:88vh;border-radius:22px 22px 0 0;transform:none}
|
| 189 |
-
@keyframes cardIn{from{transform:translateY(100%)}}
|
| 190 |
-
@keyframes cardOut{to{transform:translateY(100%)}}
|
| 191 |
-
#pop .pf{padding-bottom:calc(12px + env(safe-area-inset-bottom) + 44px)}
|
| 192 |
}
|
| 193 |
|
| 194 |
-
/*
|
| 195 |
-
#
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
#
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
#
|
| 202 |
-
#
|
| 203 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
@font-face{font-family:Outfit;src:url(fonts/outfit-latin-wght.woff2) format("woff2");font-weight:100 900;font-display:swap}
|
| 2 |
@font-face{font-family:JBM;src:url(fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2");font-weight:400;font-display:swap}
|
| 3 |
+
@font-face{font-family:JBM;src:url(fonts/jetbrains-mono-latin-700-normal.woff2) format("woff2");font-weight:700;font-display:swap}
|
| 4 |
:root{
|
| 5 |
+
--spring:cubic-bezier(.34,1.56,.64,1);
|
| 6 |
+
--glass:rgba(8,7,4,.62);--line:rgba(242,201,76,.28);--line2:rgba(242,201,76,.55);--txt:#efe6cf;--mut:#9a8f78;--ease:cubic-bezier(.16,1,.3,1);
|
| 7 |
+
/* Einswarm */ --bk:#050505;--gold:#f2c94c;--gold2:#d4a63a;--golddim:#7a5d1c;
|
| 8 |
+
/* Omarchy Retro-82 */ --r-bg:#05182e;--r-bg2:#020c17;--r-acc:#faa968;--r-or:#e97b3c;--r-red:#f85525;--r-teal:#028391;--r-cy:#8cbfb8;--r-fg:#f6dcac;--r-mut:#2a6b78;
|
|
|
|
|
|
|
| 9 |
}
|
| 10 |
*{box-sizing:border-box}
|
| 11 |
+
html,body{margin:0;height:100%;overflow:hidden;background:var(--bk);color:var(--r-fg);font-family:Outfit,system-ui,"Segoe UI",sans-serif;-webkit-tap-highlight-color:transparent}
|
| 12 |
+
#gl{position:fixed;inset:0;width:100%;height:100%;display:block;z-index:0}
|
| 13 |
+
#hexbg{position:fixed;inset:0;z-index:0;pointer-events:none;opacity:.12;
|
| 14 |
+
background:radial-gradient(ellipse at 50% 120%,rgba(250,169,104,.25),transparent 60%),
|
| 15 |
+
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97'%3E%3Cpath d='M28 0L56 16v32L28 64 0 48V16zM28 64v33' fill='none' stroke='%23d4a63a' stroke-width='1'/%3E%3C/svg%3E");}
|
| 16 |
+
|
| 17 |
+
button{font:inherit;color:inherit;cursor:pointer}
|
| 18 |
+
|
| 19 |
+
body::before{content:"";position:fixed;inset:0;pointer-events:none;z-index:1;background:radial-gradient(ellipse at 50% 45%,transparent 45%,rgba(0,0,0,.75) 100%)}
|
| 20 |
+
.ic{width:1.15em;height:1.15em;flex:none;display:block}
|
| 21 |
.btnA,.btnB,.btnK{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:10px;font:700 11px/1 Outfit,sans-serif;color:#000;background:#7bd84f}
|
| 22 |
.btnB{background:#e8524a}.btnK{background:rgba(255,255,255,.14);color:var(--txt);border-radius:5px}
|
| 23 |
/* ---------- intro ---------- */
|
|
|
|
| 49 |
#ibar{position:absolute;left:50%;bottom:6vh;width:120px;height:2px;margin-left:-60px;background:rgba(255,255,255,.08);border-radius:2px;overflow:hidden}
|
| 50 |
#ibar i{display:block;height:100%;width:100%;background:var(--gold);transform-origin:left;transform:scaleX(0)}
|
| 51 |
#intro.s1 #ibar i{transition:transform 7.6s linear;transform:scaleX(1)}
|
| 52 |
+
/* ---------- HUD frame ---------- */
|
| 53 |
+
#frame{position:fixed;inset:10px;z-index:12;pointer-events:none}
|
| 54 |
+
#frame .c{position:absolute;width:22px;height:22px;border:solid var(--line2);border-width:0}
|
| 55 |
+
#frame .tl{left:0;top:58px;border-left-width:1px;border-top-width:1px}#frame .tr{right:0;top:58px;border-right-width:1px;border-top-width:1px}
|
| 56 |
+
#frame .bl{left:0;bottom:0;border-left-width:1px;border-bottom-width:1px}#frame .br{right:0;bottom:0;border-right-width:1px;border-bottom-width:1px}
|
| 57 |
+
#hud{position:fixed;top:0;left:0;right:0;z-index:20;display:flex;align-items:center;gap:18px;height:56px;padding:0 18px;
|
| 58 |
+
background:linear-gradient(180deg,rgba(6,5,3,.92),rgba(6,5,3,.7));backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
|
| 59 |
+
#hud::after{content:"";position:absolute;left:18px;right:18px;bottom:-1px;height:1px;background:linear-gradient(90deg,transparent,var(--gold),transparent);opacity:.6}
|
| 60 |
+
.brand{display:flex;align-items:center;gap:10px;flex:none}.brand img{width:30px;filter:drop-shadow(0 0 6px rgba(242,201,76,.4))}
|
| 61 |
+
.brand b{color:var(--gold);letter-spacing:.3em;font-size:15px}
|
| 62 |
+
.brand span{font-size:9px;color:var(--mut);letter-spacing:.2em;display:flex;flex-direction:column;line-height:1.3}
|
| 63 |
+
.brand em{font-style:normal;font-size:9px;color:var(--mut);letter-spacing:.2em;border-left:1px solid var(--line);padding-left:10px;display:none}
|
| 64 |
+
#cats{display:flex;gap:2px;flex:1;justify-content:center;overflow-x:auto;scrollbar-width:none}
|
| 65 |
+
#cats button{background:transparent;border:0;border-bottom:2px solid transparent;padding:18px 11px 16px;font-size:10.5px;letter-spacing:.18em;white-space:nowrap;color:var(--mut);transition:color .2s,border-color .2s,background .2s}
|
| 66 |
+
#cats button:hover{color:var(--txt);background:rgba(242,201,76,.05)}
|
| 67 |
+
#cats button.on{color:var(--gold);border-bottom-color:var(--gold);background:linear-gradient(0deg,rgba(242,201,76,.14),transparent);text-shadow:0 0 10px rgba(242,201,76,.5)}
|
| 68 |
+
.hudr{display:flex;gap:8px;align-items:center;font-size:10px;letter-spacing:.12em;flex:none}
|
| 69 |
+
.hudr button{display:flex;align-items:center;height:30px;background:var(--glass);border:1px solid var(--line);padding:0 10px;color:var(--gold);transition:border-color .2s}
|
| 70 |
+
.hudr button:hover{border-color:var(--gold)}
|
| 71 |
+
#fps{color:var(--mut);min-width:44px;text-align:right;font-variant-numeric:tabular-nums}
|
| 72 |
+
/* panels */
|
| 73 |
+
#core-stats,#pop{background:linear-gradient(160deg,rgba(20,16,6,.78),rgba(5,5,4,.86));backdrop-filter:blur(12px);border:1px solid var(--line)}
|
| 74 |
+
#core-stats{position:fixed;left:22px;bottom:48px;z-index:15;width:178px;font-size:10.5px;color:var(--txt);padding:12px 14px;
|
| 75 |
+
clip-path:polygon(0 0,calc(100% - 12px) 0,100% 12px,100% 100%,0 100%)}
|
| 76 |
+
#core-stats::before{content:"";position:absolute;left:0;top:0;width:3px;height:22px;background:var(--gold)}
|
| 77 |
+
#core-stats h4{margin:0 0 8px;font-size:10px;letter-spacing:.22em;color:var(--gold)}
|
| 78 |
+
#core-stats dl{display:grid;grid-template-columns:1fr auto;gap:3px 8px;margin:0}
|
| 79 |
+
#core-stats dt{color:var(--mut)}#core-stats dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}
|
| 80 |
+
#core-stats .bar{height:3px;background:rgba(255,255,255,.07);margin-top:8px}#core-stats .bar i{display:block;height:100%;background:linear-gradient(90deg,var(--gold2),var(--gold));transition:width .5s}
|
| 81 |
+
#core-stats p{margin:8px 0 0;font-size:9px;letter-spacing:.2em;color:var(--r-cy)}
|
| 82 |
+
#mm{position:fixed;right:22px;bottom:62px;z-index:15;width:116px;height:116px;filter:drop-shadow(0 0 8px rgba(0,0,0,.8))}
|
| 83 |
+
#mm .r1{fill:rgba(8,7,4,.7);stroke:var(--line2);stroke-width:.8}#mm .r2{fill:none;stroke:var(--line);stroke-width:.5;stroke-dasharray:2 2}
|
| 84 |
+
#mm .core{fill:var(--gold);filter:drop-shadow(0 0 3px var(--gold))}#mm .cone{fill:rgba(242,201,76,.10);stroke:none}
|
| 85 |
+
#mm circle.on{fill:var(--txt)}#mm circle.off{fill:#4a4433}#mm circle.sel{fill:var(--gold);r:4}
|
| 86 |
+
/* labels */
|
| 87 |
+
#labels{position:fixed;inset:0;z-index:10;pointer-events:none}
|
| 88 |
+
.lbl{position:absolute;left:0;top:0;display:flex;align-items:center;gap:7px;pointer-events:auto;cursor:pointer;font-size:10.5px;letter-spacing:.12em;padding:5px 10px 5px 8px;white-space:nowrap;
|
| 89 |
+
background:rgba(6,5,3,.78);border:1px solid var(--line);color:var(--txt);transition:background .2s,border-color .2s,color .2s,opacity .3s,padding .2s;will-change:transform}
|
| 90 |
+
.lbl .ic{color:var(--gold);width:14px;height:14px}
|
| 91 |
+
.lbl.far{padding:5px;opacity:.75}.lbl.far span{display:none}
|
| 92 |
+
.lbl:hover,.lbl.sel{border-color:var(--gold);background:rgba(36,28,8,.92);color:#fff;box-shadow:0 0 18px rgba(242,201,76,.35),inset 0 0 0 1px rgba(242,201,76,.2)}
|
| 93 |
+
.lbl.sel::before{content:"";position:absolute;left:-1px;top:-1px;bottom:-1px;width:3px;background:var(--gold)}
|
| 94 |
+
.lbl.dim{opacity:.22}
|
| 95 |
+
.lbl.hid{opacity:0!important;pointer-events:none}
|
| 96 |
+
.lbl[data-cat="+"] .ic{color:var(--r-red)}
|
| 97 |
+
#wire{position:fixed;inset:0;width:100%;height:100%;z-index:11;pointer-events:none}
|
| 98 |
+
#wl{stroke:var(--gold);stroke-width:1;stroke-dasharray:4 4;opacity:0;transition:opacity .3s;animation:dash 1s linear infinite}
|
| 99 |
+
@keyframes dash{to{stroke-dashoffset:-8}}
|
| 100 |
+
#wire.on #wl{opacity:.75}
|
| 101 |
+
/* popup */
|
| 102 |
+
#pop{position:fixed;z-index:30;width:min(340px,92vw);color:var(--txt);font-size:11.5px;
|
| 103 |
+
box-shadow:0 20px 60px rgba(0,0,0,.6),0 0 0 1px rgba(0,0,0,.6),0 0 40px rgba(242,201,76,.12);
|
| 104 |
+
clip-path:polygon(16px 0,100% 0,100% calc(100% - 16px),calc(100% - 16px) 100%,0 100%,0 16px)}
|
| 105 |
+
#pop.in{animation:pin .45s var(--ease)}
|
| 106 |
+
@keyframes pin{from{transform:translateY(10px) scale(.96);opacity:0;filter:blur(4px)}}
|
| 107 |
+
#pop::before{content:"";position:absolute;left:0;top:0;width:16px;height:16px;background:linear-gradient(135deg,var(--gold) 50%,transparent 50%)}
|
| 108 |
+
#pop .ph{display:flex;align-items:center;gap:10px;padding:12px 12px 10px 18px;border-bottom:1px solid var(--line);background:linear-gradient(90deg,rgba(242,201,76,.10),transparent)}
|
| 109 |
+
#pop .pi{display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--line2);color:var(--gold);background:rgba(242,201,76,.08);flex:none}
|
| 110 |
+
#pop .pi .ic{width:17px;height:17px}
|
| 111 |
+
#pop .pt{display:flex;flex-direction:column;min-width:0;flex:1}
|
| 112 |
+
#pop .pt b{color:var(--gold);letter-spacing:.2em;font-size:12px;text-transform:uppercase}
|
| 113 |
+
#pop .pt small{color:var(--mut);font-size:9.5px;letter-spacing:.12em;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
| 114 |
+
#pop .ph button{background:transparent;color:var(--mut);border:1px solid transparent;width:26px;height:26px;display:grid;place-items:center;padding:0;transition:color .2s,border-color .2s}
|
| 115 |
+
#pop .ph button:hover{color:var(--gold);border-color:var(--line2)}
|
| 116 |
+
#pop .pb{padding:12px 14px;animation:fadein .5s .1s var(--ease) backwards}
|
| 117 |
+
@keyframes fadein{from{opacity:0;transform:translateY(4px)}}
|
| 118 |
+
#pop .pf{display:flex;justify-content:space-between;padding:6px 14px 8px;border-top:1px solid rgba(242,201,76,.12);font-size:8.5px;letter-spacing:.2em;color:var(--mut)}
|
| 119 |
+
#pop .pf span:last-child{color:var(--r-cy)}
|
| 120 |
+
#pop input,#pop textarea{width:100%;background:rgba(0,0,0,.55);border:1px solid rgba(242,201,76,.2);color:var(--txt);font:inherit;padding:6px 8px;outline:none;transition:border-color .2s}
|
| 121 |
+
#pop input:focus,#pop textarea:focus{border-color:var(--gold)}
|
| 122 |
+
#pop input[type=range]{padding:0;border:0;background:none}
|
| 123 |
+
#pop .row{display:flex;gap:6px;align-items:center;margin-top:8px;flex-wrap:wrap}
|
| 124 |
+
#pop .btn{background:linear-gradient(180deg,#f7d871,var(--gold2));color:#000;border:0;padding:6px 12px;font-weight:700;font-size:10.5px;letter-spacing:.08em;transition:filter .2s,transform .1s}
|
| 125 |
+
#pop .btn:hover{filter:brightness(1.12)}#pop .btn:active{transform:translateY(1px)}
|
| 126 |
+
#pop .btn.alt{background:transparent;color:var(--gold);border:1px solid var(--line2)}
|
| 127 |
+
#pop .btn.alt:hover{background:rgba(242,201,76,.1)}
|
| 128 |
+
#pop canvas{width:100%;display:block;background:#000;border:1px solid rgba(242,201,76,.2);touch-action:none}
|
| 129 |
+
.chat{height:120px;overflow:auto;background:rgba(0,0,0,.55);border:1px solid rgba(242,201,76,.2);padding:8px;margin-bottom:6px}
|
| 130 |
+
.chat p{margin:0 0 6px;line-height:1.45}.chat .u{color:var(--r-acc)}.chat .a{color:var(--txt)}
|
| 131 |
+
.prog{height:4px;background:rgba(255,255,255,.06)}.prog i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--gold2),var(--gold));box-shadow:0 0 8px var(--gold);transition:width .2s}
|
| 132 |
+
.track{position:relative;height:18px;background:#000;border:1px solid #222;margin-top:3px}
|
| 133 |
+
.clip{position:absolute;top:1px;bottom:1px;cursor:grab;font-size:9px;color:#000;padding-left:3px;overflow:hidden}
|
| 134 |
+
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}
|
| 135 |
+
.grid div{aspect-ratio:1;border:1px solid rgba(242,201,76,.25);display:flex;align-items:flex-end;padding:3px;font-size:9px;cursor:pointer;transition:border-color .2s}
|
| 136 |
+
.grid div:hover{border-color:var(--gold)}
|
| 137 |
+
.code{background:rgba(0,0,0,.6);border:1px solid rgba(242,201,76,.2);padding:8px;font-size:11px;min-height:70px;white-space:pre;overflow:auto;color:var(--r-cy)}
|
| 138 |
+
.k{color:var(--r-red)}.s{color:var(--gold)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
input[type=range]{accent-color:var(--gold);flex:1}
|
| 140 |
+
#hint{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);z-index:15;font-size:9.5px;letter-spacing:.14em;color:var(--mut);white-space:nowrap;display:flex;gap:6px;align-items:center}
|
| 141 |
+
#hint[hidden]{display:none}
|
| 142 |
+
kbd{font:inherit;font-size:9px;color:var(--gold);border:1px solid var(--line);padding:2px 5px;background:rgba(0,0,0,.5)}
|
| 143 |
#bmc{position:fixed;right:14px;bottom:12px;z-index:60;background:#FFDD00;color:#000;font:700 13px/1 system-ui,sans-serif;padding:10px 14px;border-radius:8px;text-decoration:none;box-shadow:0 2px 10px rgba(0,0,0,.5)}
|
| 144 |
+
@media (min-width:1500px){.brand em{display:block}}
|
| 145 |
+
@media (max-width:1120px){#hint{display:none!important}}
|
| 146 |
+
@media (max-width:1000px){#cats{justify-content:flex-start}}
|
| 147 |
@media (max-width:700px){
|
| 148 |
+
#hud{height:auto;flex-wrap:wrap;padding:8px 12px 0;gap:8px}.brand span{display:none}#cats{order:3;flex-basis:100%;margin:0 -12px;padding:0 6px}
|
| 149 |
+
#cats{flex-wrap:wrap;justify-content:center;overflow:visible;gap:0 1px}
|
| 150 |
+
#cats button{padding:8px 5px 7px;font-size:9px;letter-spacing:.06em}
|
| 151 |
+
#frame,#mm{display:none!important}
|
| 152 |
+
#core-stats{left:10px;bottom:62px;width:150px;font-size:9.5px;padding:8px 10px}
|
| 153 |
+
#core-stats p,#core-stats .bar{display:none}
|
| 154 |
+
#pop{left:3vw!important;right:3vw;width:auto;bottom:62px;top:auto!important;max-height:62vh;overflow:auto}
|
| 155 |
+
.lbl{font-size:9.5px;padding:4px 7px}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
}
|
| 157 |
|
| 158 |
+
/* r1: modern type + 3D interaction polish */
|
| 159 |
+
#fps,#core-stats dd{font-family:JBM,monospace}
|
| 160 |
+
.lbl{font-size:12px;letter-spacing:.04em;border-radius:8px;transition:background .25s,border-color .25s,color .25s,opacity .3s,box-shadow .3s}
|
| 161 |
+
.lbl.sel::before{border-radius:8px 0 0 8px}
|
| 162 |
+
#cats button{font-size:12px;letter-spacing:.08em;border-radius:0}
|
| 163 |
+
.brand b{font-weight:700}
|
| 164 |
+
#pop{border-radius:4px}
|
| 165 |
+
#pop .pt b{letter-spacing:.12em}
|
| 166 |
+
#core-stats{font-size:11.5px}
|
| 167 |
+
#gl{touch-action:none}
|
| 168 |
+
#nodeTip{position:fixed;left:0;top:0;z-index:13;pointer-events:none;padding:6px 10px;border-radius:8px;background:rgba(20,16,6,.85);backdrop-filter:blur(8px);
|
| 169 |
+
box-shadow:inset 0 0 0 1px rgba(242,201,76,.45);font-size:11px;color:var(--txt);opacity:0;transform:translateX(-8px);transition:opacity .25s,transform .4s var(--ease);white-space:nowrap}
|
| 170 |
+
#nodeTip.on{opacity:1}
|