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.1 KB
Raw Blame

function drawScene(t){bg();const k=stageAt(t);if(k===0||k>=8){poly([[90,45],[910,45],[800,510],[200,510]],'#030807','#59635d');saved(()=>{ctx.beginPath();ctx.moveTo(125,70);ctx.lineTo(875,70);ctx.lineTo(775,480);ctx.lineTo(225,480);ctx.closePath();ctx.clip();glow(500,800,570,'#397fb3');ellipse(500,720-sin(t*.3)*22,560,350,'#275684');for(let i=0;i<50;i++)ellipse(80+rand(i)*850,450+rand(i+2)*160,30+rand(i)*40,7,'#b0cad433')});if(k>=8)fittedText(P.title,500,235,58,'#eee8d9',750,'Georgia');return}const u=stageProgress(t);at(500,370,1,(k===3?.15:0),()=>{if(k===2){poly([[-140,170],[0,-300],[140,170]],'#29271e','#8f7752');line(0,145,sin(t*11)*130,-220,'#d9c397',13)}else if(k===6){for(let i=0;i<250;i++){let a=rand(i)*TAU+t*.2,r=rand(i+4)*210;ellipse(cos(a)*r,sin(a)*r,1.8,1.8,'#c4d3c0')}}else{ctx.lineWidth=k===4?36:6;ctx.strokeStyle=P.accent;ctx.beginPath();ctx.arc(0,100,270,Math.PI,TAU);ctx.stroke();for(let i=0;i<27;i++){let a=Math.PI+i*Math.PI/26;line(cos(a)*240,100+sin(a)*240,cos(a)*260,100+sin(a)*260,'#d8c39e',2)}line(0,100,cos(Math.PI+u*Math.PI)*225,100+sin(Math.PI+u*Math.PI)*225,'#e8d4b3',7)}});label('形状匹配剪辑 · 程序示意',30,565,'#9c998f');}