Deck.scene({ id:'office', title:'The Future of AI', enterWith:'fade', post:{tone:'none'}, beats:[{dur:.6,hold:4},{dur:2,hold:5},{dur:11.2,hold:4}], 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 { bullets:['Introduction','Benefits and challenges','Best practices','Next steps','Questions'], bg:d.pass(`uniform float uOff; void main(){ vec3 c=mix(vec3(1.),vec3(.957,.937,.898),uOff); o=vec4(c,1.); }`,'office bg') } }, draw(s,d,r){ const c=d.ctx2d, L=d.E.lin, E=d.E; r.bg.draw({uOff:s.k(2,7.5,8.5,L)}); // beat 1 const a1=1-s.k(1,0,.5,L); d.text('The Future of AI',{x:960,y:380,size:110,font:'arial',color:'#000',align:'center',style:'fade',alpha:a1}); d.text('An Overview',{x:960,y:540,size:52,font:'arial',color:'#7f7f7f',align:'center',style:'fade',alpha:a1}); // beat 2 and 3: agenda const in2=s.k(1,.2,.9,L); const titleAlive=in2*(1-s.k(2,3.2,3.3,L)); const tb=d.text('Agenda',{x:150,y:110,size:90,font:'arialBold',color:'#000',alpha:titleAlive}); d.select(tb.x-20,tb.y-12,tb.w+40,tb.h+24,{a:s.k(2,.3,.6,L)*(titleAlive>.01?1:0)}); for(let i=0;i<5;i++){ const alive=in2*(1-s.k(2,1.5+.4*i,1.6+.4*i,L)); const y=300+i*100; if(alive>.01) d.rect(160,y+24,12,12,'#000',alive); const b=d.text(r.bullets[i],{x:200,y,size:52,font:'arial',color:'#000',alpha:alive}); d.select(b.x-16,b.y-12,b.w+32,b.h+24,{a:s.k(2,.5+.2*i,.8+.2*i,L)*(alive>.01?1:0)}); } // chart const chartA=in2*(1-s.k(2,7,7.8,L)); if(chartA>.01){ const gx=1-s.k(2,3.4,4.4,L), m=s.k(2,4,7,E.io3); const X0=1060,X1=1760,Y0=760; c.save(); c.globalAlpha=chartA; d.text('AI Progress (Projected)',{x:1410,y:210,size:34,font:'arialBold',color:'#333',align:'center',alpha:chartA}); if(gx>.01){ c.globalAlpha=chartA*gx; c.strokeStyle='#d9d9d9'; c.lineWidth=2; for(let i=0;i<=5;i++){ const y=Y0-i*92; c.beginPath(); c.moveTo(X0,y); c.lineTo(X1,y); c.stroke(); d.text(String(i*20),{x:X0-14,y:y-12,size:22,font:'arial',color:'#595959',align:'right',alpha:chartA*gx}); } c.strokeStyle='#888'; c.beginPath(); c.moveTo(X0,Y0-460); c.lineTo(X0,Y0); c.lineTo(X1,Y0); c.stroke(); ['2020','2045','2070'].forEach((t,i)=>d.text(t,{x:X0+i*350,y:Y0+12,size:22,font:'arial',color:'#595959',align:'center',alpha:chartA*gx})); c.fillStyle='#4472c4'; c.fillRect(1300,832,40,5); d.text('Series 1',{x:1352,y:818,size:22,font:'arial',color:'#595959',alpha:chartA*gx}); } c.globalAlpha=chartA; c.strokeStyle='#4472c4'; c.lineWidth=6; c.lineCap='round'; c.lineJoin='round'; c.beginPath(); for(let i=0;i<=40;i++){ const u=i/40, yl=737-345*u, ye=737-1100*(Math.exp(5*u)-1)/(Math.exp(5)-1); const y=yl+(ye-yl)*m, x=X0+u*(X1-X0); if(i)c.lineTo(x,y); else c.moveTo(x,y); } c.stroke(); c.restore(); } // final: typed word and red circle const circ=s.k(2,7.6,8.8,E.outBack); if(circ>.01){ c.save(); c.fillStyle='#d9301f'; c.beginPath(); c.arc(1390,540,270*circ,0,Math.PI*2); c.fill(); c.restore(); } const F='800 SIZEpx system-ui,sans-serif'; const word='Better.', wrong='Smarter.'; let txt=''; const t1=s.k(2,8,8.8,L), t2=s.k(2,9,9.6,L), t3=s.k(2,9.8,10.8,L); if(t3>0) txt=word.slice(0,Math.round(t3*word.length)); else if(t2>0) txt=wrong.slice(0,Math.round((1-t2)*wrong.length)); else txt=wrong.slice(0,Math.round(t1*wrong.length)); const full=d.text(word,{x:230,y:420,size:230,font:F,color:'#000',show:0}); const tt=d.text(txt,{x:230,y:420,size:230,font:F,color:'#000',alpha:1,show:1}); const typing=s.k(2,8,8.1,L); if(typing>0 && t3<1 && Math.sin(s.t*8)>-.3) d.rect(230+tt.w+8,430,12,tt.h>0?Math.max(tt.h,200):200,'#000'); d.select(full.x-30,full.y-30,full.w+60+20,full.h+60,{a:s.k(2,7.9,8.4,L)}); } });