Deck.scene({ id:'office', title:'The Future of AI', enterWith:'fade', post:{tone:'none'}, beats:[{dur:.6,hold:4},{dur:1.2,hold:5},{dur:8.6,hold:6}], 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 { bul:['Introduction','Benefits and challenges','Best practices','Next steps','Questions'], yl:['0','20','40','60','80','100'], xl:['2020','2030','2040','2050','2060','2070'], w1:'Bigger', w2:'Better.', heavy:'800 SIZEpx system-ui,sans-serif', bg:d.pass(`uniform float uW,uC; void main(){ vec2 q=design(vUv); vec3 off=vec3(.953,.933,.894)*(.97+.05*fbm(q*.02)); vec3 c=mix(vec3(1.),off,uW); float dd=length(q-vec2(1380.,560.))-270.*uC; c=mix(c,vec3(.86,.17,.12)*(.97+.05*fbm(q*.03+3.)),smoothstep(1.5,-1.5,dd)*step(.001,uC)); o=vec4(c,1.); }`,'office bg') } }, draw(s,d,r){ const E=d.E, L=E.lin, c=d.ctx2d; const off=s.k(2,5.6,6.6), circ=s.k(2,6.0,7.0,E.outBack); r.bg.draw({uW:off,uC:circ}); // Beat 1: title slide const outT=s.k(1,0,.4,L); d.text('The Future of AI',{x:960,y:400,size:110,font:'arial',color:'#000',align:'center',style:'fade',hide:outT}); d.text('An Overview',{x:960,y:560,size:52,font:'arial',color:'#7f7f7f',align:'center',style:'fade',hide:outT}); // Beat 2: agenda const inA=s.k(1,.2,.9,L); const selT=s.k(2,.2,.6,L), delT=s.k(2,.8,.9,L); const at=d.text('Agenda',{x:150,y:130,size:88,font:'arial',color:'#000',style:'fade',show:inA,hide:delT}); d.select(at.x-20,at.y-14,at.w+40,at.h+28,{a:selT*(1-delT)}); for(let i=0;i<5;i++){ const t0=1.0+i*.5, sel=s.k(2,t0,t0+.25,L), del=s.k(2,t0+.35,t0+.45,L), y=330+i*95, a=inA*(1-del); if(a>0){ c.globalAlpha=a; c.fillStyle='#000'; c.beginPath(); c.arc(172,y+28,7,0,6.2832); c.fill(); c.globalAlpha=1; } const bt=d.text(r.bul[i],{x:205,y:y,size:46,font:'arial',color:'#000',style:'fade',show:inA,hide:del}); d.select(148,y-14,bt.x+bt.w-148+24,bt.h+28,{a:sel*(1-del)}); } // Chart const chartA=s.k(1,.4,1.2,L), gA=chartA*(1-s.k(2,3.5,4.1,L)); if(gA>0){ for(let j=0;j<6;j++){ const y=800-j*100; d.rect(1060,y-1,700,2,j===0?'#bfbfbf':'#d9d9d9',gA); d.text(r.yl[j],{x:1042,y:y-16,size:28,font:'arial',color:'#595959',align:'right',alpha:gA}); d.text(r.xl[j],{x:1060+j*140,y:814,size:28,font:'arial',color:'#595959',align:'center',alpha:gA}); } d.text('AI Progress (Projected)',{x:1410,y:210,size:40,font:'arial',color:'#404040',align:'center',alpha:gA}); d.rect(1330,888,44,5,'#4472c4',gA); d.text('Series 1',{x:1386,y:874,size:28,font:'arial',color:'#595959',alpha:gA}); } const bend=s.k(2,4.1,6.0,E.io3); if(chartA>0){ c.save(); c.globalAlpha=chartA; const R=Math.round(68+(17-68)*bend), G=Math.round(114+(17-114)*bend), B=Math.round(196+(17-196)*bend); c.strokeStyle='rgb('+R+','+G+','+B+')'; c.lineWidth=4+6*bend; c.lineJoin=c.lineCap='round'; c.beginPath(); for(let i=0;i<=60;i++){ const t=i/60, v=(5+75*t)*(1-bend)+5*Math.exp(t*4.2)*bend; const x=1060+700*t, y=800-v*5; if(i===0) c.moveTo(x,y); else c.lineTo(x,y); } c.stroke(); c.restore(); } // Typing: Bigger -> delete -> Better. const p1=s.k(2,6.0,6.8,L), d1=s.k(2,6.9,7.4,L), p2=s.k(2,7.6,8.6,L); const str = p2>0 ? r.w2.slice(0,Math.round(p2*r.w2.length)) : r.w1.slice(0,Math.round(r.w1.length*p1*(1-d1))); const boxA=s.k(2,5.7,6.2,L); if(boxA>0){ const full=d.text(r.w2,{x:150,y:400,size:230,font:r.heavy,color:'#111',show:0}); const tt=d.text(str,{x:150,y:400,size:230,font:r.heavy,color:'#111',show:1}); const w=Math.max(tt.w,60); d.select(150-26,full.y-16,w+52,full.h+32,{a:boxA}); const typing=p2<1; if(typing && Math.sin(s.t*9)>-.3) d.rect(150+tt.w+8,full.y+20,14,full.h-40,'#111'); } } });