Deck.scene({ id:'office', title:'The Future of AI', enterWith:'fade', post:{tone:'none'}, beats:[{dur:2,hold:4},{dur:1.6,hold:5},{dur:9.6,hold:5}], notes:[ 'Hello. This is a talk about the future of AI. (Say it flatly. Let the slide be boring. Wait.)', 'Here is the agenda. We will start with an introduction, then look at benefits and challenges… (Read the bullets out loud, slowly. Then press next and stop talking.)', 'Do not touch anything. Let the deck work. Pick up again when the chart is on screen.' ], setup(d){ return { bg:d.pass(`uniform float uWarm; void main(){ vec2 q=design(vUv); vec3 c=mix(vec3(.947,.944,.934),vec3(.945,.925,.888),uWarm); float vig=length((q-vec2(960.,540.))/vec2(1180.,780.)); c*=1.-.075*smoothstep(.35,1.25,vig); c*=.985+.03*fbm(q*vec2(.35,.7)); c+=(hash12(floor(q))-.5)*.014; o=vec4(c,1.); }`,'office paper') }; }, draw(s,d,r){ const E=d.E, c=d.ctx2d; r.bg.draw({uWarm:s.k(2,5.8,7.0,E.io3)}); // ---------- beat 1: the boring title slide ---------- const h1=s.k(1,0,.6,E.lin); d.text('The Future of AI',{x:960,y:420,size:112,font:'arial',color:'#111111',align:'center', show:s.k(0,.2,1.0,E.lin),hide:h1,style:'fade'}); d.text('An Overview',{x:960,y:590,size:48,font:'arial',color:'#8b8b8b',align:'center', show:s.k(0,.4,1.2,E.lin),hide:h1,style:'fade'}); // ---------- beat 2: the stock agenda slide ---------- const agShow=s.k(1,.4,1.4,E.lin); const agFade=1-s.k(2,5.8,6.8,E.io3); const delT=s.k(2,.9,1.4,E.lin); const tb=d.text('Agenda',{x:150,y:118,size:76,font:'arialBold',color:'#1a1a1a', show:agShow,hide:delT,style:'fade',alpha:agFade}); d.select(tb.x-26,tb.y-18,tb.w+52,tb.h+36,{a:s.k(2,.2,.8,E.out3)*(1-delT)}); const bullets=['Introduction','Benefits and challenges','Best practices','Next steps','Questions']; for(let i=0;i<5;i++){ const y=290+i*88, a0=1.4+i*.5; const app=s.k(2,a0,a0+.3,E.out3); const del=s.k(2,a0+.4,a0+.8,E.lin); d.rect(152,y+30,14,14,'#3b3b3b',agShow*agFade*(1-del)); const bb=d.text(bullets[i],{x:192,y:y,size:44,font:'arial',color:'#2b2b2b', show:agShow,hide:del,style:'fade',alpha:agFade}); d.select(bb.x-18,bb.y-14,bb.w+36,bb.h+28,{a:app*(1-del)}); } // ---------- the chart on the right ---------- const px0=1010, py0=330, pw=700, ph=430, py1=py0+ph, px1=px0+pw; const gridA=1-s.k(2,4.2,5.2,E.lin); d.text('AI Progress (Projected)',{x:px0,y:206,size:32,font:'arialBold',color:'#3a3a3a', show:agShow,alpha:agFade}); c.save(); c.globalAlpha=agShow*agFade*gridA; c.strokeStyle='#dedede'; c.lineWidth=2; for(let v=0;v<=100;v+=20){ const yy=py1-v/100*ph; c.beginPath(); c.moveTo(px0,yy); c.lineTo(px1,yy); c.stroke(); } c.strokeStyle='#a0a0a0'; c.lineWidth=2; c.beginPath(); c.moveTo(px0,py0-12); c.lineTo(px0,py1); c.lineTo(px1,py1); c.stroke(); c.restore(); for(let v=0;v<=100;v+=20){ d.text(String(v),{x:px0-18,y:py1-v/100*ph-13,size:22,font:'arial',color:'#8f8f8f', align:'right',show:agShow,alpha:agFade*gridA}); } for(let yr=2020;yr<=2070;yr+=10){ const X=px0+(yr-2020)/50*pw; d.text(String(yr),{x:X,y:py1+14,size:22,font:'arial',color:'#8f8f8f', align:'center',show:agShow,alpha:agFade*gridA}); } const bend=s.k(2,4.2,5.6,E.io3); c.save(); c.beginPath(); c.rect(px0,py0-8,pw,ph+8); c.clip(); c.globalAlpha=agShow*agFade; c.strokeStyle='#4472c4'; c.lineWidth=4; c.lineJoin='round'; c.lineCap='round'; c.beginPath(); for(let i=0;i<=80;i++){ const u=i/80, year=2020+50*u; const straight=5+75*u; const expo=5*Math.exp(.07*(year-2020)); const v=straight+(expo-straight)*bend; const X=px0+u*pw, Y=py1-v/100*ph; if(i===0) c.moveTo(X,Y); else c.lineTo(X,Y); } c.stroke(); c.restore(); d.rect(px0,py1+44,24,16,'#4472c4',agShow*agFade); d.text('Series 1',{x:px0+36,y:py1+38,size:24,font:'arial',color:'#666666', show:agShow,alpha:agFade}); // ---------- beat 3: the deck edits itself, then lands on one word ---------- const rad=300*s.k(2,6.8,8.2,E.outBack); if(rad>1){ c.fillStyle='#d9382a'; c.beginPath(); c.arc(1330,545,rad,0,Math.PI*2); c.fill(); } let v=s.k(2,7.0,7.9,E.lin); v=v-s.k(2,7.9,8.2,E.lin)*.55; v=Math.max(v,s.k(2,8.2,9.0,E.lin)); const n=Math.round(7*v); const full=d.text('Better.',{x:280,y:460,size:150,font:'800 150px system-ui,sans-serif', color:'#111111',show:0}); let bx=full.x, bw=0; if(n>0){ const t=d.text('Better.'.slice(0,n),{x:280,y:460,size:150, font:'800 150px system-ui,sans-serif',color:'#111111'}); bx=t.x; bw=t.w; } d.select(bx-22,full.y-16,Math.max(bw,60)+44,full.h+34,{a:s.k(2,6.9,7.5,E.out3)}); const curA=s.k(2,7.0,7.3,E.lin)*(1-s.k(2,9.0,9.2,E.lin)); if(curA>.01) d.rect(bx+bw+8,full.y+8,9,full.h-16,'#111111',curA); } });