Skip to content

Commit d40d244

Browse files
committed
Publish corridor How we work and smoother dominoes (tested on staging)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BTcXkEfGquEU2NFoQGqm9b
2 parents 916ae76 + 98f0fff commit d40d244

4 files changed

Lines changed: 27 additions & 20 deletions

File tree

‎src/components/home/Corridor.astro‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// "How we work" as a corridor: scroll walks the camera through four lit gates and out into the light.
33
// Preview only for now (/preview-process). three.js loads when the section gets near the viewport.
44
---
5-
<section class="cor" id="cor" aria-labelledby="cor-h">
5+
<section class="cor" id="process" aria-labelledby="cor-h">
66
<div class="stick" id="stick">
77
<div class="head" id="head"><div class="in">
88
<span class="eb">How we work</span>
@@ -12,12 +12,11 @@
1212
<div class="cap" id="cap"><span class="k" id="capK">1 / 4</span><h3 id="capH">Free audit</h3><p id="capP">We watch real sessions and find exactly where people get stuck.</p></div>
1313
<div class="dots" id="dots" aria-hidden="true"><i class="on"></i><i></i><i></i><i></i></div>
1414
</div></div>
15-
<div class="fade" id="fade"></div>
1615
</div>
1716
</section>
1817

1918
<style>
20-
.cor { position: relative; height: 520vh; background: #0d0d0c; color: #f2f2f0; }
19+
.cor { position: relative; height: 400vh; background: #0d0d0c; color: #f2f2f0; }
2120
.stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
2221
.stick :global(canvas) { display: block; width: 100%; height: 100%; }
2322
.head { position: absolute; left: 0; right: 0; top: 0; padding-top: 88px; z-index: 2; pointer-events: none; }
@@ -36,9 +35,8 @@
3635
.dots { display: flex; gap: 8px; align-items: center; }
3736
.dots i { display: block; width: 28px; height: 2px; background: #3a3a37; transition: background .3s, width .3s; }
3837
.dots i.on { background: #f2f2f0; width: 44px; }
39-
.fade { position: absolute; inset: 0; background: #fff; opacity: 0; z-index: 3; pointer-events: none; }
4038
@media (max-width: 760px) {
41-
.cor { height: 560vh; }
39+
.cor { height: 440vh; }
4240
.head { padding-top: 72px; }
4341
h2 { font-size: 34px; }
4442
.step { padding-bottom: 104px; }
@@ -50,7 +48,7 @@
5048

5149
<script>
5250
// @ts-nocheck
53-
const sec = document.getElementById('cor');
51+
const sec = document.getElementById("process");
5452
if (sec) {
5553
const io = new IntersectionObserver((es) => {
5654
if (!es.some((e) => e.isIntersecting)) return;
@@ -67,7 +65,7 @@ const STEPS=[
6765
['Every screen, every state','Empty, loading, error and full. All designed, nothing left to guess.'],
6866
['Shipped','One clean handoff, and we stay on until it is live.']
6967
];
70-
const stick=document.getElementById('stick'),sec=document.getElementById('cor'),cap=document.getElementById('cap'),capK=document.getElementById('capK'),capH=document.getElementById('capH'),capP=document.getElementById('capP'),dots=[...document.querySelectorAll('#dots i')],fade=document.getElementById('fade'),head=document.getElementById('head');
68+
const stick=document.getElementById('stick'),sec=document.getElementById("process"),cap=document.getElementById('cap'),capK=document.getElementById('capK'),capH=document.getElementById('capH'),capP=document.getElementById('capP'),dots=[...document.querySelectorAll('#dots i')],head=document.getElementById('head');
7169
function hasGL(){try{const c=document.createElement('canvas');return !!(c.getContext('webgl')||c.getContext('experimental-webgl'))}catch(e){return false}}
7270
if(!hasGL()){stick.insertAdjacentHTML('beforeend','<div class="fallback">This preview needs WebGL.</div>');return}
7371
try{await document.fonts.load('400 200px Newsreader')}catch(e){}
@@ -124,17 +122,18 @@ function prog(){const rc=sec.getBoundingClientRect();return Math.min(1,Math.max(
124122
function setStep(k){if(k===cur)return;cur=k;cap.classList.add('out');setTimeout(()=>{capK.textContent=(k+1)+' / 4';capH.textContent=STEPS[k][0];capP.textContent=STEPS[k][1];cap.classList.remove('out')},RM?0:220);dots.forEach((d,i)=>d.classList.toggle('on',i===k))}
125123
function draw(){
126124
// Camera path: from in front of gate 1, through each gate, into the light.
127-
const startZ=narrow?19:15,stopZ=endZ+1.2;
125+
const startZ=narrow?19:15,stopZ=endZ+13;
128126
const P=RM?Math.min(p,.9):p;
129-
const travel=ss(0,.92,P);
127+
const travel=ss(0,.97,P);
130128
const z=startZ+(stopZ-startZ)*travel;
131129
smx+=(mx-smx)*.06;smy+=(my-smy)*.06;
132130
const sway=Math.sin(z*.35)*.25;
133131
cam.position.set(sway+smx*.35,2.9-smy*.18,z);
134132
cam.lookAt(sway*.4+smx*.8,2.9-smy*.3,z-10);
135133
cam.rotation.z+=Math.sin(z*.22)*.015;
136134
// Which step are we on: nearest gate ahead or just passed.
137-
let k=0;gates.forEach((g,i)=>{if(z<g.z-.5)k=i+1});
135+
// Even quarters of the scroll, so every step gets the same time on screen.
136+
let k=Math.floor(travel*4);
138137
setStep(Math.min(N-1,k));
139138
gates.forEach((g,i)=>{
140139
const dist=z-g.z; // >0 gate ahead, <0 passed
@@ -147,7 +146,7 @@ function draw(){
147146
g.a.nm.material.opacity=.1+e*.5;
148147
g.light.intensity=e*.9;
149148
});
150-
const out=ss(.86,1,P);fade.style.opacity=out.toFixed(3);
149+
151150
head.style.opacity=(1-ss(.02,.12,P)).toFixed(3);
152151
endGlow.intensity=.8+travel*1.6;endWall.scale.setScalar(1);
153152
r.render(scene,cam);

‎src/components/home/Standing.astro‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
function boot(THREE: typeof import('three'), el: HTMLElement, RM: boolean) {
6262
try { const c = document.createElement('canvas'); if (!(c.getContext('webgl2') || c.getContext('webgl'))) return; } catch { return; }
63-
const HALF = Math.PI / 2, S = 1.15, H = 2.2, T = 0.36, W = 1.1, K = 22;
63+
const HALF = Math.PI / 2, S = 1.15, H = 2.2, T = 0.36, W = 1.1, K = 13;
6464
const LAY: Record<number, number[][]> = { 0: [], 1: [[0, 0]], 2: [[-1, 1], [1, -1]], 3: [[-1, 1], [0, 0], [1, -1]], 4: [[-1, -1], [-1, 1], [1, -1], [1, 1]], 5: [[-1, -1], [-1, 1], [0, 0], [1, -1], [1, 1]], 6: [[-1, -1], [-1, 0], [-1, 1], [1, -1], [1, 0], [1, 1]] };
6565
const SEEDS = [13, 40, 22, 5, 33, 47, 9, 26, 38, 16, 44, 3, 29, 11, 46, 20, 35, 8, 24, 41, 2, 31, 18, 45, 6, 27, 37, 14, 43, 0, 32];
6666
const boxGeo = new THREE.BoxGeometry(T, H, W), edgeGeo = new THREE.EdgesGeometry(boxGeo);
@@ -105,7 +105,7 @@
105105
} else {
106106
if (lim(d, n, HALF) < d.a) n.a = HALF;
107107
else { let lo = n.a, hi = HALF; for (let k = 0; k < 24; k++) { const m = (lo + hi) / 2; if (lim(d, n, m) >= d.a) hi = m; else lo = m; } n.a = Math.max(n.a, hi); }
108-
n.w = Math.max(n.w, d.w * 0.88); d.w = Math.min(d.w, n.w);
108+
n.w = Math.max(n.w, d.w * 0.8); d.w = Math.min(d.w, n.w);
109109
d.a = Math.min(d.a, lim(d, n, n.a));
110110
}
111111
}
@@ -211,7 +211,7 @@
211211
function play() {
212212
reset(); started = true;
213213
if (RM) { finish(); r.render(scene, cam); btn.hidden = true; return; }
214-
clearTimeout(kickT); kickT = window.setTimeout(() => { ds[0].a = 0.09; ds[0].w = 1.1; running = true; }, 350);
214+
clearTimeout(kickT); kickT = window.setTimeout(() => { ds[0].a = 0.05; ds[0].w = 0.55; running = true; }, 700);
215215
window.setTimeout(() => { btn.hidden = false; }, 4000);
216216
}
217217
btn.addEventListener('click', play);
@@ -220,8 +220,9 @@
220220
new ResizeObserver(() => { fit(); r.render(scene, cam); }).observe(el);
221221
new IntersectionObserver((es) => es.forEach((e) => {
222222
visible = e.isIntersecting;
223-
if (e.isIntersecting && e.intersectionRatio >= 0.4 && !started) play();
224-
}), { threshold: [0, 0.4] }).observe(el);
223+
// Start only once the scene is well inside the screen, not while it is still peeking in.
224+
if (e.isIntersecting && e.intersectionRatio >= 0.75 && !started) play();
225+
}), { threshold: [0, 0.75] }).observe(el);
225226

226227
let last = performance.now();
227228
const loop = (now: number) => {

‎src/pages/index.astro‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Work from '../components/home/Work.astro';
1313
import Apps from '../components/home/Apps.astro';
1414
import Services from '../components/home/Services.astro';
1515
import Audience from '../components/home/Audience.astro';
16-
import Process from '../components/home/Process.astro';
16+
import Corridor from '../components/home/Corridor.astro';
1717
import Proof from '../components/home/Proof.astro';
1818
import Pricing from '../components/home/Pricing.astro';
1919
import Working from '../components/home/Working.astro';
@@ -58,9 +58,7 @@ const schema = faqLd.length ? [{ '@context': 'https://schema.org', '@type': 'FAQ
5858
<Proof videos={videos} reviews={reviews} />
5959
<Step />
6060
<Services short />
61-
<Step />
62-
<Process />
63-
<Step />
61+
<Corridor />
6462
<Pricing variant="c" />
6563
<Step />
6664
{hasNotes && <><Notes /><Step /></>}

‎wrangler.jsonc‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,14 @@
2020
"FORM_FROM": "Fackt site <forms@fackt.io>",
2121
// Lets the worker log crawler visits to Supabase (the "crawl" function checks it against journey_config.crawl_key).
2222
"CRAWL_KEY": "bfdc7682bf11afebe91f7efc0d8e6a8ff75f"
23+
},
24+
// Branch previews (staging): same public settings, forms marked as staging.
25+
"previews": {
26+
"vars": {
27+
"GITHUB_CLIENT_ID": "Ov23liYHGDrgubuGRqqS",
28+
"FORM_TO": "dominik@fackt.io",
29+
"FORM_FROM": "Fackt staging <forms@fackt.io>",
30+
"CRAWL_KEY": "bfdc7682bf11afebe91f7efc0d8e6a8ff75f"
31+
}
2332
}
2433
}

0 commit comments

Comments
 (0)