Deck.transition('tear',{dur:1.4,frag:`void main(){ if(p<=0.){o=texture(tA,vUv);return;} if(p>=1.){o=texture(tB,vUv);return;} float edge=.5+.026*(vnoise(vec2(vUv.y*17.,3.))-.5)+.009*(vnoise(vec2(vUv.y*90.,8.))-.5); float side=sign(vUv.x-edge), gap=p*p*.56; float dist=abs(vUv.x-edge)-gap; vec2 uv=vUv-vec2(side*gap,side*.023*p*(1.-vUv.y)); vec3 paper=texture(tA,clamp(uv,0.,1.)).rgb; paper=mix(vec3(.95,.91,.81),paper,smoothstep(0.,.005+p*.006,dist)); vec3 bg=texture(tB,vUv).rgb*(1.-.32*p*exp(-abs(dist)*48.)); o=vec4(mix(bg,paper,smoothstep(-.001,.001,dist)),1.); }`}); Deck.scene({ id:'futures',title:'Two aims',enterWith:'tear', post:{tone:'none',grain:.016}, beats:[{dur:3,hold:5},{dur:4.4,hold:5},{dur:5,hold:6}], notes:['Same bay, same power. Both of these were built by the same superintelligence. On the left its aim was slightly off. On the right it was true. You can drag the line.','On the tenth of November 2026 the AI Futures Project, the people who wrote these forecasts, asked for a pause.','It is not decided yet. Hold on this one. You can drag the other world back in if someone asks.'], setup(d){ let seed=8834;const rnd=()=>((seed=(Math.imul(seed,1664525)+1013904223)>>>0)/4294967296); const limbs=[],leaves=[],grass=[],homes=[]; function branch(x,y,len,a,w,n){ let ex=x+len*Math.cos(a),ey=y+len*Math.sin(a),bend=(rnd()-.5)*len*.52; limbs.push([x,y,(x+ex)*.5+bend,(y+ey)*.5,ex,ey,w]); if(n<=2)for(let j=0;j<6;j++)leaves.push([ex+(rnd()-.5)*48,ey+(rnd()-.5)*39,11+rnd()*20,7+rnd()*11,rnd()*2-1,Math.floor(rnd()*4)]); if(n){branch(ex,ey,len*(.69+rnd()*.13),a-.24-rnd()*.59,w*.65,n-1);branch(ex,ey,len*(.64+rnd()*.22),a+.25+rnd()*.64,w*.68,n-1);} } branch(1060,880,108,-1.67,40,6);branch(1062,854,103,-1.04,28,5); for(let i=0;i<1450;i++)grass.push([rnd()*2180-130,rnd(),rnd(),rnd()]); for(let i=0;i<96;i++){let x=rnd()*650-40;homes.push([x,573+Math.sin(x*.009)*15+rnd()*31-60*Math.exp(-((x-315)**2)/17000),7+rnd()*12,rnd()]);} homes.sort((a,b)=>a[1]-b[1]); return {limbs,leaves,grass,homes,cols:['#294c3e','#406345','#637b46','#8e964f'],bg:d.pass(` uniform float uLine,uOpen,uDrift; float field(vec2 q){return 843.+54.*sin(q.x*.0036)+24.*sin(q.x*.007+1.);} void main(){ vec2 q=design(vUv);float cold=1.-step(uLine,q.x);q.x+=uDrift; float x=q.x,y=q.y,t=uTime; vec3 sky=mix(vec3(.27,.56,.65),vec3(.99,.82,.60),smoothstep(-120.,565.,y)); float cl=fbm(vec2(x*.0024-t*.009,y*.009))+ .13*sin(x*.003+y*.015); sky=mix(sky,vec3(.99,.91,.76),smoothstep(.48,.73,cl)*.84); vec3 c=mix(sky,mix(vec3(.66,.72,.74),vec3(.96,.95,.90),sat(y/570.)),cold); vec2 solar=q-vec2(796.,336.);float sun=length(solar); c=mix(c,vec3(1.,.94,.76),.33*exp(-sun*.013)+.63*(1.-smoothstep(53.,55.,sun))); vec2 cell=fract((q+vec2(t*3.,0.))/vec2(54.,30.)); float grid=max(1.-smoothstep(0.,.03,cell.x),1.-smoothstep(0.,.055,cell.y)); c=mix(c,vec3(.55,.62,.65),cold*grid*(.08+.43*(1.-smoothstep(53.,55.,sun)))); float xx=mix(x,floor(x/25.)*25.,cold); for(int i=0;i<3;i++){float j=float(i); float h=401.+j*72.+52.*sin(xx*.0031+j*3.)+23.*sin(xx*.009+j)+22.*vnoise(vec2(xx*.019,j)); vec3 m=mix(vec3(.50,.62,.66),vec3(.26,.43,.40),j*.44); m+=.042*sin(xx*.008+j)*smoothstep(h,h+22.,y); c=mix(c,mix(m,vec3(.82-j*.058,.84-j*.058,.84-j*.055),cold),smoothstep(h-1.,h+1.,y)); } float coast=598.+17.*sin(xx*.005)+10.*sin(xx*.015); if(y>coast){float z=max(1.,y-575.), depth=sat(z/320.); float ripple=vnoise(vec2(x/(4.+z*.045),y/(1.+z*.009)+t*.52)); vec3 sea=mix(vec3(.52,.73,.72),vec3(.075,.46,.50),depth); sea+=vec3(.45,.36,.20)*exp(-abs(x-796.)/(55.+z*.64))*smoothstep(.53,.86,ripple); sea+=.085*(ripple-.4); vec2 g=vec2((x-960.)/(z*.21+2.),1500./(z+6.)); vec2 f=fract(g);float seam=max(1.-smoothstep(0.,.046,f.x),1.-smoothstep(0.,.12,f.y)); vec3 tile=vec3(.83,.86,.86)+.072*(hash12(floor(g))-.5)-.15*seam; c=mix(sea,tile,cold); } float h=field(vec2(xx,y)); if(y>h){float tex=fbm(q*vec2(.011,.044));float dip=sat((y-h)/245.); vec3 land=mix(vec3(.59,.59,.29),vec3(.29,.37,.20),dip)+vec3(.26,.21,.10)*(tex-.45); vec2 g=vec2(x/(32.+dip*64.),(y-h)/(14.+dip*8.)); vec2 f=fract(g+vec2(floor(g.y)*.5,0.))-.5; float stone=1.-smoothstep(-.04,.02,sdBox(f,vec2(.35,.26))); c=mix(land,vec3(.74,.76,.75)+stone*(.14+.06*f.y)-.04*dip,cold); } c+=.011*(hash12(floor(q))-.5)+uOpen*vec3(.026,.016,.0); o=vec4(c,1.); }`,'two editions of the bay')}; }, draw(s,d,r){ const c=d.ctx2d,V=d.view,K=(i,a,b)=>s.k(i,a,b),b=K(1,0,4.4),open=K(2,0,5),t=s.t; const line=(960+432*b+30*Math.sin(t*.24)+44*s.mouse.x)*(1-open)+(V.x0-18)*open, shift=3*s.mouse.x; r.bg.draw({uLine:line,uOpen:open,uDrift:shift}); function poly(col,...p){c.fillStyle=col;c.beginPath();c.moveTo(p[0],p[1]);for(let i=2;i.4?'#b96e49':'#916b58',x-2,y-w,x+w*.46,y-w-6,x+w+2,y-w);c.fillStyle='#657273';c.fillRect(x+w*.45,y-w*.65,2,4);} } if(!ice){ for(let i=0;i<7;i++){let x=276+i*221+Math.sin(t*.11+i)*5,y=655+(i%3)*32,w=i===4?38:15+i%3*3; stroke('#666952',1.6,x,y,x,y-w*1.6);poly('#fff1cf',x-2,y-w*1.5,x-2,y-4,x-w*.69,y-3); poly('#e9d7af',x+2,y-w*1.23,x+w*.58,y-4,x+2,y-5);poly('#705846',x-w*.86,y,x+w*.85,y,x+w*.58,y+5,x-w*.55,y+5); } for(let i=0;i<16;i++){let x=1310+i*19+13*Math.sin(t*.23),y=382+Math.abs(i-6)*4+Math.sin(i*7)*12; c.beginPath();c.moveTo(x-6,y-2);c.quadraticCurveTo(x-2,y-3,x,y+1);c.quadraticCurveTo(x+4,y-4-Math.sin(t*2+i)*2,x+7,y-3);c.strokeStyle='#617675';c.lineWidth=1.8;c.stroke();} } if(ice){poly('rgba(218,236,237,.25)',799,432,1268,432,1268,892,799,892);poly('rgba(237,244,242,.28)',1268,432,1301,413,1301,868,1268,892);} c.save();c.translate(1060,880);c.transform(1,0,(ice?0:.008+.008*open)*Math.sin(t*.8),1,0,0);c.translate(-1060,-880); c.lineCap='round'; for(const [x,y,cx,cy,ex,ey,w] of r.limbs){ c.beginPath();c.moveTo(x,y);c.quadraticCurveTo(cx,cy,ex,ey);c.lineWidth=w;c.strokeStyle=ice?'#a1adab':'#594e3c';c.stroke(); c.beginPath();c.moveTo(x-w*.24,y);c.quadraticCurveTo(cx-w*.21,cy,ex-w*.2,ey);c.lineWidth=w*.29;c.strokeStyle=ice?'#f0f2eb':'#a1936d';c.stroke(); } if(!ice)for(const [x,y,w,h,a,k] of r.leaves){c.beginPath();c.ellipse(x,y,w,h,a,0,Math.PI*2);c.fillStyle=r.cols[k];c.fill();} c.restore(); if(ice){c.strokeStyle='#fafcf6';c.lineWidth=3;c.strokeRect(799,432,469,460);stroke('#bac6c5',2,799,432,832,413);stroke('#f2f6ef',3,832,413,1301,413);stroke('#fff',2,1301,413,1268,432);} else{ for(let i=0;i<4;i++){let x=1138+i*13,y=853+Math.sin(i*8)*4; stroke('#474c41',3,x-2,y+12,x,y+3);stroke('#474c41',3,x+3,y+12,x,y+2);stroke(i%2?'#c07649':'#d6c3a1',5,x,y+3,x,y-5); c.fillStyle='#83694e';c.beginPath();c.arc(x,y-10,3,0,7);c.fill();} c.lineWidth=1.8;c.beginPath(); for(const [x,a,k,j] of r.grass){let h=843+54*Math.sin(x*.0036)+24*Math.sin(x*.007+1),y=h+a*(1090-h),w=3+a*11; c.moveTo(x,y);c.lineTo(x+w*(.5+(.3+open*.5)*Math.sin(t*1.3+x*.016)),y-w*(.5+k));} c.strokeStyle='#8d9457';c.stroke(); for(let i=0;i.65?'#ca7956':'#e8cc81';c.beginPath();c.ellipse(x+3,y-7,1.6+a*2,1.5+a,-.45,0,7);c.fill();} } c.restore(); } if(line>=V.x0){d.rect(line-2,V.y0,4,V.h,'#3984ef');for(let i=0;i<3;i++){c.beginPath();c.arc(line,540+(i-1)*291,i===1?14:8,0,7);c.fillStyle='#fafcfe';c.fill();c.strokeStyle='#3984ef';c.lineWidth=3;c.stroke();}} const t0={y:144,size:84,font:'display',color:'#233939',show:K(0,.3,1.7),hide:K(1,0,.55)}; d.text('Same power.',{...t0,x:line-65,align:'right'}); d.text('Different aim.',{...t0,x:line+65}); const h=d.text('The forecasters are\nasking for a pause.',{x:147,y:100,size:88,font:'display',color:'#293b3e',show:K(1,.8,2),hide:K(2,0,.55)}); d.text('AI Futures Project, 10 November 2026',{x:151,y:h.y+h.h+24,size:30,font:'mono',color:'#35494b',show:K(1,1.5,2.6),hide:K(2,0,.55)}); d.text('It is not\ndecided yet.',{x:147,y:110,size:111,font:'display',color:'#193b40',show:K(2,.9,2.2)}); } });