2Btainment commited on
Commit
ea3bb5f
·
verified ·
1 Parent(s): 39bb0bd

combo8: tighter hive fit + opaque action bar

Browse files
einswarm-de/reise/bauplan-hive.src.js CHANGED
@@ -250,39 +250,40 @@ function honeyWall(z, cols, rows, skip) {
250
  const n = new Group(), lines = pulseLines(pairs); n.add(lines, randomNet(new Vector3(0, 0, -26), new Vector3(110, 70, 40), lite ? 40 : 90, 3, 20, lines.material.uniforms.uOp)); n.userData.op = lines.material.uniforms.uOp;
251
  net = n; root.add(net);
252
  wall = honeyWall(-5, lite ? 5 : 7, lite ? 4 : 5, items.map(it => it.pos)); root.add(wall);
253
- ext = { w: 3 * RS + R + 1.5, h: 2 * HH + R * .87 + .8 }; buildT = 0; pose();
254
  }
255
  function fit(halfW, halfH, nx, ny, minD, rx, ry) {
256
  const a = camera.aspect, d = Math.max(minD, halfW / (TAN * a * rx), halfH / (TAN * ry));
257
  return { d, ox: -nx * d * TAN * a, oy: -ny * d * TAN };
258
  }
259
  const rig = { p: new Vector3(0, 0, 60), l: new Vector3() };
260
- function pose() {
261
  const wide = innerWidth >= 1000 && camera.aspect > 1.15;
262
  let f;
263
- /* Etwas Luft um die Wabe – nie am Bildrand abschneiden */
264
- const ew = ext.w * 1.1, eh = ext.h * 1.08;
265
  if (wide) {
266
  const card = getCard(), cl = card?.getBoundingClientRect?.() || { right: innerWidth * .36 };
267
- const pad = 32;
268
- /* Freizone rechts neben der Tafel, Wabe mittig darin */
269
- const leftPx = Math.min(Math.max((cl.right || innerWidth * .36) + pad, innerWidth * .32), innerWidth * .48);
270
  const rightPx = innerWidth - pad;
271
  const midNdc = ((leftPx + rightPx) / 2) / innerWidth * 2 - 1;
272
- const freeFrac = Math.max(0.28, (rightPx - leftPx) / innerWidth);
273
- const rx = Math.min(0.5, freeFrac * 0.9);
274
- f = fit(ew, eh, midNdc, 0, 34, rx, 0.78);
 
275
  } else {
276
  const H = innerHeight, top = 72;
277
  const card = getCard(), cl = card?.getBoundingClientRect?.();
278
- const bottom = cl?.top > 80 ? cl.top - 16 : H * 0.5;
279
  const a = 1 - 2 * top / H, b = 1 - 2 * Math.max(top + 60, bottom) / H;
280
  const ny = (a + b) / 2;
281
- const ry = Math.max(0.16, Math.min(0.42, (a - b) / 2 * 0.92));
282
- f = fit(ew, eh, 0, ny, 30, 0.9, ry);
283
  }
284
  const look = new Vector3(f.ox, f.oy, 0);
285
- rig.p.copy(look).add(new Vector3(0, .35, f.d)); rig.l.copy(look);
 
286
  }
287
  let composer = null, bloom = null;
288
  if (!lite) {
@@ -306,7 +307,7 @@ function honeyWall(z, cols, rows, skip) {
306
  if (w < 2 || h < 2) return;
307
  camera.aspect = w / h; camera.updateProjectionMatrix();
308
  renderer.setSize(w, h, false); composer?.setSize(w, h); bloom?.resolution.set(w, h);
309
- fitBackdrops(); pose();
310
  }
311
  let raf = 0, running = false, last = 0, tAcc = 0;
312
  function frame(now) {
@@ -328,5 +329,5 @@ function honeyWall(z, cols, rows, skip) {
328
  function start() { if (running) return; running = true; last = 0; resize(); raf = requestAnimationFrame(frame); }
329
  function stop() { running = false; cancelAnimationFrame(raf); }
330
  addEventListener("resize", resize);
331
- return { setPlan, start, stop, resize, rebuild: () => { buildT = 0; pose(); } };
332
  }
 
250
  const n = new Group(), lines = pulseLines(pairs); n.add(lines, randomNet(new Vector3(0, 0, -26), new Vector3(110, 70, 40), lite ? 40 : 90, 3, 20, lines.material.uniforms.uOp)); n.userData.op = lines.material.uniforms.uOp;
251
  net = n; root.add(net);
252
  wall = honeyWall(-5, lite ? 5 : 7, lite ? 4 : 5, items.map(it => it.pos)); root.add(wall);
253
+ ext = { w: 3 * RS + R + 1.5, h: 2 * HH + R * .87 + .8 }; buildT = 0; pose({ snap: true });
254
  }
255
  function fit(halfW, halfH, nx, ny, minD, rx, ry) {
256
  const a = camera.aspect, d = Math.max(minD, halfW / (TAN * a * rx), halfH / (TAN * ry));
257
  return { d, ox: -nx * d * TAN * a, oy: -ny * d * TAN };
258
  }
259
  const rig = { p: new Vector3(0, 0, 60), l: new Vector3() };
260
+ function pose({ snap = false } = {}) {
261
  const wide = innerWidth >= 1000 && camera.aspect > 1.15;
262
  let f;
263
+ /* Luft um die komplette Wabe inkl. Glow – Freizone rechts der Tafel */
264
+ const ew = ext.w * 1.18, eh = ext.h * 1.14;
265
  if (wide) {
266
  const card = getCard(), cl = card?.getBoundingClientRect?.() || { right: innerWidth * .36 };
267
+ const pad = 56;
268
+ const leftPx = Math.min(Math.max((cl.right || innerWidth * .36) + 40, innerWidth * .34), innerWidth * .46);
 
269
  const rightPx = innerWidth - pad;
270
  const midNdc = ((leftPx + rightPx) / 2) / innerWidth * 2 - 1;
271
+ const freeFrac = Math.max(0.3, (rightPx - leftPx) / innerWidth);
272
+ /* rx = Anteil der Halb-FOV; kleiner = weiter weg, alles sichtbar */
273
+ const rx = Math.min(0.42, freeFrac * 0.78);
274
+ f = fit(ew, eh, midNdc, 0, 38, rx, 0.72);
275
  } else {
276
  const H = innerHeight, top = 72;
277
  const card = getCard(), cl = card?.getBoundingClientRect?.();
278
+ const bottom = cl?.top > 80 ? cl.top - 20 : H * 0.48;
279
  const a = 1 - 2 * top / H, b = 1 - 2 * Math.max(top + 60, bottom) / H;
280
  const ny = (a + b) / 2;
281
+ const ry = Math.max(0.14, Math.min(0.38, (a - b) / 2 * 0.85));
282
+ f = fit(ew, eh, 0, ny, 34, 0.84, ry);
283
  }
284
  const look = new Vector3(f.ox, f.oy, 0);
285
+ rig.p.copy(look).add(new Vector3(0, .3, f.d)); rig.l.copy(look);
286
+ if (snap) { camera.position.copy(rig.p); camera.lookAt(rig.l); }
287
  }
288
  let composer = null, bloom = null;
289
  if (!lite) {
 
307
  if (w < 2 || h < 2) return;
308
  camera.aspect = w / h; camera.updateProjectionMatrix();
309
  renderer.setSize(w, h, false); composer?.setSize(w, h); bloom?.resolution.set(w, h);
310
+ fitBackdrops(); pose({ snap: true });
311
  }
312
  let raf = 0, running = false, last = 0, tAcc = 0;
313
  function frame(now) {
 
329
  function start() { if (running) return; running = true; last = 0; resize(); raf = requestAnimationFrame(frame); }
330
  function stop() { running = false; cancelAnimationFrame(raf); }
331
  addEventListener("resize", resize);
332
+ return { setPlan, start, stop, resize, rebuild: () => { buildT = 0; pose({ snap: true }); } };
333
  }
einswarm-de/reise/reise.css CHANGED
@@ -32,12 +32,13 @@
32
  .fd-suffix{display:block;margin-top:.15rem;font:600 .82rem/1.3 var(--es-font-ui);letter-spacing:.14em;text-transform:uppercase;color:var(--es-gold-light);-webkit-text-fill-color:var(--es-gold-light);filter:none}
33
  .adv[data-kind="agent"] .rb,
34
  .adv[data-kind="agent"] .fd-plan{position:relative;padding-bottom:.25rem}
35
- .adv[data-kind="agent"] .fd-actions-spacer{height:6.5rem;flex:none;pointer-events:none}
36
  .adv[data-kind="agent"] .adv-card__actions{
37
  position:sticky;bottom:0;z-index:6;display:grid;grid-template-columns:1fr 1fr;gap:.5rem;
38
  margin:0 -1.5rem -1.2rem;padding:1.15rem 1.5rem 1.05rem;
39
- background:linear-gradient(180deg,rgba(16,14,10,0) 0%,rgba(16,14,10,.92) 28%,rgba(16,14,10,.98) 55%,rgba(16,14,10,.99) 100%);
40
- border-top:1px solid rgba(232,199,102,.12)
 
41
  }
42
  .adv[data-kind="agent"] .adv-card__actions .adv-btn{justify-content:center;min-height:2.5rem;padding-inline:.7rem;font-size:.88rem}
43
  .adv[data-kind="agent"] .rb__more{position:relative;z-index:1;margin-bottom:.35rem}
 
32
  .fd-suffix{display:block;margin-top:.15rem;font:600 .82rem/1.3 var(--es-font-ui);letter-spacing:.14em;text-transform:uppercase;color:var(--es-gold-light);-webkit-text-fill-color:var(--es-gold-light);filter:none}
33
  .adv[data-kind="agent"] .rb,
34
  .adv[data-kind="agent"] .fd-plan{position:relative;padding-bottom:.25rem}
35
+ .adv[data-kind="agent"] .fd-actions-spacer{height:7.5rem;flex:none;pointer-events:none}
36
  .adv[data-kind="agent"] .adv-card__actions{
37
  position:sticky;bottom:0;z-index:6;display:grid;grid-template-columns:1fr 1fr;gap:.5rem;
38
  margin:0 -1.5rem -1.2rem;padding:1.15rem 1.5rem 1.05rem;
39
+ background:#100e0a;
40
+ box-shadow:0 -28px 32px 8px rgba(16,14,10,.97);
41
+ border-top:1px solid rgba(232,199,102,.14)
42
  }
43
  .adv[data-kind="agent"] .adv-card__actions .adv-btn{justify-content:center;min-height:2.5rem;padding-inline:.7rem;font-size:.88rem}
44
  .adv[data-kind="agent"] .rb__more{position:relative;z-index:1;margin-bottom:.35rem}
einswarm-de/reise/reise.js CHANGED
The diff for this file is too large to render. See raw diff