Branchwell

PulseCanvas / app · pulsecanvas.ai / assets / app-store / mobile-marketing-1.1.5 / header.html

1<!doctype html>
2<html lang="en"><head><meta charset="utf-8"><title>PulseCanvas header</title>
3<style>
4:root{--accent:#7f3fe0;--ink:#17121f}
5*{box-sizing:border-box}html,body{margin:0}
6.stage{position:relative;width:3840px;height:1646px;overflow:hidden;background:linear-gradient(180deg,#fdfcfe 0%,#f7f3fb 60%,#efe8f7 100%);font-family:"Avenir Next",Avenir,-apple-system,sans-serif;-webkit-font-smoothing:antialiased;color:var(--ink)}
7svg.bg{position:absolute;inset:0;width:100%;height:100%}
8.glow{position:absolute;left:50%;top:50%;width:1900px;height:860px;margin:-430px 0 0 -950px;border-radius:50%;background:#fdfcfe;filter:blur(90px);opacity:.92}
9/* The lockup stays inside the centred 1646×660 crop the App Store shows on iPhone. */
10.lockup{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:52px;z-index:3}
11.brand{display:flex;align-items:center;gap:52px}
12.brand img{width:280px;height:280px;border-radius:64px;box-shadow:0 30px 60px #2a1a4a40}
13.name{display:flex;flex-direction:column;line-height:.94}
14.name b{font-size:184px;font-weight:700;letter-spacing:-6px}
15.name span{font-size:118px;font-weight:600;letter-spacing:-3px;color:var(--accent)}
16.line{display:flex;align-items:center;gap:30px;padding:28px 52px;border-radius:90px;background:#ffffffe6;box-shadow:0 24px 60px #2a1a4a22,0 0 0 2px #ece5f4}
17.eq{display:flex;align-items:center;gap:9px;height:64px;flex:none}
18.eq i{width:12px;border-radius:6px;background:var(--accent)}
19.text{font-size:60px;font-weight:600;letter-spacing:-.8px;white-space:nowrap}
20.text b{color:var(--accent)}
21</style></head><body>
22<div class="stage">
23 <svg class="bg" id="bg" viewBox="0 0 3840 1646"></svg>
24 <div class="glow"></div>
25 <div class="lockup">
26 <div class="brand"><img src="sources/icon.png" alt=""><div class="name"><b>PulseCanvas</b><span>Studio</span></div></div>
27 <div class="line"><span class="eq" id="eq"></span><span class="text"><b>300+ visualizers</b> that move to your music.</span></div>
28 </div>
29</div>
30<script>
31// Every motion is periodic in T, so the exported video loops seamlessly.
32const T=Number(new URLSearchParams(location.search).get('loop')||12), W=3840, H=1646, TAU=Math.PI*2;
33const bg=document.getElementById('bg'), eq=document.getElementById('eq');
34// Deep violets from the app icon: one hue family, varied in depth.
35const colors=['#2a1850','#5a2fb8','#3b2272','#7a3fd8','#2f1d5e','#9b3fd4'];
36// An octagon tunnel, the app icon's shape, flying outward. Rings advance a whole number of
37// spacings per loop and colours repeat every six rings, so frame T matches frame 0.
38const N=12, COUNT=26, G=0.16, R0=150;
39const ribbons=[{y:.86,a:.10,amp:90,len:1,sp:1,c:'#3b2272'},{y:.90,a:.10,amp:70,len:1.4,sp:-1,c:'#5a2fb8'},{y:.95,a:.12,amp:55,len:.8,sp:2,c:'#2a1850'},
40 {y:.12,a:.06,amp:70,len:1.2,sp:-1,c:'#5a2fb8',top:1}];
41for(let i=0;i<11;i++){eq.appendChild(document.createElement('i'))}
42function oct(r,rot,sq){return [...Array(8)].map((_,k)=>{const a=rot+Math.PI/8+k*Math.PI/4;return (W/2+r*Math.cos(a)).toFixed(1)+','+(H/2+r*Math.sin(a)*sq).toFixed(1)}).join(' ')}
43function ribbon(l,t){const ph=t/T*TAU*l.sp;const edge=l.top?0:H;let d=`M0 ${edge} `;for(let x=0;x<=W;x+=32){const y=H*l.y+l.amp*Math.sin(x/W*TAU*l.len+ph)+l.amp*.35*Math.sin(x/W*TAU*3*l.len-ph);d+=`L${x} ${y.toFixed(1)} `}return `<path d="${d}L${W} ${edge} Z" fill="${l.c}" fill-opacity="${l.a}"/>`}
44window.render=function(t){
45 const p=t/T*TAU, f=(t/T*N)%1, shift=Math.floor(t/T*N);
46 let rings='';
47 for(let j=COUNT-1;j>=0;j--){
48 const pos=j+f, r=R0*Math.exp(G*pos)*(1+.03*Math.sin(p*4+pos*.9));
49 const id=((j-shift)%6+6)%6, c=colors[id];
50 const rot=pos*0.13+0.22*Math.sin(p*2+pos*.35); // a gentle twist that travels down the tunnel
51 const fadeIn=Math.min(1,pos/2.2), fadeOut=Math.max(0,Math.min(1,(COUNT-pos)/3));
52 const a=(.5*fadeIn*fadeOut).toFixed(3), w=(3+r*.022).toFixed(1);
53 rings+=`<polygon points="${oct(r,rot,.58)}" fill="none" stroke="${c}" stroke-width="${w}" stroke-opacity="${a}" stroke-linejoin="round"/>`;
54 }
55 bg.innerHTML=rings+ribbons.map(l=>ribbon(l,t)).join('');
56 [...eq.children].forEach((b,i)=>{const v=.5+.5*Math.sin(p*(4+i%5)+i*1.3)*Math.cos(p*3+i*.7);b.style.height=(14+50*Math.abs(v)).toFixed(1)+'px'});
57};
58render(Number(new URLSearchParams(location.search).get('t')||0));
59</script></body></html>