Deck.transition('slam',{dur:1.15,frag:`void main(){ if(p<=0.){o=texture(tA,vUv);return;} if(p>=1.){o=texture(tB,vUv);return;} float t=min(p/.65,1.), lift=1.-t*t*t; float impact=max(0.,(p-.65)/.35), bounce=.024*sin(impact*12.)*exp(-impact*5.); vec2 uv=vUv-vec2(0.,abs(bounce)); float edge=lift+abs(bounce); vec3 c=texture(tA,vUv).rgb*(1.-.55*exp(-abs(vUv.y-edge)*18.)); c=mix(c,texture(tB,clamp(uv-vec2(0.,lift),0.,1.)).rgb,smoothstep(edge,edge+.002,vUv.y)); float cloud=exp(-vUv.y*11.)*sin(impact*3.14159)*fbm(vec2(vUv.x*16.,vUv.y*10.-impact*3.)); c=mix(c,vec3(.84,.75,.61),cloud); for(int i=0;i<9;i++){float j=float(i),h=hash12(vec2(j,13.));vec2 q=vUv-vec2((j+.5)/9.+.04*sin(j)*impact,(.10+.18*h)*sin(impact*3.14159)); q=rot2((h-.5)*5.+impact*4.)*(q*vec2(1.78,1.));float a=1.-smoothstep(-.001,.001,sdBox(q,vec2(.018,.008)*sin(impact*3.14159)));c=mix(c,vec3(.93,.90,.82),a);} o=vec4(c,1.);}`}); Deck.scene({ id:'dominoes',title:'Thirty steps',enterWith:'slam', post:{tone:'none'},beats:[{dur:2,hold:4},{dur:8,hold:5},{dur:4,hold:5}], notes:['Here is why people who study this expect it to be sudden. Suppose each AI can build the next one, and the next one is only one and a half times better. That does not sound like much.', 'A real domino can knock over one that is one and a half times its size. The first is a centimetre tall. Ten steps later it is thirty-eight centimetres. Twenty steps, twenty-two metres. Step thirty is 1.28 kilometres, taller than any building on Earth.', 'Nothing changed between the steps. Same push, same ratio, thirty times.'], setup(d){ return {bg:d.pass(`uniform float city,up;uniform vec2 drift; void main(){vec2 q=design(vUv)+drift; float grain=vnoise(vec2(q.x*.002,q.y*.069)+.9*vnoise(q*.009)); float rings=sin(q.y*.085+2.4*sin(q.x*.0017)+grain*2.); vec3 wood=mix(vec3(.80,.63,.44),vec3(.96,.85,.68),.54+.21*grain+.09*rings); wood+=.038*sin((q.x+q.y*.56)*.004); float hz=340.+555.*up; vec3 sky=mix(vec3(.61,.76,.80),vec3(.92,.87,.75),smoothstep(0.,hz,q.y)); for(int i=0;i<3;i++){float j=float(i),ridge=hz-85.+28.*j-(75.+j*10.)*vnoise(vec2(q.x*.004+j,21.+j)); sky=mix(sky,mix(vec3(.72,.76,.73),vec3(.51,.60,.58),j*.36),smoothstep(ridge-3.,ridge+3.,q.y));} vec3 ground=mix(vec3(.78,.75,.66),vec3(.64,.67,.57),vnoise(q*vec2(.004,.012))); sky=mix(sky,ground,smoothstep(hz-2.,hz+3.,q.y)); vec3 c=mix(wood,sky,city); c+=.014*(hash12(floor(q))-.5);o=vec4(c,1.);}`,'maple worktop to miniature valley'), rand:i=>{let n=Math.sin(i*73.173+1.7)*43758.51;return n-Math.floor(n)}}; }, draw(s,d,r){ const C=d.ctx2d,L=d.E.lin,k=s.k(1,0,8,L),u=s.k(2,0,4),city=Math.min(1,Math.max(0,(k-.13)*3.4)),travel=23*k+6*u; const dx=4*s.mouse.x+1.6*Math.sin(s.t*.24),dy=2*s.mouse.y; r.bg.draw({city,up:u,drift:[-dx,-dy]}); function poly(col,...pts){C.beginPath();C.moveTo(pts[0],pts[1]);for(let i=2;i0){C.save();C.globalAlpha=city; const hz=340+555*u; for(let row=0;row<7;row++){let z=(row+1)/7,step=68+202*z,offset=travel*(5+25*z); for(let j=-2;j<38;j++){let x=j*step-offset%step+row%2*step*.45; if(x< -300||x>2300)continue; let n=r.rand((j+Math.floor(offset/step))*19+row*104),y=hz+(30+690*z*z)*(1-.79*u), w=(12+39*z)*(1-.64*u),h=w*(row<2?2+n*5:.65+n*1.3),a=w*.46; poly('#b9b9a7',x-w,y,x+w,y,x+w+2*a,y-a,x+a,y-1.3*a); poly('#ede7d7',x-w,y-h,x+w,y-h,x+w,y,x-w,y); poly('#b0afa1',x+w,y-h,x+w+a,y-h-a*.55,x+w+a,y-a*.55,x+w,y); poly('#f6efdc',x-w,y-h,x-w+a,y-h-a*.55,x+w+a,y-h-a*.55,x+w,y-h); if(n>.30&&row>=2){poly('#a95c46',x-w-2,y-h,x,y-h-a*1.6,x+w+2,y-h);poly('#c77b60',x,y-h-a*1.6,x+a,y-h-2.15*a,x+w+a+2,y-h-.55*a,x+w+2,y-h);} for(let m=-1;m<2;m++)d.rect(x+m*w*.58-w*.1,y-h*.67,w*.19,w*.27,'#989a91'); }} for(let i=0;i<2;i++){let x=1320+i*380-travel*4,y=hz+32,h=120-68*u;line(x,y,x,y-h,4,'#a48c67');line(x-28,y-h,x+86,y-h,4,'#a48c67');line(x,y-h-17,x+81,y-h,2,'#a48c67');line(x,y-h-17,x-28,y-h,2,'#a48c67');line(x+63,y-h,x+63,y-h+29,1.5,'#a48c67');} C.restore();} // Geometric spacing makes tracking the chain a continuous logarithmic zoom. for(let n=1;n<=30;n++){ let j=n-1-travel,scale=Math.pow(1.5,j),h=145*scale, x=802+428*(scale-1),y=813-23*(scale-1); if(n>4&&k===0)continue; if(j< -7||j>4.1)continue; let hero=n===30?u:0; x=x*(1-hero)+1290*hero;y=y*(1-hero)+1190*hero; h=h*(1-hero)+1125*hero; let w=h*(.48+.24*hero),a=w*.23,b=a*.50; let fall=Math.min(1,Math.max(0,travel-(n-1)))*1.40; C.save();C.translate(x,y); oval(w*.45,1,w*.95,w*.17,'rgba(74,57,38,.14)',-.10); C.rotate(fall); let top=w*(.5-.19*hero),lean=hero*72; poly('#bcb7a6',w/2,0,w/2+a,-b,top+a+lean,-h-b,top+lean,-h); poly('#fffbed',-top+lean,-h, -top+a+lean,-h-b,top+a+lean,-h-b,top+lean,-h); const face=C.createLinearGradient(-w/2,-h,w/2,0);face.addColorStop(0,'#fffef1');face.addColorStop(.7,'#f3efe1');face.addColorStop(1,'#dfdacc'); poly(face,-w/2,0,-top+lean,-h,top+lean,-h,w/2,0); line(-top+lean,-h,top+lean,-h,1.6,'#fffdf5'); const split=-h*.4; line(-w*.43+lean*.4,split,w*.43+lean*.4,split,Math.max(1,h*.003),'#c6c0b2'); oval(lean*.4,split,Math.max(1,w*.028),Math.max(1,w*.028),'#b2a995'); d.text(String(n),{x:lean*.76,y:-h*.86,size:w*(n<10?.76:.54),align:'center',font:'arialBold',color:'#524d43'}); for(let m=0;m<3;m++){oval((m-1)*w*.20+lean*.18,-h*(.14+m*.065),w*.047,w*.047,'#5d584f');} if(n===1)d.select(-w/2-11,-h-b-9,w+a+22,h+b+19,{a:s.k(0,1.25,2,L)*(1-s.k(1,0,.45,L))}); C.restore(); } C.restore(); d.text('Say each AI builds\na successor\n1.5 times better.',{x:135,y:106,size:88,font:'display',color:'#412e24',show:s.k(0,.12,1.6,L),hide:s.k(1,0,.55,L)}); const count=Math.min(30,1+Math.floor(travel+.001)),meters=.01*Math.pow(1.5,count-1); const height=count===30?'1.3 km':meters>=1?Math.round(meters)+' m':Math.round(meters*100)+' cm',show=s.k(1,.62,1.45,L); d.text(String(count),{x:134,y:84,size:164,font:'display',color:'#392f28',show,style:'fade'}); d.rect(141,279,160,3,'#51453a',show); d.text(height,{x:139,y:300,size:46,font:'mono',color:'#463c33',show,style:'fade'}); } });