Deck.transition('tear',{dur:1.4,frag:`void main(){ float e=p*p*(3.-2.*p), y=vUv.y; float edge=.5+.06*(fbm(vec2(y*7.,3.))-.5)+.012*(fbm(vec2(y*70.,7.))-.5); // ragged paper edge down the middle float op=sat(e*1.6-(1.-y)*.6)*.62, g=smoothstep(0.,.02,op); // the top opens first float xl=vUv.x+op, xr=vUv.x-op, dl=edge-xl, dr=xr-edge; vec4 c=texture(tB,vUv); c.rgb*=1.-.45*g*(1.-e)*exp(-max(min(-dl,-dr),0.)*30.); // shadow of the halves on the new scene if(dl>0.) c=mix(texture(tA,vec2(xl,y)),vec4(.96,.94,.9,1.),g*smoothstep(.007,0.,dl)); else if(dr>0.) c=mix(texture(tA,vec2(xr,y)),vec4(.96,.94,.9,1.),g*smoothstep(.007,0.,dr)); o=c; }`}); Deck.scene({ id:'futures', title:'Two aims', enterWith:'tear', post:{bloom:.7,threshold:1,vignette:.2,grain:.03}, beats:[{dur:2,hold:5},{dur:3,hold:4},{dur:4,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){ return { U:{uDiv:960,uWind:0,uOpen:0,uM:[0,0]}, bay:d.pass(`uniform float uDiv,uWind,uOpen; uniform vec2 uM; float qz(float v,float W){ return mix(v,floor(v*42.67)/42.67,W); } float seg(vec2 a,vec2 b,vec2 q){ vec2 pa=q-a,ba=b-a; return length(pa-ba*clamp(dot(pa,ba)/dot(ba,ba),0.,1.)); } float gnd(float x){ return -.3+.05*sin(x*2.2+.6)+.012*sin(x*9.); } float sail(vec2 l){ float a=.04; float s1=smoothstep(0.,a,l.x-.03)*smoothstep(0.,a,.55*(1.-l.y)-l.x)*smoothstep(0.,a,l.y-.1); float s2=smoothstep(0.,a,-l.x-.03)*smoothstep(0.,a,.32*(1.-l.y*1.25)+l.x)*smoothstep(0.,a,l.y-.1); return max(s1,s2); } void main(){ vec2 q=design(vUv); float W=step(q.x,uDiv), L=1.-W; vec2 p=(q-vec2(960.,540.))*vec2(1.,-1.)/1080.+uM*.006; float hz=.02, sway=sin(uTime*.7)*(.3+.7*uWind); float sl=floor(p.x*24.), xs=mix(p.x,(sl+.5)/24.,W); float seam=1.-.15*W*smoothstep(.44,.5,abs(fract(p.x*24.)-.5)); float hM=qz(hz+.04+.07*fbm(vec2(xs*2.2+3.,1.))+.02*sin(xs*1.7+1.),W); float hL=qz(hz-.03+.13*exp(-(xs+.8)*(xs+.8)*2.5)+.03*fbm(vec2(xs*5.,4.))-.6*smoothstep(-.5,-.15,xs),W); float hR=qz(hz-.04+.16*exp(-(xs-.85)*(xs-.85)*3.)+.025*fbm(vec2(xs*5.,9.))-.6*(1.-smoothstep(.2,.55,xs)),W); float hH=max(hL,hR), hG=qz(gnd(xs),W); vec2 sp=vec2(.52,.15); float sd=length(p-sp); vec3 hor=vec3(.95,.62,.34); // sky, living vec3 cL=mix(hor,vec3(.1,.27,.62),pow(sat((p.y-hz)*2.),.6)); cL+=vec3(1.,.6,.3)*(.006+.004*uOpen)/(sd*sd+.004); float cl=fbm(vec2(p.x*2.4+uTime*.015,p.y*7.+2.)); cL=mix(cL,vec3(.85,.72,.62),smoothstep(.48+.1*uOpen,.8,cl)*smoothstep(hz,.1,p.y)*smoothstep(.28,.2,p.y)*(.2+.8*smoothstep(-.3,.2,p.x))*.8); cL+=vec3(1.,.8,.5)*6.*smoothstep(.03,.026,sd); // sky, white: lattices of rectangles, sun behind a grid vec3 cW=mix(vec3(.8,.82,.84),vec3(.6,.65,.72),sat((p.y-hz)*2.2)); vec2 g=vec2(p.x*10.+uTime*.04,p.y*17.78); float lat=smoothstep(.03,0.,sdBox(fract(g)-.5,vec2(.36,.34)))*smoothstep(.4,.6,vnoise(floor(g)*.37+5.)); g=vec2(p.x*22.-uTime*.05,p.y*39.1+.5); lat=max(lat,.6*smoothstep(.05,0.,sdBox(fract(g)-.5,vec2(.34,.32)))*smoothstep(.5,.7,vnoise(floor(g)*.21))); cW=mix(cW,vec3(.9,.91,.92),lat*.65*smoothstep(hz+.05,.16,p.y)*(.4+.6*smoothstep(-.3,.1,p.x))); cW+=vec3(.3,.26,.2)*smoothstep(.07,.02,sd)*step(.25,fract(p.x*70.))*step(.25,fract(p.y*70.)); vec3 c=mix(cL,cW,W); // far mountains float m=smoothstep(.003,0.,p.y-hM); vec3 mc=mix(mix(vec3(.3,.34,.5),hor*.8,.25)*(.85+.3*fbm(p*vec2(9.,22.))),vec3(.72,.75,.79)*(.9+.1*hash12(vec2(sl,3.)))*seam,W); c=mix(c,mc,m); // arched bridge across the bay mouth (living) float by=(p.y-hz)*22.; float bdg=step(0.,by)*smoothstep(.56,.52,by)*smoothstep(-.47,-.45,p.x)*smoothstep(.52,.5,p.x)*(1.-smoothstep(.4,.36,length(vec2(fract(p.x*22.)-.5,by)))); c=mix(c,vec3(.56,.45,.36),bdg*L*.9); // sea if(p.y0.){ float dpt=hH-p.y, lr=step(hR,hL), bnd=floor(dpt*45.); float hsh=hash12(vec2(bnd,floor(p.x*7.+bnd*.37)+lr*9.)); vec3 hc=mix(vec3(.17,.3,.09),vec3(.42,.44,.14),hsh); hc=mix(hc,vec3(.45,.3,.5),step(.85,hsh)*.6); hc*=(.75+.4*fbm(p*vec2(30.,60.)))*(1.-.35*smoothstep(.75,1.,fract(dpt*45.)))*mix(1.,.6,sat(dpt*3.)); hc+=vec3(.3,.2,.05)*exp(-dpt*40.); vec2 hg=p*vec2(40.,46.), id=floor(hg), f=fract(hg)-.5; float rn=hash12(id), r2=fract(rn*7.); vec2 tc=lr>.5?vec2(-.68,.045):vec2(.8,.05); float twn=step(length((p-tc)/vec2(.2,.06))+.3*rn,1.)*step(.012,dpt); f.x+=(rn-.5)*.3; vec3 roof=r2<.45?vec3(.75,.25,.1):(r2<.7?vec3(.85,.55,.12):vec3(.15,.35,.6)); vec3 hs=f.y>.08?roof:vec3(.9,.84,.74)*(f.x>0.?1.:.7); hc=mix(hc,hs,smoothstep(.06,0.,sdBox(f,vec2(.3,.3)))*twn); float wf=smoothstep(.006,.002,abs(p.x+.47+.004*sin(p.y*90.)))*smoothstep(0.,.01,dpt)*smoothstep(.16,.1,dpt)*lr; hc=mix(hc,vec3(.9,.95,1.)*(.7+.3*fbm(vec2(p.x*80.,p.y*30.+uTime*2.))),wf); hc=mix(hc,hor*.7,.18); vec2 sf=abs(vec2(fract(p.x*24.),fract(dpt*42.67))-.5); vec3 hw=vec3(.76,.78,.8)*(.84+.16*hash12(vec2(sl,floor(dpt*42.67))))*(1.-.2*smoothstep(.44,.5,max(sf.x,sf.y)))*mix(1.,.8,sat(dpt*2.5)); float pw=.13+.09*sin(uTime*.4); hw=mix(hw,vec3(.93,.94,.95)*(f.x>0.?1.:.82),smoothstep(.05,0.,sdBox(f,vec2(pw,.36)))*twn); c=mix(c,mix(hc,hw,W),mh); } // foreground meadow float gy=hG+L*.006*vnoise(vec2(p.x*220.+sway*2.,1.)); float mg=smoothstep(.002,0.,p.y-gy); if(mg>0.){ float dg=hG-p.y, wv=sin(p.x*7.+p.y*12.+uTime*1.1); vec3 gc=mix(vec3(.34,.46,.1),vec3(.1,.24,.05),sat(dg*3.5)); gc*=.75+.45*fbm(vec2(p.x*50.+wv*.6*(.3+uWind),p.y*140.))+.14*wv*(.3+uWind); float py=gnd(p.x)-.06-.025*sin(p.x*3.+1.); gc=mix(gc,vec3(.62,.52,.36),smoothstep(.009,.005,abs(p.y-py))); vec2 fg=p*vec2(70.,100.)+vec2(sway*.15,0.), fi2=floor(fg); float fr=hash12(fi2); vec2 ff=fract(fg)-.5-(vec2(hash12(fi2+3.),hash12(fi2+8.))-.5)*.5; vec3 fc=fr>.95?vec3(.9,.12,.08):(fr>.9?vec3(.95,.75,.1):(fr>.86?vec3(.95,.92,.85):vec3(.55,.3,.8))); gc=mix(gc,fc,step(.8,fr)*smoothstep(.2,.1,length(ff))); gc*=1.-.4*smoothstep(1.,.5,length((p-vec2(.27,-.285))/vec2(.16,.03))); vec2 sfr=fract(vec2(p.x*48.,dg*64.+.5))-.5; vec3 gw=vec3(.66,.68,.71)*(1.-.25*sat(dg*2.))*seam; gw=mix(gw,vec3(.45,.48,.52),smoothstep(.05,0.,sdBox(sfr-vec2(.05,.1),vec2(.33,.24)))); gw=mix(gw,vec3(.92,.93,.94),smoothstep(.05,0.,sdBox(sfr,vec2(.33,.24)))); c=mix(c,mix(gc,gw,W),mg); } // the tree: full leaf on the right, bare and frosted in a glass case on the left if(abs(p.x-.3)<.21&&p.y>-.3&&p.y<.26){ vec2 tb=vec2(.3,-.275), cc=vec2(.3,.06); float sw=sway*.004*L; float ty=sat((p.y-tb.y)/.25); float brd=seg(tb,vec2(.3,-.03),p)-mix(.017,.009,ty); for(int i=0;i<7;i++){ float fi=float(i), a=-1.25+.42*fi+.1*sin(fi*5.); vec2 a0=vec2(.3,-.1+.01*fi), e=a0+vec2(sin(a),cos(a))*(.16+.02*sin(fi*3.))+vec2(sw*(1.+fi*.2),0.); vec2 m1=mix(a0,e,.55), m2=mix(a0,e,.75); brd=min(brd,seg(a0,e,p)-.0045); brd=min(brd,seg(m1,m1+vec2(sin(a+.8),cos(a+.8))*.06,p)-.0025); brd=min(brd,seg(m2,m2+vec2(sin(a-.7),cos(a-.7))*.045,p)-.0025); } vec3 bcol=mix(vec3(.15,.09,.05)+vec3(.35,.2,.05)*smoothstep(0.,.012,p.x-.296), mix(vec3(.4,.46,.56),vec3(.93,.96,1.),smoothstep(.35,.75,vnoise(p*260.))),W); c=mix(c,bcol,smoothstep(.002,0.,brd)); vec2 cp=p-cc; float cd=length(cp/vec2(1.2,1.))-.11+.07*(fbm(p*16.+vec2(sway*.25,0.))-.5); float lf=fbm(p*45.+vec2(sway*.5,0.)); vec3 lc=mix(vec3(.05,.15,.04),vec3(.3,.45,.1),lf); lc+=vec3(.6,.45,.1)*sat(dot(normalize(cp+1e-4),normalize(sp-cc)))*smoothstep(-.06,0.,cd)*.6; lc*=.7+.5*sat(cp.y*5.+.5); c=mix(c,lc,smoothstep(.004,-.004,cd)*L); float gb=sdBox(p-vec2(.3,-.035),vec2(.175,.245)); c=mix(c,vec3(.88,.94,.98),step(gb,0.)*W*(.12+.1*smoothstep(.12,0.,abs(fract((p.x+p.y*.6)*3.)-.3)))); c=mix(c,vec3(.36,.42,.5),smoothstep(.003,.0015,abs(gb))*W); } // people on the path and under the tree for(int i=0;i<9;i++){ float fi=float(i); float px=i<4?fract(fi*.27+.1+uTime*.003*(1.+fi*.3))*1.9-.95:.2+.04*(fi-4.); float fy=i<4?gnd(px)-.06-.025*sin(px*3.+1.):-.292-.004*sin(fi*3.); float hh=.03+.004*sin(fi*4.); vec2 ft=vec2(px,fy); float pd=min(seg(ft+vec2(0.,.004),ft+vec2(0.,hh*.7),p)-.0045,length(p-ft-vec2(0.,hh))-.0048); vec3 pc=.5+.5*cos(fi*2.4+vec3(0.,2.,4.)); c=mix(c,pc*.5+.05,smoothstep(.0015,0.,pd)*L); } // birds for(int i=0;i<9;i++){ float fi=float(i); vec2 b=vec2(-.28+.045*fi+.03*sin(uTime*.15+fi*1.7)+.02*sin(uTime*.05),.1+.03*sin(fi*2.3)+.012*sin(uTime*.2+fi)); vec2 l=p-b; float fl=.5+.5*sin(uTime*5.+fi*2.); float bd=abs(l.y-abs(l.x)*(fl-.2))-.0012; c=mix(c,vec3(.04,.04,.06),smoothstep(.0012,0.,bd)*smoothstep(.011,.009,abs(l.x))*L); } // kites for(int i=0;i<2;i++){ float fi=float(i); vec2 k=vec2(-.12+.2*fi,.17+.05*fi)+vec2(.012*sin(uTime*.6+fi*2.),.008*sin(uTime*.9+fi))*(1.+uWind); vec2 l=p-k, an=vec2(-.35+.45*fi,-.32); c=mix(c,vec3(.9),smoothstep(.0012,.0004,seg(k-vec2(0.,.019),an,p))*L*.5); c=mix(c,i==0?vec3(.9,.15,.1):vec3(.95,.75,.1),smoothstep(.08,0.,abs(l.x)/.012+abs(l.y)/.019-1.)*L); } // petals on the wind vec2 pg=p*vec2(9.,7.)+vec2(-uTime*.15,uTime*.05+.3*sin(uTime*.3+p.x*3.)); vec2 pid=floor(pg); float pr=hash12(pid+20.); vec2 pf=fract(pg)-vec2(.2+.6*hash12(pid+1.),.2+.6*hash12(pid+2.)); c=mix(c,vec3(1.,.72,.78),step(1.-(.3+.6*uWind),pr)*smoothstep(.035,.02,length(pf*vec2(1.,1.4)))*L*.9); c*=mix(.8+.3*uOpen,1.,W); o=vec4(c,1.); }`,'futures bay') } }, draw(s,d,r){ const E=d.E, Ln=E.lin, v=d.view, c=d.ctx2d, U=r.U; const k1=s.k(1,0,2.4), k2=s.k(2,.2,3.4), open=s.k(2,0,4); const idle=(.035*Math.sin(s.t*.3)+.03*s.mouse.x)*(1-.5*k1)*(1-k2); // slow drift plus a nudge from the pointer const dx=v.x0+v.w*(.5+.22*k1-.8*k2+idle); U.uDiv=dx; U.uWind=open; U.uOpen=open; U.uM[0]=s.mouse.x; U.uM[1]=s.mouse.y; r.bay.draw(U); c.save(); c.strokeStyle='#2f7cf6'; c.lineWidth=4; c.beginPath(); c.moveTo(dx,v.y0); c.lineTo(dx,v.y1); c.stroke(); for(let i=0;i<3;i++){ c.beginPath(); c.arc(dx,v.y0+v.h*(.2+.3*i),i===1?17:10,0,6.2832); c.fillStyle='#ffffff'; c.fill(); c.lineWidth=3; c.stroke(); } c.restore(); d.text('Same power.',{x:dx-56,y:130,size:84,align:'right',color:'#12161c',show:s.k(0,.4,1.6,Ln),hide:s.k(1,0,.6,Ln)}); d.text('Different aim.',{x:dx+56,y:130,size:84,color:'#fff3e0',show:s.k(0,.8,2,Ln),hide:s.k(1,0,.6,Ln)}); const h=d.text('The forecasters are\nasking for a pause.',{x:150,y:130,size:90,color:'#12161c',show:s.k(1,1,2.2,Ln),hide:s.k(2,0,.6,Ln)}); d.text('AI Futures Project, 10 November 2026',{x:150,y:h.y+h.h+30,size:32,font:'mono',color:'#3a424d',style:'fade',show:s.k(1,1.8,3,Ln),hide:s.k(2,0,.6,Ln)}); d.text('It is not\ndecided yet.',{x:150,y:130,size:104,color:'#fff3e0',show:s.k(2,2.6,3.8,Ln)}); } });