nexu-io/open-design / plugins/_official/examples/motion-windows-studio-launch
motion-windows-studio-launch
Verifiedexample.html
View on GitHub<!doctype html><html lang="en" data-composition-variables='[{"id": "brand", "type": "string", "label": "brand", "default": "HyperFrames", "maxLength": 32}, {"id": "product", "type": "string", "label": "product", "default": "Studio", "maxLength": 32}, {"id": "vendor", "type": "string", "label": "vendor", "default": "HeyGen", "maxLength": 32}, {"id": "platform", "type": "string", "label": "platform", "default": "Windows", "maxLength": 32}, {"id": "oldVendor", "type": "string", "label": "oldVendor", "default": "Microsoft", "maxLength": 32}, {"id": "announcement", "type": "string", "label": "announcement", "default": "HYPERFRAMES STUDIO\nNOW ON WINDOWS.", "maxLength": 44}, {"id": "problem", "type": "string", "label": "problem", "default": "Your PC ran into a problem.", "maxLength": 37}, {"id": "solution", "type": "string", "label": "solution", "default": "Until today, it didn’t have HyperFrames Studio.", "maxLength": 57}, {"id": "asksTitle", "type": "string", "label": "asksTitle", "default": "Hundreds of asks", "maxLength": 32}, {"id": "asksButton", "type": "string", "label": "asksButton", "default": "finally a solution", "maxLength": 32}, {"id": "setupTitle", "type": "string", "label": "setupTitle", "default": "Built for Windows", "maxLength": 32}, {"id": "system", "type": "string", "label": "system", "default": "Windows 10", "maxLength": 32}, {"id": "count", "type": "string", "label": "count", "default": "32", "maxLength": 32}, {"id": "prFirst", "type": "string", "label": "prFirst", "default": "#1890", "maxLength": 32}, {"id": "prUpdate", "type": "string", "label": "prUpdate", "default": "#3442", "maxLength": 32}, {"id": "feedbackHandle", "type": "string", "label": "feedbackHandle", "default": "@Miguel07Code", "maxLength": 32}, {"id": "fixTitle", "type": "string", "label": "fixTitle", "default": "We’ll fix them immediately.", "maxLength": 37}, {"id": "fixNote", "type": "string", "label": "fixNote", "default": "Well, depends on if @Miguel07Code is awake.", "maxLength": 53}, {"id": "domain", "type": "string", "label": "domain", "default": "hyperframes.dev", "maxLength": 32}, {"id": "primary", "type": "color", "label": "primary", "default": "#30dfae"}, {"id": "brandSymbol", "type": "image", "label": "brandSymbol", "default": "assets/brand-symbol.png"}, {"id": "editor", "type": "image", "label": "editor", "default": "assets/editor.png"}, {"id": "launchUi", "type": "image", "label": "launchUi", "default": "assets/launch-ui.png"}, {"id": "computer", "type": "image", "label": "computer", "default": "assets/computer.png"}, {"id": "bin", "type": "image", "label": "bin", "default": "assets/bin.png"}, {"id": "ask0", "type": "image", "label": "ask0", "default": "assets/ask-0.png"}, {"id": "ask1", "type": "image", "label": "ask1", "default": "assets/ask-1.png"}, {"id": "ask2", "type": "image", "label": "ask2", "default": "assets/ask-2.png"}, {"id": "ask3", "type": "image", "label": "ask3", "default": "assets/ask-3.png"}, {"id": "ask4", "type": "image", "label": "ask4", "default": "assets/ask-4.png"}, {"id": "ask5", "type": "image", "label": "ask5", "default": "assets/ask-5.png"}, {"id": "ask6", "type": "image", "label": "ask6", "default": "assets/ask-6.png"}, {"id": "ask7", "type": "image", "label": "ask7", "default": "assets/ask-7.png"}, {"id": "ask8", "type": "image", "label": "ask8", "default": "assets/ask-8.png"}, {"id": "ask9", "type": "image", "label": "ask9", "default": "assets/ask-9.png"}, {"id": "ask10", "type": "image", "label": "ask10", "default": "assets/ask-10.png"}, {"id": "ask11", "type": "image", "label": "ask11", "default": "assets/ask-11.png"}, {"id": "ask12", "type": "image", "label": "ask12", "default": "assets/ask-12.png"}, {"id": "ask13", "type": "image", "label": "ask13", "default": "assets/ask-13.png"}, {"id": "ask14", "type": "image", "label": "ask14", "default": "assets/ask-14.png"}, {"id": "cloud0", "type": "image", "label": "cloud0", "default": "assets/cloud-0.png"}, {"id": "cloud1", "type": "image", "label": "cloud1", "default": "assets/cloud-1.png"}, {"id": "cloud2", "type": "image", "label": "cloud2", "default": "assets/cloud-2.png"}, {"id": "cloud3", "type": "image", "label": "cloud3", "default": "assets/cloud-3.png"}, {"id": "cloud4", "type": "image", "label": "cloud4", "default": "assets/cloud-4.png"}, {"id": "cloud5", "type": "image", "label": "cloud5", "default": "assets/cloud-5.png"}, {"id": "cloud6", "type": "image", "label": "cloud6", "default": "assets/cloud-6.png"}, {"id": "cloud7", "type": "image", "label": "cloud7", "default": "assets/cloud-7.png"}]'><head><meta charset="utf-8"><meta name="od-motion-output" content="video"><title>HyperFrames Windows Launch</title><style>
@font-face{font-family:Inter;src:url(assets/inter-variable.ttf);font-weight:100 900}
@font-face{font-family:Pixelify;src:url(assets/pixelify-sans.ttf);font-weight:400 700}
:root{--od-font-heading:"Inter","Noto Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;--od-font-body:"Pixelify","Noto Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif}*{box-sizing:border-box}body{margin:0;background:#111;display:grid;place-items:center;height:100vh;font-family:var(--od-font-body)}.od-heading{font-family:var(--od-font-heading)}#main{width:min(100vw,177.777vh);aspect-ratio:16/9;position:relative}canvas{width:100%;height:100%;display:block}#controls{position:fixed;bottom:12px;left:50%;transform:translateX(-50%);display:flex;gap:12px;padding:10px;background:#222c;color:white;align-items:center}#controls{opacity:0;transition:opacity .2s}#controls:hover,#controls:focus-within{opacity:1}#controls input{width:300px}html.od-export #controls{display:none}html.od-export body{display:block;background:none}html.od-export #main{width:1920px;height:1080px}
</style><style data-od-font-synthesis>html{font-synthesis:none}</style>
<style data-od-preview-chrome>
#controls{position:fixed;left:50%;bottom:14px;transform:translateX(-50%);z-index:100;display:flex;align-items:center;gap:14px;width:min(900px,92vw);box-sizing:border-box;padding:12px 18px;border-radius:14px;background:#101214dd;color:#fff;font:600 13px ui-monospace,Menlo,monospace;opacity:0;transition:opacity .2s}
#controls:hover,#controls:focus-within{opacity:1}
#controls button{font:inherit;letter-spacing:.06em;background:var(--accent,#3b6cf6);color:#fff;border:0;border-radius:999px;padding:9px 16px;cursor:pointer;min-width:88px;white-space:nowrap}
#controls input[type=range]{flex:1;width:auto;min-width:0;accent-color:var(--accent,#3b6cf6)}
#controls span,#controls output{white-space:nowrap;font-variant-numeric:tabular-nums}
html.od-export #controls{display:none!important}
</style>
</head><body><main id="main" data-composition-id="main" data-od-motion-layout="stage" data-start="0" data-duration="50.533333" data-width="1920" data-height="1080">
<audio id="soundtrack" src="assets/soundtrack.mp3" data-start="0" data-duration="50.533" data-track-index="2" data-volume="1" preload="auto"></audio><canvas width="1920" height="1080"></canvas></main><div id="controls"><button>PLAY</button><input type="range" min="0" step="0.01"><span>0.00 / 50.53</span></div><script src="assets/gsap.min.js"></script><script>
const VARS = (window.__hyperframes && window.__hyperframes.getVariables?.()) || {};
const CFG = {"duration": 50.533333, "scenes": [{"id": "boot", "name": "启动标志", "dur": 5.85, "minDur": 5.85, "maxDur": 8.85}, {"id": "desktop", "name": "桌面发布", "dur": 3.95, "minDur": 3.95, "maxDur": 6.95}, {"id": "launch", "name": "产品演示", "dur": 3.3, "minDur": 3.3, "maxDur": 6.3}, {"id": "bluescreen", "name": "蓝屏", "dur": 2.6, "minDur": 2.6, "maxDur": 5.6}, {"id": "asks", "name": "用户期待", "dur": 4.033, "minDur": 4.033, "maxDur": 7.033}, {"id": "document", "name": "文档播放器", "dur": 1.767, "minDur": 1.767, "maxDur": 4.7669999999999995}, {"id": "dance", "name": "吉祥物编辑", "dur": 4.233, "minDur": 4.233, "maxDur": 7.233}, {"id": "setup", "name": "安装向导", "dur": 5.534, "minDur": 5.534, "maxDur": 8.533999999999999}, {"id": "errors", "name": "报错弹窗", "dur": 4, "minDur": 4, "maxDur": 7}, {"id": "feedback", "name": "反馈与修复", "dur": 5.8, "minDur": 5.8, "maxDur": 8.8}, {"id": "modern", "name": "现代桌面", "dur": 2.6, "minDur": 2.6, "maxDur": 5.6}, {"id": "close", "name": "品牌收尾", "dur": 6.866333, "minDur": 6.866333, "maxDur": 9.866333000000001}], "cues": [{"id":"boot-morph","scene":"boot","at":3.65},{"id":"desktop-pointer","scene":"desktop","at":3.25},{"id":"desktop-select","scene":"desktop","at":3.75},{"id":"launch-open","scene":"desktop","from":"end","at":0.04},{"id":"close-type","scene":"close","at":3.433},{"id":"close-type-done","scene":"close","at":4.033},{"id":"dance-headphones","scene":"dance","at":2.57},{"id":"dance-confetti","scene":"dance","at":2.63},{"id":"close-dip","scene":"close","at":0.83},{"id":"close-leap","scene":"close","at":1.23},{"id": "boot-in", "scene": "boot", "at": 0}, {"id": "boot-out", "scene": "boot", "from": "end", "at": 0.75}, {"id": "desktop-in", "scene": "desktop", "at": 0}, {"id": "desktop-out", "scene": "desktop", "from": "end", "at": 0.15}, {"id": "launch-in", "scene": "launch", "at": 0}, {"id": "launch-out", "scene": "launch", "from": "end", "at": 0.15}, {"id": "bluescreen-in", "scene": "bluescreen", "at": 0}, {"id": "bluescreen-out", "scene": "bluescreen", "from": "end", "at": 0.15}, {"id": "asks-in", "scene": "asks", "at": 0}, {"id": "asks-out", "scene": "asks", "from": "end", "at": 0.15}, {"id": "document-in", "scene": "document", "at": 0}, {"id": "document-out", "scene": "document", "from": "end", "at": 0.15}, {"id": "dance-in", "scene": "dance", "at": 0}, {"id": "dance-out", "scene": "dance", "from": "end", "at": 0.15}, {"id": "setup-in", "scene": "setup", "at": 0}, {"id": "setup-out", "scene": "setup", "from": "end", "at": 0.55}, {"id": "errors-in", "scene": "errors", "at": 0}, {"id": "errors-out", "scene": "errors", "from": "end", "at": 0.15}, {"id": "feedback-in", "scene": "feedback", "at": 0}, {"id": "feedback-out", "scene": "feedback", "from": "end", "at": 0.15}, {"id": "modern-in", "scene": "modern", "at": 0}, {"id": "modern-out", "scene": "modern", "from": "end", "at": 0.15}, {"id": "close-in", "scene": "close", "at": 0}, {"id": "close-out", "scene": "close", "from": "end", "at": 0.15}], "brand": "HyperFrames", "product": "Studio", "vendor": "HeyGen", "platform": "Windows", "oldVendor": "Microsoft", "announcement": "HYPERFRAMES STUDIO\nNOW ON WINDOWS.", "problem": "Your PC ran into a problem.", "solution": "Until today, it didn’t have HyperFrames Studio.", "asksTitle": "Hundreds of asks", "asksButton": "finally a solution", "setupTitle": "Built for Windows", "system": "Windows 10", "count": "32", "prFirst": "#1890", "prUpdate": "#3442", "feedbackHandle": "@Miguel07Code", "fixTitle": "We’ll fix them immediately.", "fixNote": "Well, depends on if @Miguel07Code is awake.", "domain": "hyperframes.dev", "primary": "#30dfae", "brandSymbol": "assets/brand-symbol.png", "editor": "assets/editor.png", "launchUi": "assets/launch-ui.png", "computer": "assets/computer.png", "bin": "assets/bin.png", "ask0": "assets/ask-0.png", "ask1": "assets/ask-1.png", "ask2": "assets/ask-2.png", "ask3": "assets/ask-3.png", "ask4": "assets/ask-4.png", "ask5": "assets/ask-5.png", "ask6": "assets/ask-6.png", "ask7": "assets/ask-7.png", "ask8": "assets/ask-8.png", "ask9": "assets/ask-9.png", "ask10": "assets/ask-10.png", "ask11": "assets/ask-11.png", "ask12": "assets/ask-12.png", "ask13": "assets/ask-13.png", "ask14": "assets/ask-14.png", "cloud0": "assets/cloud-0.png", "cloud1": "assets/cloud-1.png", "cloud2": "assets/cloud-2.png", "cloud3": "assets/cloud-3.png", "cloud4": "assets/cloud-4.png", "cloud5": "assets/cloud-5.png", "cloud6": "assets/cloud-6.png", "cloud7": "assets/cloud-7.png",...VARS};
const SCENE_START={};CFG.scenes.reduce((t,s)=>(SCENE_START[s.id]=t,t+s.dur),0);
const cueTime=id=>{const c=CFG.cues.find(c=>c.id===id),s=CFG.scenes.find(s=>s.id===c.scene);return SCENE_START[c.scene]+(c.from==='end'?s.dur-c.at:c.at)};
const cv=document.querySelector('canvas'),ctx=cv.getContext('2d'),root=document.documentElement;
const heading=getComputedStyle(root).getPropertyValue('--od-font-heading'),bodyfont=getComputedStyle(root).getPropertyValue('--od-font-body');
const imgs={};const ready=Promise.all(Object.entries(CFG).filter(([k,v])=>typeof v==='string'&&v.startsWith('assets/')).map(([k,v])=>new Promise(ok=>{let a=new Image();a.onload=ok;a.onerror=ok;a.src=v;imgs[k]=a})));
const clamp=x=>Math.max(0,Math.min(1,x)),ease=x=>1-Math.pow(1-clamp(x),3),lerp=(a,b,u)=>a+(b-a)*u;
function rect(x,y,w,h,c){ctx.fillStyle=c;ctx.fillRect(x,y,w,h)}
function text(s,x,y,size=32,color='#000',weight=400,pixel=true){ctx.fillStyle=color;ctx.font=`${weight} ${size}px ${pixel?bodyfont:heading}`;ctx.textBaseline='top';ctx.fillText(s,x,y)}
function image(k,x,y,w,h){let a=imgs[k];if(a?.complete&&a.naturalWidth)ctx.drawImage(a,x,y,w,h)}
function round(x,y,w,h,r,c){ctx.fillStyle=c;ctx.beginPath();ctx.roundRect(x,y,w,h,r);ctx.fill()}
function line(x,y,X,Y,c,w=2){ctx.strokeStyle=c;ctx.lineWidth=w;ctx.beginPath();ctx.moveTo(x,y);ctx.lineTo(X,Y);ctx.stroke()}
function bevel(x,y,w,h,c='#c0c0c0'){rect(x,y,w,h,c);line(x,y,x+w,y,'#fff',3);line(x,y,x,y+h,'#fff',3);line(x+w,y,x+w,y+h,'#222',3);line(x,y+h,x+w,y+h,'#222',3)}
function symbol(x,y,w){image('brandSymbol',x,y,w,w*108/187)}
function cursor(x,y,s=1){ctx.save();ctx.translate(x,y);ctx.scale(s,s);ctx.beginPath();ctx.moveTo(0,0);ctx.lineTo(0,104);ctx.lineTo(23,83);ctx.lineTo(40,115);ctx.lineTo(55,106);ctx.lineTo(39,76);ctx.lineTo(73,76);ctx.closePath();ctx.fillStyle='white';ctx.fill();ctx.strokeStyle='#000';ctx.lineWidth=6;ctx.stroke();ctx.restore()}
const clouds=[[260,0,680,180],[640,0,1350,370],[1330,130,1920,455],[250,190,590,540],[500,330,820,650],[990,405,1340,670],[0,650,600,1010],[1120,660,1760,1010]];
function sky(t){let g=ctx.createLinearGradient(0,0,0,1080);g.addColorStop(0,'#2b6bc4');g.addColorStop(1,'#7bb8e5');rect(0,0,1920,1080,g);clouds.forEach((b,i)=>image('cloud'+i,b[0]+Math.sin(t*.6+i)*22,b[1]+Math.cos(t*.43+i)*10,b[2]-b[0],b[3]-b[1]));}
function modernBg(t){let g=ctx.createLinearGradient(0,0,300,1080);g.addColorStop(0,'#fffefb');g.addColorStop(.32,'#f3fcfa');g.addColorStop(.65,'#3fd3bc');g.addColorStop(1,'#128db8');rect(0,0,1920,1080,g);ctx.save();ctx.globalAlpha=.25;let r=ctx.createRadialGradient(1400+Math.sin(t)*150,900,0,1400,900,700);r.addColorStop(0,'#1681b5');r.addColorStop(1,'transparent');rect(0,0,1920,1080,r);ctx.restore()}
function desktop(t,era=0){sky(t);image('computer',89,40,69,68);image('bin',97,230,52,64);symbol(85,389,78);['My','Computer','Recycle Bin',CFG.brand,CFG.product,'launch.mp4'].forEach((s,i)=>{let yy=[126,158,311,459,490,649][i];ctx.font=`400 28px ${bodyfont}`;let xx=124-ctx.measureText(s).width/2;text(s,xx+2,yy+2,28,'#000');text(s,xx,yy,28,'white')});rect(101,560,45,65,'white');ctx.strokeStyle='black';ctx.lineWidth=3;ctx.strokeRect(101,560,45,65);rect(108,585,28,4,'#08006d');rect(108,598,28,4,'#08006d');
if(era===0){bevel(0,1010,1920,70);bevel(8,1022,210,51);symbol(23,1035,43);text('START',82,1033,31,'black',700)}else{let g=ctx.createLinearGradient(0,1010,0,1080);g.addColorStop(0,era===1?'#3984ed':'#8097b4');g.addColorStop(1,era===1?'#1652c4':'#203754');rect(0,1015,1920,65,g);symbol(25,1030,45);round(94,1020,90,56,4,'#ffffff35')}
}
function win(x,y,w,h,title,era=0){ctx.save();ctx.shadowColor='#0005';ctx.shadowBlur=era?20:0;ctx.shadowOffsetX=era?0:12;ctx.shadowOffsetY=era?16:14;rect(x,y,w,h,'#c0c0c0');ctx.restore();bevel(x,y,w,h,era?'#cce2f3':'#c0c0c0');let g=ctx.createLinearGradient(x,y,x+w,y);g.addColorStop(0,era===1?'#0060fb':'#080078');g.addColorStop(1,era===1?'#0047de':'#0789bd');rect(x+5,y+5,w-10,50,era===2?'#cfe5f8':g);text(title,x+18,y+12,30,era===2?'#17232c':'white');bevel(x+w-51,y+9,38,34);text('×',x+w-41,y+9,30);}
function mascot(x,y,s,t,headphones=false,hands=true,pose=null){ctx.save();ctx.translate(x,y+(pose?0:Math.sin(t*5)*9*s));ctx.rotate(pose?pose.angle:Math.sin(t*4)*.11);ctx.scale(s*(pose?pose.sx||1:1+.035*Math.sin(t*6)),s*(pose?pose.sy||1:1-.025*Math.sin(t*6)));ctx.fillStyle='#01cfe4';for(let k of (hands?[-1,1]:[])){ctx.save();ctx.translate(k*(pose?162:145),pose?pose.armY+Math.sin(t*10+k)*18:-15+Math.cos(t*6+k)*13);ctx.rotate(k*(pose?pose.armAngle:.3+Math.sin(t*5)*.3));if(pose)ctx.scale(1.3,1.3);ctx.beginPath();ctx.moveTo(-25,24);ctx.lineTo(22,13);ctx.quadraticCurveTo(30,10,23,1);ctx.lineTo(-6,-26);ctx.quadraticCurveTo(-12,-32,-16,-21);ctx.lineTo(-30,16);ctx.quadraticCurveTo(-33,26,-25,24);ctx.fill();ctx.restore()}const shape=new Path2D(pose?'M -62 -110 C -115 -115 -143 -65 -122 -12 L -38 169 C -20 210 24 210 42 168 L 120 -22 C 145 -80 112 -109 67 -112 Z':'M -85 -95 C -135 -90 -135 -25 -105 30 L -24 180 C -5 216 37 200 48 165 L 112 -22 C 140 -100 72 -110 20 -110 Z');ctx.fillStyle='#fff';if(pose?.shadow){ctx.shadowColor='#17343855';ctx.shadowBlur=25;ctx.shadowOffsetY=8;}ctx.fill(shape);ctx.shadowColor='transparent';ctx.save();ctx.translate(0,-1);ctx.scale(.79,.79);ctx.fillStyle=CFG.primary;ctx.fill(shape);ctx.restore();ctx.fillStyle='white';ctx.beginPath();ctx.ellipse(-35,-29,42,44,0,0,Math.PI*2);ctx.fill();let blink=Math.sin(t*2.35)> .985;round(-47,-36,6,blink?3:14,3,'#182126');round(-28,-36,6,blink?3:14,3,'#182126');if(headphones){ctx.save();if(pose?.phoneScale){ctx.translate(-35,-29);ctx.scale(pose.phoneScale,pose.phoneScale);ctx.translate(35,29);}ctx.strokeStyle='#182b27';ctx.lineWidth=13;ctx.beginPath();ctx.ellipse(-35,-20,65,76,0,Math.PI,Math.PI*2);ctx.stroke();round(-108,-28,24,48,12,'#163830');round(19,-28,24,48,12,'#163830');round(-101,-23,10,36,5,CFG.primary);round(26,-23,10,36,5,CFG.primary);ctx.restore()}ctx.restore()}
function editor(x,y,w,h,t,phones=true,performance=false){image('editor',x,y,w,h);let sx=w/1848,sy=h/1028;rect(x+480*sx,y+176*sy,1300*sx,731*sy,'#1f1f1f');
let d=t-cueTime('dance-headphones');
let pose=performance?{angle:phones?.23*Math.sin(d*10):.025,phoneScale:lerp(.42,1,ease(d/.22)),armY:phones?lerp(-10,-125+30*Math.sin(d*10),ease(d/.22)):-10,armAngle:phones?1.5+.6*Math.sin(d*10):.2,sx:1.08,sy:.98}:null;
mascot(x+(1115+(performance&&phones?20*Math.sin(d*10):0))*sx,y+(540+(performance&&phones?-16-19*Math.sin(d*10):0))*sy,1.15*sx,t,phones,true,pose);
if(phones){ctx.save();ctx.beginPath();ctx.rect(x+480*sx,y+176*sy,1300*sx,731*sy);ctx.clip();for(let i=0;i<(performance?65:40);i++){let age=performance?t-cueTime('dance-confetti'):t;let xx=x+(performance?1100+Math.sin(i*7.13)*Math.min(720,age*1500)*( .4+(i%7)/10):600+(i*127%1100))*sx,yy=y+(performance?70+age*650+(i*89%290)-180:200+((i*89+t*100)%680))*sy;if(performance&&age<0)continue;ctx.save();ctx.translate(xx,yy);ctx.rotate(t*5+i);rect(0,0,(performance?13:10)*sx,6*sy,['#26cbb2','#04cbe0','#e9b630','#e44f33','#fff'][i%5]);ctx.restore()}ctx.restore()}}
function flag(x,y,w,t,m=0){ctx.save();ctx.translate(x,y);const phase=t*5.5;
const colors=['#f14425','#43b641','#2e7bd3','#ffcc17'],neon=['#76ed05','#39c654','#23cfca','#18e900'];
const pt=(u,v)=>[u*w+v*18*(1-m),v*w*.83+(1-m)*(23*Math.sin(phase-u*4)+14*Math.cos(u*3))-m*12*Math.sin(u*3)];
for(let r=0;r<2;r++)for(let c=0;c<2;c++){ctx.beginPath();for(let j=0;j<=20;j++){let a=pt(c*.5+j*.025,r*.5);j?ctx.lineTo(...a):ctx.moveTo(...a)}for(let j=0;j<=20;j++)ctx.lineTo(...pt((c+1)*.5-j*.025,(r+1)*.5));ctx.closePath();ctx.fillStyle=m>.3?neon[r*2+c]:colors[r*2+c];ctx.fill();ctx.strokeStyle='black';ctx.lineWidth=lerp(15,8,m);ctx.lineJoin='round';ctx.stroke();}
ctx.globalAlpha=1-m;for(let i=0;i<70;i++){let col=i%10,row=Math.floor(i/10),xx=-28-col*27,yy=15+row*55+Math.sin(phase-col*.5)*10;let size=(10-col)*1.5;rect(xx,yy,size,size,i%3===0?colors[row%4]:'#101116')}ctx.restore()}
function scramble(target,u,begin,end,seed){if(u<begin)return target;if(u>=end)return target;let chars='a0d7x3o4u9cnp';let f=clamp((u-begin)/(end-begin));return [...target].map((c,i)=>i/target.length<f*.8?c:chars[(i*7+Math.floor(u*23)+seed)%chars.length]).join('')}
function boot(u,t){sky(t);const morph=cueTime('boot-morph')-cueTime('boot-in');
if(u<morph+.43){flag(930,210,480,t,clamp((u-morph)/.43));}else{let out=ease((u-(cueTime('boot-out')-cueTime('boot-in')))/.75);symbol(lerp(900,85,out),lerp(260,389,out),lerp(520,78,out));}
if(u>.5){let out=ease((u-(cueTime('boot-out')-cueTime('boot-in')))/.75);ctx.save();ctx.globalAlpha=1-out;
text(u<morph?CFG.oldVendor:scramble(CFG.vendor,u,morph,morph+.65,3),210,655,50,'white',600,false);
if(u<morph)text(CFG.platform.slice(0,Math.ceil((u-.5)*12)),205,715,150,'black',900,false);
else{let name=scramble(CFG.brand,u,morph,morph+.85,5);text(name,205,715,150,'black',900,false);ctx.font=`900 150px ${heading}`;let x=205+ctx.measureText(name).width;let product=scramble(CFG.product,u,morph,morph+.85,9);ctx.globalAlpha*=clamp((u-morph)/.3);text(product,x,728,142,'white',300,false);}
ctx.restore()}}
function desktopPointer(t){let d=t-cueTime('desktop-pointer'),p=ease(d/.4);if(d>=0)cursor(lerp(1024,124,p),lerp(768,410,p),1.1);}
function desktopSelection(t){if(t>=cueTime('desktop-select')){rect(25,456,198,66,'#090078');text(CFG.brand,34,458,28,'white');text(CFG.product,80,489,28,'white');}}
function openingLaunch(t,u){let e=ease((t-cueTime('launch-open'))/.28);launch(lerp(124,456,e),lerp(410,37,e),lerp(8,1008,e),lerp(8,906,e),u+.55,t);bevel(225,1022,390,51);symbol(235,1035,33);text(CFG.brand+' '+CFG.product,277,1036,25);}
function launch(x,y,w,h,u,t,era=0){win(x,y,w,h,CFG.brand+' '+CFG.product,era);image('launchUi',x+5,y+60,w-10,h-65);ctx.save();ctx.translate(x+w*.375,y+h*.355);ctx.scale(w*.59/1920,h*.37/1080);boot(u%5.8,t);ctx.restore()}
function bsod(t,u,asks=false){desktop(t,2);win(448,52,1024,880,CFG.brand+' '+CFG.product,2);win(220,86,1480,862,CFG.platform,2);rect(230,134,1460,804,'#0078d3');if(!asks){text(':(',310,175,160,'white',400,false);if(u>.4)text(CFG.problem,316,396,49,'#d1ebfb',400,false);if(u>1.1)text(CFG.solution,316,462,45,'#d1ebfb',400,false);text('Stop code: STUDIO_NOT_FOUND',316,865,24,'#e5f2ff',400,false)}else{let order=[0,7,11,4,2,6,13,8,3,9,1,10,5,12,14];for(let n=0;n<15;n++){let i=order[n],v=ease((u-n*.12)/.3);if(v>0){ctx.save();ctx.globalAlpha=v;image('ask'+i,248+i%3*480,154+Math.floor(i/3)*156+(1-v)*50,464,140);ctx.restore()}}if(u>2.0){rect(230,134,1460,804,'#007bd9d9');text(':)',310,175,160,'white',400,false);text(CFG.asksTitle,300,400,126,'white',600,false);round(316,600,372,72,5,'white');text(CFG.asksButton,345,615,40,'#14618a',600,false);text('Stop code: STUDIO_NOT_FOUND',316,865,24,'#e5f2ff',400,false)}}}
function documentScene(t,u){sky(t);win(38,28,1844,1024,'Document1');text('File Edit View Insert Format Tools Table Window Help',60,96,29);line(46,136,1874,136,'white');text('▯ ▰ ▣ ▤ ⌕ ✂ ▣ ↶ ↷',62,149,31);bevel(57,200,195,35,'white');text('Normal',65,203,25);bevel(265,200,327,35,'white');text('Times New Roman',273,203,25);text('B I U ☰ ☰',637,200,30);rect(47,288,1827,714,'#808080');rect(426,316,1080,686,'white');rect(485,379,601,341,'#202020');mascot(785,535,.55,t);rect(554,679,500,7,'#666');text('▶',507,663,35,'#ddd',400,false);if(Math.sin(t*6)>0)rect(486,753,3,44,'black');}
function setup(t,u){sky(t);editor(96,60,860,478,t);win(292,90,1336,868,CFG.brand+' '+CFG.product+' Setup');let g=ctx.createLinearGradient(0,164,0,815);g.addColorStop(0,'#090079');g.addColorStop(1,'#008783');rect(312,164,356,650,g);for(let i=0;i<8;i++)rect(343+i*41%310,185+((i*89+t*16)%600),5,5,'#c4f5ee');bevel(390,390,200,150);rect(407,407,166,116,'#101a21');symbol(422,424,136);bevel(461,543,58,24);bevel(416,565,147,18);bevel(381,610,217,42);for(let i=0;i<9;i++)rect(397+i*20,621,14,8,'#888');text(CFG.setupTitle,705,180,60,'#000',700);text('Runs on '+CFG.system+' or later.',705,263,31);let phase=u<1.8?0:u<3.2?1:2;['Windows PRs merged','First Windows build','Updates itself'].forEach((s,i)=>{bevel(706,342+i*64,29,29,'white');text(i<=phase?'✓':'',711,337+i*64,32);text((i===0?CFG.count+' ':'')+s,753,342+i*64,32,i>phase?'#888':'#000')});bevel(1222,318,386,285,'white');text(phase===0?CFG.count:phase===1?CFG.prFirst:CFG.prUpdate,1255,389,48,'#08006c',700);let lines=phase===0?['Windows PRs merged']:phase===1?['each release also builds a','Windows x64 app']:['the Windows app','updates itself'];lines.forEach((s,i)=>text(s,1255,455+i*30,27));text(phase===0?'Sep 21 to Oct 23':phase===1?'merged Sep 21':'merged Oct 10',1255,phase===0?530:524,24,'#888');text('Building '+CFG.brand+' '+CFG.product+'...',705,652,30);bevel(706,690,903,54);let progress=clamp(u/4.3);for(let i=0;i<Math.floor(progress*20);i++)rect(713+i*45,697,39,40,'#090078');line(311,835,1609,835,'white');['< Back',phase===2?'Finish':'Next >','Cancel'].forEach((s,i)=>{bevel(969+i*220,862,197,59);text(s,1010+i*220,880,31)});cursor(1260+Math.sin(t)*5,900+Math.cos(t)*4,1.1)}
function dialog(x,y,w,h,title,copy,icon='i',button='OK'){win(x,y,w,h,title);ctx.fillStyle=icon==='!'?'#e8ca00':icon==='×'?'#d42133':'#1238ad';ctx.beginPath();ctx.arc(x+42,y+95,21,0,7);ctx.fill();text(icon,x+34,y+73,40,'white',700,false);text(copy,x+82,y+80,29);bevel(x+w/2-55,y+h-49,110,32);text(button,x+w/2-33,y+h-46,23)}
function errors(t,u){sky(t);editor(96,60,860,478,t);dialog(400,98,520,210,CFG.brand+' '+CFG.product,'This is new.');if(u>.7){let n=Math.min(12,1+Math.floor((u-.7)*7));for(let i=0;i<n;i++)dialog(530+i*28,210+i*22,570,225,CFG.brand+' '+CFG.product,'There might be bugs.','!')}if(u>2.1){dialog(1240,60,550,240,CFG.brand+' '+CFG.product,'Just let us know.','×','Tell us');cursor(1480+Math.sin(t)*10,245,1)}}
function feedback(t,u){sky(t);editor(96,60,860,478,t);win(1150,60,680,268,'Feedback');text('Send it to:',1178,145,34);bevel(1179,198,623,68,'white');text(CFG.feedbackHandle.slice(0,Math.floor(u*22)),1196,214,35);if(Math.sin(t*7)>0)rect(1430,212,15,38,'black');if(u>.7){win(112,596,758,296,'Reported · Mac launch');text('[real report from the Mac launch]',140,677,37,'#08006d');text('[timestamp]',140,832,34,'#08006d')}if(u>1.2){win(560,315,820,298,CFG.brand+' '+CFG.product);text(CFG.fixTitle,590,400,41);text(CFG.fixNote,590,463,28,'#555');bevel(591,538,760,45,'white');for(let i=0;i<Math.floor(clamp((u-1.2)/3.5)*24);i++)rect(596+i*31.5,542,27,36,'#070076')}if(u>3.8){win(1092,627,757,296,'Fixed');text('✓',1125,701,58,'#139256',700,false);text('[the fix]',1206,719,37,'#08006d');text('[timestamp]',1119,865,34,'#08006d')};if(u>5){bevel(0,1010,1920,70);bevel(9,490,557,516);rect(15,498,64,504,'#070079');rect(80,501,485,80,'#080078');symbol(104,527,55);text(CFG.brand+' '+CFG.product,181,526,33,'white');['Documents','Settings','Find','Help','Shut Down...'].forEach((s,i)=>text(s,103,608+i*79,36));cursor(303,569,1)} }
function modernScreen(t){let g=ctx.createLinearGradient(0,0,450,1080);g.addColorStop(0,'#1bdfb0');g.addColorStop(1,'#067cfa');rect(0,0,1920,1080,g);launch(460,35,1000,1000,6.8,t,2);ctx.save();ctx.translate(835,390);ctx.scale(590/1920,370/1080);desktop(t);text('HYPERFRAMES STUDIO',380,380,85,'white',700);text('NOW ON WINDOWS.',470,490,85,'white',700);ctx.restore();rect(0,1020,1920,60,'#e6f4f8');symbol(870,1035,30);}
function modernScene(t,u){if(u<.8)feedback(t,5.7);let e=ease(u/.8);ctx.save();ctx.translate(80*(1-e),160*(1-e));ctx.scale(.72+.28*e,.72+.28*e);modernScreen(t);ctx.restore()}
function closeBackground(t){let g=ctx.createLinearGradient(0,0,0,1080);g.addColorStop(0,'#fcfcfc');g.addColorStop(.31,'#f7fbfb');g.addColorStop(.44,'#d9f1ed');g.addColorStop(.72,'#35c8c0');g.addColorStop(1,'#169abd');rect(0,0,1920,1080,g);let r=ctx.createRadialGradient(1600+80*Math.sin(t*1.8),1150,40,1500,1050,900);r.addColorStop(0,'#0879b7aa');r.addColorStop(1,'#1681b500');rect(0,0,1920,1080,r);for(let i=0;i<3;i++){let x=[190,840,1600][i]+Math.sin(t*1.3+i)*55,y=[940,1020,800][i];let g=ctx.createRadialGradient(x,y,0,x,y,570);g.addColorStop(0,['#14d6ac77','#0489c6bb','#1fc2ad66'][i]);g.addColorStop(1,'#ffffff00');rect(0,0,1920,1080,g);}}
function outro(t,u){closeBackground(t);
if(u<.7){let k=lerp(.64,.28,ease(u/.7));ctx.save();ctx.translate(960-960*k,540-540*k);ctx.scale(k,k);modernScreen(t);ctx.restore();}
if(u>=1&&u<2.8){ctx.save();ctx.globalAlpha=ease((u-1)/.18);symbol(458,375,184);text(CFG.brand,672,367,124,'#15282d',900,false);ctx.restore();}
if(u<1.65){let dip=cueTime('close-dip')-cueTime('close-in'),leap=cueTime('close-leap')-cueTime('close-in');let y=u<.43?470:u<dip?lerp(470,625,ease((u-.43)/(dip-.43))):lerp(625,-800,Math.pow(clamp((u-dip)/(leap-dip+.22)),1.6));
// Large foreground performer ducks, then jumps clear of the emerging wordmark.
mascot(960,y,lerp(4.5,2.5,ease(u/.25)),t,false,true,{angle:.06,armY:u<.6?0:170,armAngle:u<.6?.15:2.1,sx:1.02,sy:.98,shadow:true});return;}
if(u<2.8){let x=lerp(2070,1730,ease((u-1.85)/.55));mascot(x,370+40*Math.sin((u-1.85)*7),1.15,t,false,true,{angle:.1*Math.sin(u*8),armY:40,armAngle:.7,shadow:true});}
else{
// The mascot drags the selection edge while Studio reveals, widening and centring the lockup.
let p=Math.pow(clamp((t-cueTime('close-type'))/(cueTime('close-type-done')-cueTime('close-type'))),1.65),x=lerp(672,480,p),bw=800,pw=380*p;
symbol(x-214,400,184);ctx.save();ctx.font=`900 124px ${heading}`;ctx.translate(x,0);ctx.scale(bw/ctx.measureText(CFG.brand).width,1);text(CFG.brand,0,388,124,'#15282d',900,false);ctx.restore();
ctx.save();ctx.beginPath();ctx.rect(x+bw,370,pw,170);ctx.clip();text(CFG.product,x+bw,388,124,'#10b989',900,false);ctx.restore();
if(t>=cueTime('close-type')&&t<cueTime('close-type-done')+.25){ctx.strokeStyle='#26d9b2';ctx.lineWidth=3;ctx.strokeRect(x-14,370,bw+pw+28,160);}
let after=clamp((t-cueTime('close-type-done')-.2)/.65),mx=lerp(x+bw+pw+45,1380,after),my=lerp(490,650,after);
mascot(mx,my,lerp(.48,.72,after),t,false,true,{angle:after>0?.16*Math.sin(t*5):-.65+.23*Math.sin(t*13),armY:10,armAngle:.6,sx:1,sy:.9,shadow:true});
}
if(u>4.5){let e=ease((u-4.5)/.15);ctx.save();ctx.globalAlpha=e;round(725,620,470,94,28,'#ffffff55');ctx.strokeStyle='#ffffffaa';ctx.lineWidth=3;ctx.strokeRect(738,633,444,68);text('↓',753,636,45,'#10b989',700,false);text(CFG.domain,820,648,40,'#25474c',400,false);ctx.restore()}}
function render(t){ctx.clearRect(0,0,1920,1080);let s=CFG.scenes.findLast(s=>t>=SCENE_START[s.id])||CFG.scenes[0],u=t-SCENE_START[s.id];
// 每个场景的入场和末端 cue 都通过唯一时间表求值。
const gates={boot:[cueTime('boot-in'),cueTime('boot-out')],desktop:[cueTime('desktop-in'),cueTime('desktop-out')],launch:[cueTime('launch-in'),cueTime('launch-out')],bluescreen:[cueTime('bluescreen-in'),cueTime('bluescreen-out')],asks:[cueTime('asks-in'),cueTime('asks-out')],document:[cueTime('document-in'),cueTime('document-out')],dance:[cueTime('dance-in'),cueTime('dance-out')],setup:[cueTime('setup-in'),cueTime('setup-out')],errors:[cueTime('errors-in'),cueTime('errors-out')],feedback:[cueTime('feedback-in'),cueTime('feedback-out')],modern:[cueTime('modern-in'),cueTime('modern-out')],close:[cueTime('close-in'),cueTime('close-out')]};u=t-gates[s.id][0];
// 仅在用户延长后的停留区间增加连续镜头呼吸,默认参考时长不改变。
ctx.save();if(s.dur>s.minDur&&u>s.minDur-.3){let h=ease((u-s.minDur+.3)/.6);ctx.translate(960,540);ctx.scale(1+.025*h,1+.025*h);ctx.translate(-960+18*h*Math.sin(t*1.4),-540+12*h*Math.cos(t*1.1));}
switch(s.id){case'boot':boot(u,t);break;case'desktop':desktop(t);if(u>.8&&t<cueTime('desktop-pointer')+.3){ctx.font=`700 78px ${bodyfont}`;CFG.announcement.split('\n').forEach((v,i)=>{if(i===1&&u<2.2)return;ctx.save();ctx.translate(960,0);ctx.scale(1.22,1);ctx.translate(-960,0);ctx.letterSpacing='13px';let x=960-ctx.measureText(v).width/2;text(v,x+5,370+i*110+5,78,'#222',700);text(v,x,370+i*110,78,'white',700);ctx.restore()})}desktopSelection(t);desktopPointer(t);if(t>=cueTime('launch-open'))openingLaunch(t,t-cueTime('launch-in'));break;case'launch':desktop(t,u>1.7?1:0);if(u<.4){desktopSelection(t);openingLaunch(t,u);desktopPointer(t);}else launch(456,37,1008,906,u+1,t,u>1.7?1:0);break;case'bluescreen':bsod(t,u);break;case'asks':bsod(t,u,true);break;case'document':if(u<.32){desktop(t,2);launch(448,52,1024,895,6,t,2);let g=ctx.createLinearGradient(182,0,1738,0);g.addColorStop(0,'#080078');g.addColorStop(1,'#078cbe');round(182,74,1556,690,6,g)}else documentScene(t,u);break;case'dance':sky(t);editor(36,26,1848,1028,t,t>=cueTime('dance-headphones'),true);if(u>1.7&&t<cueTime('dance-headphones')){ctx.strokeStyle='#39deae';ctx.lineWidth=2;ctx.strokeRect(1015,413,300,322)}break;case'setup':if(t<gates.setup[1])setup(t,u);else{sky(t);editor(96,60,860,478,t)}break;case'errors':errors(t,u);break;case'feedback':feedback(t,u);break;case'modern':modernScene(t,u);break;case'close':outro(t,u);break;}
// 出场提示只在场景末端作用,延长场景不会提前结束。
let tail=clamp((t-gates[s.id][1])/.15);
ctx.restore();
}
const clock={t:0};const tl=gsap.timeline({paused:true});tl.to(clock,{t:CFG.duration,duration:CFG.duration,ease:'none',onUpdate:()=>{render(clock.t);updateControls()}});window.__odRenderAt=t=>{tl.pause(t);clock.t=t;render(t);updateControls()};
const btn=document.querySelector('button'),slider=document.querySelector('input'),label=document.querySelector('#controls span');slider.max=CFG.duration;document.querySelector('#main').dataset.duration=CFG.duration;
function updateControls(){slider.value=clock.t;label.textContent=clock.t.toFixed(2)+' / '+CFG.duration.toFixed(2)}btn.onclick=()=>{if(tl.paused()){if(clock.t>=CFG.duration)tl.restart();else tl.play();btn.textContent='PAUSE'}else{tl.pause();btn.textContent='PLAY'}};slider.oninput=()=>window.__odRenderAt(+slider.value);
Promise.all([ready,document.fonts.load('900 124px Inter').catch(()=>[]),document.fonts.load('400 32px Pixelify').catch(()=>[]),document.fonts.load('700 78px Pixelify').catch(()=>[])]).then(async()=>{await document.fonts.ready;await new Promise(r=>requestAnimationFrame(()=>requestAnimationFrame(r)));render(0);window.__timelines={main:tl};window.__odReady=true});
</script><script data-od-preview-audio>
(function(){var a=document.getElementById('soundtrack');if(!a||document.documentElement.classList.contains('od-export'))return;
function tick(){if(window.__odMotionSourcePlayer||window.__odMotionRender)return;var tl=window.__timelines&&window.__timelines.main;
if(tl){var t=tl.time(),on=tl.isActive();if(on){if(a.paused)a.play().catch(function(){});if(Math.abs(a.currentTime-t)>0.2)a.currentTime=t;}else{if(!a.paused)a.pause();if(Math.abs(a.currentTime-t)>0.05)a.currentTime=t;}}
requestAnimationFrame(tick);}requestAnimationFrame(tick);})();
</script>
</body></html>
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 195k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |