Deck.scene({ id:'office', title:'The Future of AI', enterWith:'fade', post:{tone:'none',bloom:0,vignette:0,grain:0,exposure:1}, beats:[{dur:0.6,hold:6},{dur:0.3,hold:5},{dur:10,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 uPaper,uDisc; void main(){ vec2 q=design(vUv); vec3 c=mix(vec3(1.),vec3(.970,.954,.921),uPaper); float edge=length(q-vec2(1390.,540.))-298.*uDisc; float disc=(1.-smoothstep(-1.,1.,edge))*smoothstep(0.,.02,uDisc); o=vec4(mix(c,vec3(.884,.175,.120),disc),1.); }`,'Office white and final red disc'), items:['Introduction','Benefits and challenges','Best practices','Next steps','Questions'], years:['2020','2030','2040','2050','2060','2070'], ticks:['0','20','40','60','80','100'], result:'Better.', heavy:'800 SIZEpx Arial,sans-serif' }; }, draw(s,d,r){ const L=d.E.lin, c=d.ctx2d; const agenda=s.k(1,0,.3,L); const strip=s.k(2,2.55,3.55); const bend=s.k(2,3.25,5.7); const clear=s.k(2,5.75,6.45,L); const paper=s.k(2,5.95,6.75); const disc=s.k(2,6.1,7.05,d.E.out3); r.bg.draw({uPaper:paper,uDisc:disc}); if(agenda<1){ d.text('The Future of AI',{x:960,y:410,size:104,font:'arial',align:'center',color:'#000000',alpha:1-agenda}); d.text('An Overview',{x:960,y:550,size:54,font:'arial',align:'center',color:'#808080',alpha:1-agenda}); } if(agenda>0){ const titleDelete=s.k(2,2.30,2.41,L); const titleAlpha=agenda*(1-titleDelete); const title=d.text('Agenda',{x:146,y:121,size:76,font:'arial',color:'#000000',alpha:titleAlpha}); const titleSelect=s.k(2,.22,.58)*(1-titleDelete)*agenda; if(titleSelect>0) d.select(title.x-16,112,title.w+32,100,{a:titleSelect}); for(let i=0;i<5;i++){ const y=276+i*115; const gone=s.k(2,.83+i*.28,.94+i*.28,L); const alpha=agenda*(1-gone); if(alpha>0){ d.text('•',{x:154,y:y+3,size:41,font:'arial',color:'#000000',alpha}); const row=d.text(r.items[i],{x:207,y,size:48,font:'arial',color:'#000000',alpha}); const mark=s.k(2,.23+i*.055,.54+i*.055)*(1-gone)*agenda; if(mark>0) d.select(135,y-7,row.x+row.w-116,70,{a:mark}); } } const frame=agenda*(1-strip); const left=989,right=1689,top=372,bottom=767; if(frame>0){ c.save(); c.globalAlpha=frame; c.fillStyle='#ffffff'; c.strokeStyle='#c8c8c8'; c.lineWidth=2; c.fillRect(890,258,892,628); c.strokeRect(890,258,892,628); c.strokeStyle='#dddddd'; c.beginPath(); for(let i=0;i<=5;i++){ const y=bottom-(bottom-top)*i/5; c.moveTo(left,y); c.lineTo(right,y); } c.stroke(); c.strokeStyle='#aaaaaa'; c.beginPath(); c.moveTo(left,top); c.lineTo(left,bottom); c.lineTo(right,bottom); c.stroke(); c.strokeStyle='#4472c4'; c.lineWidth=5; c.beginPath(); c.moveTo(1260,850); c.lineTo(1297,850); c.stroke(); c.restore(); d.text('AI Progress (Projected)',{x:1336,y:291,size:37,font:'arial',align:'center',color:'#595959',alpha:frame}); for(let i=0;i<=5;i++){ const x=left+(right-left)*i/5; const y=bottom-(bottom-top)*i/5; d.text(r.years[i],{x,y:781,size:26,font:'arial',align:'center',color:'#595959',alpha:frame}); d.text(r.ticks[i],{x:left-14,y:y-16,size:26,font:'arial',align:'right',color:'#595959',alpha:frame}); } d.text('Series 1',{x:1307,y:834,size:27,font:'arial',color:'#595959',alpha:frame}); } const line=agenda*(1-clear); if(line>0){ c.save(); c.globalAlpha=line; c.strokeStyle='#4472c4'; c.lineWidth=5+4*bend; c.lineCap='round'; c.lineJoin='round'; c.beginPath(); for(let i=0;i<=96;i++){ const t=i/96; const value=5+75*t*(1-bend)+bend*1.95*Math.expm1(5.1*t); const x=left+(right-left+80*bend)*t; const y=bottom-(bottom-top)*value/100; if(i===0) c.moveTo(x,y); else c.lineTo(x,y); } c.stroke(); c.restore(); } } const edit=s.k(2,6.48,6.94,d.E.out3); if(edit>0){ const first=s.k(2,6.95,7.69,L); const erase=s.k(2,7.92,8.37,L); const retype=s.k(2,8.59,9.72,L); const count=Math.round(6*first*(1-erase)+7*retype); const x=183,y=425,size=188; const word=d.text(r.result.slice(0,count),{x,y,size,font:r.heavy,color:'#111111',alpha:edit}); const empty=1-s.k(2,6.95,7.23); const w=Math.max(132+empty*45,word.w+58); d.select(x-25,400,w,270,{a:edit}); const caret=edit*(1-s.k(2,9.72,10,L)); if(caret>0) d.rect(x+word.w+5,454,4,174,'#111111',caret); } } });