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.

1.0 KB
Raw Blame

function drawScene(t){bg();const x=320,w=360;for(let i=0;i<34;i++){rect(x,28+i*16,w*(.55+rand(i)*.4),2,i===6||i===29?'#b7c42a':'#68685e')}text('ORIGINS',500,30,15,'#252520','center','monospace',700);const a=[[270,90,245,190],[550,60,200,220],[250,330,240,190],[600,325,190,220],[380,185,270,230]];a.forEach(([x,y,w,h],i)=>{let u=phase(t,.25+i*.33,.45+i*.33)*(1-phase(t,8.05+(4-i)*.13,8.23+(4-i)*.13));alpha(u,()=>at(x+w/2,y+h/2,mix(.94,1,u),0,()=>{rect(-w/2,-h/2,w,h,'#242421',5);[0,1,2].forEach(k=>ellipse(-w/2+9+k*8,-h/2+9,2,2,CONFIG.palette[k+2]||'#fff'));if(i===4){P.title.split('\n').forEach((v,j)=>fittedText(v,0,-20+j*32,25,'#fff',w-22,'monospace',700));text('BY '+CONFIG.brand,0,75,10,'#aaa')}else if(i===1){let jump=sin(t*6)*6;rect(-28,-15+jump,56,35,P.accent);for(let k=-1;k<2;k++)rect(k*17-5,15+jump,9,12,P.accent);rect(-14,-6+jump,6,6,'#222');rect(8,-6+jump,6,6,'#222')}else if(i===3)portrait(-w/2+8,-h/2+25,w-16,h-35,1,t);else{for(let j=0;j<7;j++)rect(-w/2+14,-h/2+35+j*19,(w-30)*(.3+rand(i*8+j)*.7),5,j%3? '#aaa':P.accent)}}))});}