Skip to content

The open-source full-stack studio for Opus 5.5 motion video. Reverse engineering for any video. Code video with HTML: recreate, edit and render. BYOA + BYOK · Motion.md · Images, Video, Music & Voice.

19.7 KB
Raw Blame
function f3Title(value=P.title,y=60,c=CONFIG.palette[1],size=34){fittedText(value,500,y,size,c,880,'Arial',650)}
function f3Panel(x,y,w,h,dark=false){rect(x,y,w,h,dark?'#101419':'#fbfcfb',10);rect(x,y,w,25,dark?'#252930':'#e6e9e6',10);[0,1,2].forEach(i=>ellipse(x+15+i*12,y+12,3,3,['#dd887b','#d8bd6d','#8aaf87'][i]));}
function f3Rows(x,y,w,n=6,c='#a5aaa5',lineh=25){for(let i=0;i<n;i++)rect(x,y+i*lineh,w*(.58+rand(i+5)*.4),4,c,2)}
function f3Table(x,y,w,h,n=7,c=P.accent){rect(x,y,w,h,'#fff',4);for(let i=0;i<n;i++){line(x,y+30+i*(h-30)/n,x+w,y+30+i*(h-30)/n,'#dedfdf');text(['Name','Source','Status'][i%3],x+16,y+15+i*(h-30)/n,12,'#555','left');rect(x+w*.6,y+8+i*(h-30)/n,w*.23,13,i%2?c:'#dcdedc',5)}}
function f3Phone(x,y,w,h,t,tilt=0){at(x+w/2,y+h/2,1,tilt,()=>{rect(-w/2,-h/2,w,h,P.accent,28);rect(-w/2+8,-h/2+8,w-16,h-16,'#fff',22);rect(-24,-h/2+13,48,7,'#18211a',4);text('Savings',0,-h*.31,14,'#333');ellipse(0,0,w*.31,w*.31,null,'#ccc');ctx.strokeStyle=P.accent;ctx.lineWidth=6;ctx.beginPath();ctx.arc(0,0,w*.31,-Math.PI/2,-Math.PI/2+TAU*clamp(t));ctx.stroke();text('$'+Math.round(t*500)+'.00',0,0,26,'#131913','center','Arial',700);rect(-w*.36,h*.31,w*.72,24,P.accent,12)})}
function drawScene(t){bg();const m=CONFIG.mechanism,d=CONFIG.duration,n=stageAt(t),u=stageProgress(t),fg=CONFIG.palette[1];
 if(m==='context'){for(let i=0;i<50;i++){let x=i<25?75+(i%5)*15:850+(i%5)*15,y=190+Math.floor(i%25/5)*18;ellipse(x,y,2,2,'#55555533')}if(t<4){let a=phase(t,.4,2)*(1-phase(t,3,4));for(let i=0;i<49;i++){let r=55+30*sin(i*2.3),ang=i*TAU/17;ellipse(500+cos(ang)*r*a,250+sin(ang)*r*a,5,5,null,'#dddddd99')}text(useTitle('Agents'),500,370,22,fg,'center','monospace')}else if(t<10){const phrase='They are only as good as their ';text(progressText(phrase,phase(t,5,7.5)),425,300,23,fg,'center','monospace');alpha(phase(t,7.6,8.3),()=>{text(useTitle('context'),735,300,23,P.accent,'center','monospace',190);ellipse(735,300,80,80,null,'#dddddd99')})}return;}
 if(m==='slack'){let assemble=phase(t,.7,2),word=phase(t,2.4,3);let gx=mix(500,330,word),gy=300;const cols=['#2eb6d3','#2ca77a','#eab52c','#db1655'];cols[0]=P.accent;for(let i=0;i<4;i++){let a=i*TAU/4+Math.PI/4,rr=mix(170,54,assemble);at(gx+cos(a)*rr,gy+sin(a)*rr,1,a+Math.PI/4,()=>{rect(-16,-16,32+58*assemble,32,cols[i],16);ellipse(-28,-32,14,14,cols[i])})}alpha(word,()=>fittedText(P.title,625,300,112,'#050505',490,'Arial',750));if(t>7.75){bg();at(500,300,1,-.28,()=>{for(let i=0;i<2;i++){rect(-65+i*72,-115,32,230,cols[i],16);rect(-115,-65+i*72,230,32,cols[i+2],16)}})}return;}
 if(m==='prime'){for(let j=0;j<24;j++)for(let i=0;i<40;i++){let x=20+i*25,y=385+j*12+sin(i*.2+j*.3+t*.2)*20;ellipse(x,y,1,1,'#bfae7e33')}if(t<5){f3Title(P.title,260,fg,60);text('A SELF-IMPROVING HARNESS',500,325,18,fg,'center','monospace');return;}f3Panel(170,100,660,420,true);const lines=['In [1]: auth, api = await gather(tasks)','  tool(auth-flow) → answer','In [2]: create_memory(pattern)','In [3]: refine.run(skill)','  reviewer → agent → result'];if(t<23){text(CONFIG.stages[n].label,200,155,20,fg,'left','monospace');lines.forEach((s,i)=>text(progressText(s,clamp((t-8)/3-i*.15)),200,210+i*43,15,i%2?P.accent:fg,'left','monospace',580));for(let i=0;i<3;i++){rect(220+i*180,440,150,35,'#282a2d',3);text(['kernel','subagent','memory'][i],295+i*180,458,13,fg,'center','monospace')}}else if(t<34){for(let i=0;i<25;i++){let x=220+(i%5)*48,y=180+Math.floor(i/5)*48;rect(x,y,36,36,(i+Math.floor(t*2))%3?P.accent:'#de8355')}text((Math.min(95.54,(t-23)*17)).toFixed(2)+'%',660,280,60,fg);text('RESULTS',660,350,16,fg,'center','monospace')}else if(t<38){for(let i=1;i<20;i++)line(220+(i-1)*25,430-Math.pow((i-1)/20,2)*220,220+i*25,430-Math.pow(i/20,2)*220,P.accent,3);text('TASK PROGRESS',500,170,20,fg)}else{text('> install '+useTitle('prime-agent'),500,300,20,fg,'center','monospace',580)}fittedText(P.title,500,555,22,fg);return;}
 if(m==='inbox'){glow(500,480+sin(t)*80,650,P.accent+'77');glow(500,210,360,'#17c7b344');let z=phase(t,.5,5),ww=mix(450,900,z),yy=mix(210,275,z);alpha(phase(t,5,7),()=>text(P.title,500,155,104,'#fff','center','Arial',900,880));f3Panel(500-ww/2,yy,ww,430,true);text('Inbox',535-ww/2,yy+60,18,'#fff','left');for(let i=0;i<8;i++){let y=yy+95+i*37;line(535-ww/2,y+20,460+ww/2,y+20,'#26302c');text(['Product feedback','Your new project','A question about delivery'][i%3],670-ww/2,y,13,i%3?'#999':'#e3eee6','left');rect(540-ww/2,y-8,38,12,i%2?'#2a4c37':P.accent,4)}return;}
 if(m==='coins'){gradient('#3f3f3f','#0e0e0e');f3Title(P.title,85,'#fff',35);text('Stablecoin',500,123,16,'#ccc');ellipse(500,390,290,140,'#090909','#777');ellipse(500,378,285,135,'#242424','#999');const coins=[0,1].map(i=>{let a=t/5.25*TAU+i*Math.PI;return{x:500+cos(a)*190,y:375+sin(a)*75,s:.88+.12*sin(a),i}}).sort((a,b)=>a.y-b.y);coins.forEach(o=>at(o.x,o.y,o.s,0,()=>{ellipse(0,6,52,24,'#080808');ellipse(0,0,52,24,o.i?'#ddd':'#111',P.accent);text('↔',0,0,40,o.i?'#222':'#eee')}));text('Paired orbit · shared plane',500,555,14,'#ccc');return;}
 if(m==='airtable-app'){const color=t<25?'#65a9be':t<40?'#174e3e':'#efa17f';bg(color);f3Title();const complete=phase(t,t<25?16:32,t<25?22:39);f3Panel(320,135,600,380);rect(335,173,100,320,P.accent,5);text(t<25?'Campaigns':t<40?'Feedback':'Research',460,194,22,'#222','left');rect(55,250,230,125,'#ffffffbb',15);text(progressText(useTitle('Create an app'),phase(t,12,15)),75,290,18,'#222','left','Arial',500,195);f3Rows(75,335,160,2,'#367684');if(t<25){for(let j=0;j<3;j++)rect(460+j*140,235,120,80,j?'#e8efe7':'#dcf1d3',5);for(let j=0;j<5;j++)rect(480+j*68,445-(30+j*16)*complete,40,(30+j*16)*complete,P.accent,4);ellipse(590,285,24,24,null,P.accent)}else f3Table(460,235,425,240,7,t<40?'#ac5cc0':P.accent);if(t<11){bg('#dce4e5');f3Panel(130,80,740,450);rect(150,120,120,380,'#198c78');for(let i=0;i<18;i++){line(290+i*30,130,290+i*30,505,'#bdd4cf');line(290,140+i*20,850,140+i*20,'#c1d7d2')}for(let i=0;i<9;i++)ellipse(325+rand(i)*470,165+rand(i+6)*280,5,5,P.accent)}return;}
 if(m==='interfaces'){f3Title();f3Panel(90,110,820,410,true);if(t<9){const rot=sin(t)*.1;at(460,320,1,rot,()=>{rect(-110,-80,220,130,'#989c9d',35);rect(-115,35,230,55,'#babebe',25);line(-90,75,-110,140,'#604239',10);line(90,75,110,140,'#604239',10);for(let i=0;i<3;i++)ellipse(-65+i*65,-30+i*30,8,8,P.accent)});for(let i=0;i<3;i++){rect(685,175+i*80,185,45,'#313a46',8);text('Note '+(i+1),705,198+i*80,16,'#eee','left')}}else if(t<19){const pts=[[480,175],[300,270],[660,270],[300,390],[660,390],[480,470]];[[0,1],[0,2],[1,3],[2,4],[3,5],[4,5]].forEach(([a,b])=>line(...pts[a],...pts[b],P.accent,2));pts.forEach(([x,y],i)=>{rect(x-60,y-20,120,40,i===Math.floor(t)%6?'#bdebd3':'#e4e8eb',7);text(['Start','Research','Design','Marketing','Testing','Launch'][i],x,y,15,'#111')})}else if(t<24){rect(115,150,500,340,'#e1e8dd');for(let i=0;i<14;i++){line(130+i*35,150,160+i*35,490,'#b8c7bf');line(115,165+i*25,615,160+i*25,'#b8c7bf')}for(let i=0;i<8;i++)ellipse(160+rand(i)*400,175+rand(i+4)*270,6,6,P.accent);f3Rows(650,190,200,10)}else if(t<30){for(let i=0;i<3;i++){rect(125,155+i*105,735,90,'#29333d',7);rect(145,170+i*105,155,60,'#718a8c',3);text('Conference room '+(i+1),330,190+i*105,19,'#eee','left');rect(720,185+i*105,115,30,P.accent,5)}if(t>26&&t<28){rect(330,230,350,180,'#263141',15);text('Book room',500,270,24,'#fff');rect(385,340,240,35,P.accent,5)}if(t>=28)text('✓ Booking confirmed',500,440,28,'#8deb9d')}else{ellipse(480,310,130,100,'#e5b39c');for(let i=0;i<8;i++){let a=i*TAU/8;ellipse(480+cos(a)*155,310+sin(a)*125,20,20,i<5?P.accent:'#c5cdcf')}f3Rows(705,170,160,10)}return;}
 if(m==='versions'){gradient('#edf7f8','#d3ebef');glow(500,300,270,'#ffffffaa');let ver=t<3?String(Math.min(6,1+Math.floor(t*2))):t<4?'6':t<7?'':t<8?'Essential':t<9?'Pro':'';rect(220,268,60,60,'#fff',13);for(let i=0;i<3;i++)line(233,283+i*10,265-i*5,283+i*10,P.accent,3);fittedText(P.title+(ver?' '+ver:''),570,300,53,t>5&&t<7?P.accent:'#101a20',590,'Arial',500);return;}
 if(m==='cash-vertical'){bg('#181818');saved(()=>{ctx.beginPath();ctx.rect(340,0,320,600);ctx.clip();rect(340,0,320,600,t<2||t>8.7&&t<10.2?P.accent:t>3.8&&t<5.7?'#111':'#d8d8d8');if(t<2){rect(465,240,70,70,'#fff',15);text('$',500,275,50,P.accent)}else if(t<8.7){text(useTitle(t<4?'Bank on Cash App.':t<5.7?'Earn on your savings':'Get paid faster'),500,110,28,t>3.8&&t<5.7?'#fff':'#111','center','Arial',750,280);f3Phone(407,220,190,330,phase(t,4,7.8),-.18+sin(t*.7)*.03)}else if(t<10.2){['$0','Monthly','Fees'].forEach((v,i)=>{const sel=Math.floor((t-8.7)*2)%3===i;if(sel)rect(380,190+i*70,240,60,'#111',30);text(v,500,220+i*70,42,sel?'#fff':'#111','center','Arial',800)})}else{rect(340,0,320,600,'#101010');text(P.title,500,275,30,'#fff','center','Arial',750,280);rect(478,340,44,44,P.accent,9);text('$',500,362,30,'#fff')}});return;}
 if(m==='cash-grid'){const boxes=[[20,20,145,220],[175,20,210,140],[395,20,210,140],[615,20,195,140],[820,20,160,420],[20,250,145,150],[175,170,140,230],[325,170,270,170],[605,170,205,170],[20,410,295,170],[325,350,170,230],[505,350,180,230],[695,450,285,130]];boxes.forEach(([x,y,w,h],i)=>{let col=i%4===0?P.accent:i%4===1?'#dededc':i%4===2?'#a65ce1':'#202323';rect(x,y,w,h,col,12);saved(()=>{ctx.beginPath();ctx.roundRect(x,y,w,h,12);ctx.clip();if(i===4){text(useTitle(['Make Money Moves','Save more','Instant Discounts','No Monthly Fees'][Math.min(3,Math.floor(t/2))]),x+w/2,y+h/2,32,'#0a160c','center','Arial',800,w-18)}else if(i===11){f3Phone(x+w*.2,y+15,w*.6,h-25,frac(t*.2),.06)}else if(i%3===0){ellipse(x+w/2+sin(t+i)*w*.18,y+h/2,Math.min(w,h)*.28,Math.min(w,h)*.28,i%2?'#101b13':P.accent,'#343b34');for(let j=0;j<3;j++)ellipse(x+w/2,y+h/2,Math.min(w,h)*(.15+j*.06),Math.min(w,h)*.3,null,'#122b1c')}else{at(x+w/2,y+h/2,1,sin(t*.5+i)*.14,()=>{rect(-w*.24,-h*.26,w*.48,h*.52,i%2?P.accent:'#171d19',15);text('$',0,0,42,i%2?'#101010':P.accent)})}})});return;}
 if(m==='telegram'){gradient('#092b60','#3052af');rect(345,18,310,564,'#111b29',30);rect(355,29,290,540,'#172433',24);text(P.title,500,77,20,'#fff','center','Arial',600,260);line(370,108,630,108,'#324152');if(t<2){ellipse(500,230,46,46,P.accent);text('✦',500,230,55,'#fff');text('Your new assistant',500,328,21,'#fff');rect(385,427,230,42,P.accent,9);text('Create a bot',500,448,16,'#fff')}else if(t<4.7){text('Create your bot',385,145,22,'#fff','left');['Name','Username'].forEach((s,i)=>{text(s,385,210+i*100,13,'#7c9bb3','left');rect(380,230+i*100,240,45,'#24374a',7);text(progressText(i?'my_agent_bot':'My agent',phase(t,2.4+i*.7,3.2+i*.7)),395,252+i*100,17,'#fff','left')});rect(385,460,230,40,P.accent,9);text('Create',500,480,16,'#fff')}else if(t<6.4){ellipse(500,240,45,45,P.accent);text('✓',500,240,44,'#fff');text('Your bot is ready',500,330,21,'#fff');rect(385,440,230,40,P.accent,9);text('Start',500,460,16,'#fff')}else if(t<9.3){rect(480,150,135,40,'#377a6a',10);text('/start',548,170,16,'#fff');alpha(phase(t,6.5,7.4),()=>{rect(375,220,245,125,'#293b4b',10);text('Hello! I can help.',395,250,19,'#fff','left');f3Rows(395,285,190,2,'#8da8bb',22)});rect(375,482,245,45,'#22384c',10);text('Message',395,505,15,'#99adbf','left')}else{ellipse(500,205,52,52,P.accent);text('My agent',500,295,24,'#fff');f3Rows(395,350,200,3,'#648095',30);rect(385,470,230,40,P.accent,9);text('Open app',500,490,16,'#fff')}if(t>1.4&&t<2.1){ellipse(545,449,14+phase(t,1.4,2.1)*25,14+phase(t,1.4,2.1)*25,null,'#fff')}return;}
 if(m==='think'){bg('#e5e6e7');const pull=phase(t,0,.86),s=mix(2.8,1,pull);at(500,300,s,-.04*(1-pull),()=>{for(let j=20;j>=0;j--){text(P.title,j*.75,-j*.7,150,j===0?'#f5f5f6':j%2?P.accent:'#593bdd','center','Arial',800)} });return;}
 if(m==='watson'){bg('#f1f1f1');let radius=t<8?mix(440,155,phase(t,3,8)):t<27?170:145;let cx=t<9?500:300,cy=310;for(let i=0;i<95;i++){let k=i/95,a=k*TAU,rx=radius*(.3+.7*Math.abs(cos(a+t*.1)));ellipse(cx+sin(a+t*.25)*radius*.2,cy+cos(a)*radius*.06,rx,radius*.9,null,i%3?P.accent+'55':'#b5a2dc66')}if(t>9&&t<27){const title=t<15?'watsonx.ai':t<21?'watsonx.data':'watsonx.governance';text(useTitle(title),560,230,34,'#1d1638','left','Arial',500,410);const words=t<15?['Generative AI','Machine learning']:t<21?['Fast','Flexible','Open']:['Responsible','Transparent','Explainable'];words.forEach((s,i)=>text(s,560,310+i*44,22,'#51435b','left'))}else if(t>=27)f3Title(P.title,110,'#262035',50);else if(t<3)f3Title(P.title,90,'#262035',38);return;}
 if(m==='luggage'){bg('#d1ebe6');const shift=frac(t/4.8)*220;for(let row=-1;row<4;row++)for(let col=-1;col<6;col++){let x=col*230+row*100-shift,y=row*210+80;at(x,y,1,-.25+sin(t*1.3)*.08,()=>{rect(-14,-75-phase(t,1,2)*25,28,55,'#1d2c36',5);rect(-58,-50,116,140,'#1d2c36',14);for(let k=0;k<3;k++)line(-29+k*29,-20,-29+k*29,65,'#466069',3);ellipse(-35,96,8,8,'#192730');ellipse(35,96,8,8,'#192730')})}rect(180,220,640,160,'#d1ebe6ee',8);const title=P.title===CONFIG.demoTitle?'PLAN ON A\nGOOD TIME':P.title;title.split('\n').forEach((s,i)=>text(s,500,268+i*66,64,P.accent,'center','Arial',900,900));return;}
 if(m==='refuel'){bg('#112e34');f3Title(P.title,70,'#f3e8c7',30);rect(390,350,300,160,P.accent,25);rect(560,389,155,65,'#567cb2',10);ellipse(595,421,8,8,'#c7cbd5');poly([[220,175],[370,175],[430,280],[390,320],[315,235],[220,235]],'#e5aa7c');poly([[330,220],[385,205],[490,273],[474,310],[395,266]],'#284b56');ctx.strokeStyle='#557276';ctx.lineWidth=18;ctx.beginPath();ctx.moveTo(230,185);ctx.bezierCurveTo(80,50,125,350,215,420);ctx.stroke();for(let i=0;i<6;i++){let f=frac(t/1.2+i*.17),x=470+f*90,y=300+f*135;at(x,y,1,sin(t+i)*.2,()=>{if(i%3===0){rect(-17,-10,34,20,'#91a777',2);ellipse(0,0,6,6,null,'#d1dfad')}else{ellipse(0,0,12,12,'#e3b85f','#ffdc81');text('$',0,0,15,'#866a30')}})}return;}
 if(m==='wabi'){bg('#f8f8f5');f3Title(P.title,56,'#111',32);const orb=(x,y,r)=>{glow(x,y,r*2,P.accent+'77');glow(x+r*.25,y-r*.2,r*1.2,'#ee979755');ellipse(x,y,r,r,'#ffffff44')};if(t<5||t>71){orb(500,310,120);text(t>77?P.title:'A new kind of messenger',500,500,28,'#111');return;}rect(345,115,310,440,'#151515',30);rect(353,123,294,424,'#fff',23);rect(465,130,70,12,'#111',6);let phaseT=t%20;if(t>62&&t<71){for(let i=0;i<7;i++){let a=(-.9+i*.3);at(500+sin(a)*340,270+cos(a)*-100,1,a*.2,()=>{rect(-45,-45,90,90,['#b1b5de','#e2b1d1','#d3dfa8'][i%3],16);text(['✦','✓','♥'][i%3],0,0,30,'#444')})}text('Your home',500,400,25,'#111');return;}text(t>44&&t<55?'Shared pet':t<18?'Trip planner':t<30?'Friends':'Personal tasks',500,175,23,'#111');if(t>48&&t<54){ellipse(500,315,70,70,P.accent);ellipse(477,300,6,6,'#222');ellipse(523,300,6,6,'#222');text('♥',500,350,24,'#fff');rect(400,450,200,35,'#e9e6f2',12);text('Care together',500,467,16,'#333')}else{rect(390,225,230,60,'#f0eef5',13);text(progressText(t>40?'Create a shared pet':'Plan something together',phase(t%10,0,2)),405,252,17,'#333','left','Arial',400,205);alpha(phase(t%10,2,3),()=>{rect(380,320,230,150,'#e4e8f3',15);text(t<18?'Your itinerary':'New app',400,350,22,'#333','left');f3Rows(400,388,170,3,'#aaa4bf',25);rect(430,430,150,25,P.accent,8)})}return;}
 if(m==='treasury'){bg('#fafafa');f3Title(P.title,60,'#171717',32);f3Panel(120,120,760,410);text('Treasury',155,175,22,'#222','left');if(t<8||t>14&&t<18){text('$250,000.00',500,260,52,'#191919','center','Arial',650);const p=t<8?.35:mix(.35,.72,phase(t,14,16));rect(220,330,560,40,'#dededc',6);rect(220,330,560*p,40,P.accent,6);text('Available balance',220,395,16,'#666','left');rect(650,430,140,40,P.accent,7);text('Move',720,450,17,'#fff')}else if(t<14){rect(310,170,380,315,'#f2f3f1',12);text(t<13?'Move funds':'Review transfer',350,210,24,'#222','left');text('From balance → Treasury',350,260,16,'#555','left');rect(345,290,310,65,'#fff',8);text('$'+Math.round(10000*phase(t,9,11)).toLocaleString(),500,323,34,'#171717');rect(345,405,310,45,P.accent,8);text(t<13?'Continue':'Confirm',500,428,18,'#fff')}else if(t<22){for(let i=0;i<10;i++){let h=(50+i*16)*phase(t,18,20.5);rect(180+i*66,445-h,42,h,P.accent,3);rect(180+i*66,445-h-15-i*3,42,15+i*3,'#52a76d',3)}text('Balance over time',500,190,24,'#222')}else if(t<27){['Bank account','Card','Transfer'].forEach((s,i)=>{rect(240,205+i*80,520,60,'#ededeb',7);ellipse(280,235+i*80,15,15,P.accent);text(s,320,235+i*80,20,'#333','left')})}else{bg('#fff');f3Title(P.title,300,'#111',52);ellipse(500,190,35,35,P.accent)}return;}
 if(m==='hyperos'){gradient('#e4f3ff','#d8e0ee');f3Title(P.title,60,'#18212c',34);function device(x,y,s){at(x,y,s,0,()=>{rect(-110,-205,220,410,'#435064',28);rect(-103,-198,206,396,'#aacddd',22);glow(0,-40,200,P.accent+'66');text('09:41',0,-118,48,'#fff','center','Arial',300);for(let i=0;i<12;i++)rect(-82+i%4*44,20+Math.floor(i/4)*48,32,32,['#f2d0bc',P.accent,'#a8c8c0'][i%3],9)})}if(t<4){for(let i=0;i<3;i++)at(280+i*230,300,1,sin(t)*.13,()=>{rect(-100,-110,200,220,'#ffffff77',55);rect(-93,-103,186,206,P.accent+'44',50)});}else if(t<28){device(500,340,.95);if(t>9&&t<14){rect(370,310,260,120,'#f3faffdd',25);ellipse(415,365,25,25,P.accent);text('Now playing',525,350,20,'#284052');line(470,388,595,388,'#7897aa',4)}}else if(t<38){device(500,340,.8);for(let i=0;i<4;i++){const angle=i*TAU/4+t*.08;let x=500+cos(angle)*280,y=340+sin(angle)*150;rect(x-88,y-55,176,110,'#ffffffdd',22);text(['Calendar','Music','Weather','Notes'][i],x,y-15,19,'#31465a');rect(x-50,y+18,100,8,P.accent,4)}}else if(t<45){rect(130,160,740,360,'#4e5e6c',25);rect(140,170,720,340,'#dbe8ef',20);for(let i=0;i<12;i++){rect(175+i%4*170,220+Math.floor(i/4)*83,145,60,i%2?'#fff':P.accent+'55',12);f3Rows(195+i%4*170,245+Math.floor(i/4)*83,100,2,'#99b2c3',14)}}else{[.65,.8,.65].forEach((s,i)=>device(280+i*220,340,s))}return;}
 if(m==='sketchcode'){bg('#0f1319');for(let i=0;i<30;i++){line(i*40,0,i*40,600,'#242a3266');line(0,i*40,1000,i*40,'#242a3266')}f3Title(P.title,55,'#eeedf1',36);if(t<9||t>74){text(useTitle(t<4?'Visual intelligence':t<9?'Sketch = Code':'Built from your ideas'),500,300,56,'#eee','center','Arial',650,850);rect(475,390,50,7,P.accent,3);return;}rect(55,120,410,420,'#e8e7e0',10);rect(490,120,455,420,'#1e2330',10);text('INPUT',80,145,13,'#555','left','monospace');text(t%20<12?'CODE':'RESULT',520,145,13,'#bbb','left','monospace');const p=phase(t,9,16);if(t<21){line(100,210,415,210,'#777',2);for(let i=0;i<3;i++){ctx.strokeStyle='#777';ctx.strokeRect(100,250+i*75,90,55);line(220,260+i*75,410,260+i*75,'#777');line(220,280+i*75,345,280+i*75,'#777')}if(p<.6){for(let i=0;i<11;i++)text(progressText(['const app = createPlayer()','return <MusicLibrary />','  tracks.map(renderTrack)'][i%3],clamp(p*3-i*.1)),520,195+i*27,15,i%2?P.accent:'#d7dde9','left','monospace',390)}else{rect(520,180,395,120,P.accent,10);text('Your music',545,240,28,'#fff','left');for(let i=0;i<3;i++){rect(520,330+i*55,45,40,['#e5b96d','#7ab09a',P.accent][i]);text('Track '+(i+1),585,351+i*55,20,'#eee','left')}}}else{for(let i=0;i<16;i++){let x=90+i%4*90,y=200+Math.floor(i/4)*70;rect(x,y,65,50,i%3?P.accent:'#d6b364',8)}for(let i=0;i<12;i++)line(530,220+i*20,900,220+i*20,P.accent,2+sin(i+t)*1.5);text('Generated composition',710,495,23,'#eee')}return;}
 if(m==='slides'){gradient('#032329','#131c31');glow(500,270,440,P.accent+'55');f3Title(P.title,55,'#fff',30);if(t<5){rect(270,250,460,90,'#ffffffdd',22);text(progressText('Create a presentation about growth',phase(t,1,3)),295,290,22,'#27313a','left','Arial',400,410);text(t>3.5?'Generating outline…':'',500,390,17,'#ddd')}else if(t<14){rect(300,125,400,415,'#25353c',15);['Overview','The challenge','Opportunity','Plan','Next steps'].forEach((s,i)=>{let y=180+i*62;rect(322,y-19,356,43,i===2&&t>9&&t<12?P.accent+'99':'#34484e',8);text((i+1)+'. '+s,340,y+2,19,'#edf4f5','left')});if(t>9&&t<12){rect(495,288,270,110,'#eeeef2',12);text('Edit this section',515,317,18,'#232b36','left');line(515,350,735,350,P.accent,3)}if(t>12){rect(352,477,296,35,P.accent,7);text('Generate slides',500,494,18,'#fff')}}else{for(let i=0;i<6;i++){let x=150+i%3*240,y=180+Math.floor(i/3)*180;rect(x,y,220,145,i%3===0?'#dadce9':i%3===1?'#466b9f':'#bfcac9',8);alpha(phase(t,16+i*.28,17.7+i*.28),()=>{text(['Overview','Why now','Growth','Our plan','Milestones','Next steps'][i],x+17,y+25,18,i%3===1?'#fff':'#26313b','left');for(let j=0;j<3;j++)rect(x+22+j*55,y+110-15*j,30,15+j*15,i%3===1?'#c2d5ee':P.accent,3)})}}return;}
 f3Title();
}