Deck.scene({ id:'office', title:'The Future of AI', enterWith:'fade', post:{tone:'none',bloom:0,grain:0,vignette:0}, beats:[{dur:.4,hold:5},{dur:.7,hold:5},{dur:8.4,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 { paper:d.pass(`uniform float uFinish; void main(){ vec2 q=design(vUv); vec3 c=mix(vec3(1.),vec3(.966,.955,.925),uFinish); float disc=1.-smoothstep(-1.,1.,length(q-vec2(1400.,540.))-275.*uFinish); o=vec4(mix(c,vec3(.906,.167,.126),disc*uFinish),1.); }`,'Office paper'), items:['Introduction','Benefits and challenges','Best practices','Next steps','Questions'] }; }, draw(s,d,r){ const c=d.ctx2d,L=d.E.lin,agenda=s.k(1,0,.7,L), finish=s.k(2,4.75,5.65,d.E.out3),ink='#141414'; r.paper.draw({uFinish:finish}); const text=(v,x,y,size,opts={})=>d.text(v,{x,y,size,font:'arial',color:ink,style:'fade',...opts}); if(agenda<1){ text('The Future of AI',960,400,112,{align:'center',color:'#000000',alpha:1-agenda}); text('An Overview',960,552,54,{align:'center',color:'#808080',alpha:1-agenda}); } if(agenda>0){ const picked=s.k(2,.05,.45,L),titleLeft=1-s.k(2,1.94,2.03,L); if(titleLeft>0){ const b=text('Agenda',142,111,86,{alpha:agenda*titleLeft}); if(picked>0)d.select(b.x-16,b.y-8,b.w+32,b.h+16,{a:picked*titleLeft}); } for(let i=0;i<5;i++){ const t=.68+i*.25, left=1-s.k(2,t,t+.08,L); if(left<=0)continue; const y=310+110*i,b=text(r.items[i],219,y,48,{alpha:agenda*left}); c.save();c.globalAlpha=agenda*left;c.fillStyle=ink;c.beginPath(); c.arc(168,y+29,7.5,0,Math.PI*2);c.fill();c.restore(); if(picked>0)d.select(142,y-8,b.w+95,76,{a:picked*left}); } const furniture=agenda*(1-s.k(2,2.08,2.85,L)),x=1098,y=725,w=612,h=378; if(furniture>0){ c.save();c.globalAlpha=furniture;c.strokeStyle='#c8c8c8';c.lineWidth=2; c.strokeRect(992,262,797,606); text('AI Progress (Projected)',1390,291,39,{align:'center',color:'#454545'}); c.beginPath(); for(let i=0;i<=4;i++){ const yy=y-h*i/4;c.moveTo(x,yy);c.lineTo(x+w,yy); text(String(i*20),x-18,yy-15,25,{align:'right',color:'#666666'}); } c.stroke();c.strokeStyle='#999999';c.beginPath();c.moveTo(x,y-h);c.lineTo(x,y);c.lineTo(x+w,y);c.stroke(); for(let i=0;i<6;i++)text(String(2020+10*i),x+i*w/5,y+13,24,{align:'center',color:'#666666'}); d.rect(1303,816,54,5,'#4472c4'); text('Series 1',1370,798,30,{color:'#505050'});c.restore(); } const bend=s.k(2,2.45,4.65),line=agenda*(1-s.k(2,4.55,5.15,L)); if(line>0){ c.save();c.globalAlpha=line;c.strokeStyle='#4472c4';c.lineWidth=5;c.lineJoin='round';c.beginPath(); for(let i=0;i<=100;i++){ const t=i/100,xx=x+w*t,yy=y-h*(.0625+(1-bend)*.9375*t+bend*.047*(Math.exp(4.55*t)-1)); if(i===0)c.moveTo(xx,yy);else c.lineTo(xx,yy); } c.stroke();c.restore(); } } const box=s.k(2,5.1,5.6,d.E.out3); if(box>0){ const word='Better.',first=Math.round(4*s.k(2,5.55,6.28,L)), erase=Math.round(3*s.k(2,6.48,6.96,L)),again=Math.round(6*s.k(2,7.1,8.4,L)), count=Math.min(7,first-erase+again); const b=text(word.slice(0,count),223,395,220,{font:'800 SIZEpx system-ui,sans-serif',color:'#101010'}); const full=text(word,223,395,220,{font:'800 SIZEpx system-ui,sans-serif',show:0}); d.select(195,375,full.w+62,full.h+44,{a:box}); if(count<7)d.rect(228+(count?b.w:0),423,4,199,'#131313',box*(.5+.5*Math.cos(s.t*7))); } } });