Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

notepat anim

+77 -1
+69 -1
system/netlify/functions/index.mjs
··· 267 267 event.path.length <= 1 268 268 ) { 269 269 slug = "wg~m2w2"; 270 + } else if ( 271 + (event.headers["host"] === "notepat.com" || event.headers["host"] === "www.notepat.com") && 272 + event.path.length <= 1 273 + ) { 274 + slug = "notepat"; 270 275 } 271 276 272 277 // Handle kidlisp:code URL pattern and convert to $code format ··· 1051 1056 if(!isKidlisp&&window.self!==window.top){if(qs.indexOf('nolabel')>=0&&qs.indexOf('nogap')>=0)isKidlisp=true;} 1052 1057 // Device mode: FF1/display device with black background and white/gray bars 1053 1058 var isDeviceMode=qs.indexOf('device=true')>=0; 1059 + // Notepat.com: piano-themed boot animation 1060 + var isNotepat=location.hostname==='notepat.com'||location.hostname==='www.notepat.com'; 1054 1061 // Density param for scaling (default 1, FF1 uses 8 for 4K) 1055 1062 var densityMatch=qs.match(/density=(\d+)/);var densityParam=densityMatch?parseInt(densityMatch[1]):1; 1056 1063 var isLightMode=window.matchMedia&&window.matchMedia('(prefers-color-scheme:light)').matches; ··· 1107 1114 if(s[i]==='$'){var j=i;while(j<s.length&&s[j]==='$')j++;r.push([s.slice(i,j),'dollar']);i=j;continue;} 1108 1115 if(s.slice(i,i+4)==='GIVE'&&!/[a-zA-Z0-9_]/.test(s[i+4]||'')){r.push(['GIVE','give']);i+=4;continue;} 1109 1116 var fk=false;for(var k=0;k<KWS.length;k++){var kw=KWS[k];if(s.slice(i,i+kw.length)===kw){var nc=s[i+kw.length]||'';if(!/[a-zA-Z0-9_]/.test(nc)){r.push([kw,'kw']);i+=kw.length;fk=true;break;}}}if(fk)continue;var ch=s[i];if(ch==='"'||ch==="'"||ch==='\`'){var q=ch,j=i+1;while(j<s.length&&s[j]!==q){if(s[j]==='\\\\')j++;j++;}r.push([s.slice(i,j+1),'str']);i=j+1;continue;}if(/[0-9]/.test(ch)){var j=i;while(j<s.length&&/[0-9.]/.test(s[j]))j++;r.push([s.slice(i,j),'num']);i=j;continue;}if(/[a-zA-Z_]/.test(ch)){var j=i;while(j<s.length&&/[a-zA-Z0-9_]/.test(s[j]))j++;var w=s.slice(i,j);r.push([w,s[j]==='('?'fn':'vr']);i=j;continue;}r.push([ch,'op']);i++;}return r;} 1110 - var scrollSpds={};function addFile(name,src){if(isKidlisp)return;if(shownFiles[name])return;shownFiles[name]=true;netAct=1;var ls=src.split('\\n').slice(0,100),ext=(name.match(/\\.[^.]+$/)||[''])[0];var toks=ls.map(tok); 1117 + var scrollSpds={};function addFile(name,src){if(isKidlisp||isNotepat)return;if(shownFiles[name])return;shownFiles[name]=true;netAct=1;var ls=src.split('\\n').slice(0,100),ext=(name.match(/\\.[^.]+$/)||[''])[0];var toks=ls.map(tok); 1111 1118 // In GIVE variant, inject GIVE/$$ lines throughout 1112 1119 if(giveVariant){var injected=[];for(var li=0;li<toks.length;li++){injected.push(toks[li]);if(Math.random()<0.4){var gLine=giveCodeLines[Math.floor(Math.random()*giveCodeLines.length)];injected.push(tok(gLine));}}toks=injected;} 1113 1120 fileQ.push({name:name,toks:toks});files.push({name:name,lines:ls,ext:ext,toks:toks,total:ls.length,cH:(ls.length+3)*LH});scrollYs[name]=0;scrollSpds[name]=2+Math.floor(Math.random()*5);} 1114 1121 function netPulse(){netAct=Math.min(1,netAct+0.5);} 1115 1122 function add(m){var now=performance.now(),dt=now-lastLog;lastLog=now;lb=Math.min(1,500/Math.max(50,dt))*0.5+0.5;if(lines.length>0)lines[0].text=lines[0].text.replace(/_$/,'');lines.unshift({text:m+'_',time:now,burst:lb});if(lines.length>mL)lines.pop();lc++;bp=Math.min(1,lc/25);} 1116 1123 var KIDLISP_BARS=[]; 1124 + // 🎹 Notepat piano boot animation state 1125 + var NP_KEYS=[];var NP_PARTICLES=[];var NP_LAST_KEY=0;var NP_KEY_INTERVAL=120; 1126 + var NP_NOTE_NAMES=['C','D','E','F','G','A','B']; 1127 + var NP_KEY_COLS=[[255,107,157],[78,205,196],[255,217,61],[149,225,211],[255,154,162],[170,150,218],[112,214,255],[255,183,77]]; 1117 1128 // Theme-aware KidLisp colors - darker/more saturated for light mode 1118 1129 var KIDLISP_COLS_DARK=[[255,107,107],[78,205,196],[255,230,109],[149,225,211],[243,129,129],[170,150,218],[112,214,255]]; 1119 1130 var KIDLISP_COLS_LIGHT=[[200,60,60],[30,140,130],[180,150,40],[50,150,130],[180,70,70],[100,80,160],[40,130,190]]; ··· 1154 1165 var baseShk=0.5+Math.sin(t*2)*0.3,shk=baseShk+chaos*chaos*4+lb*3+touchGlitch*8,sx=(Math.random()-0.5)*shk+touchDx,sy=(Math.random()-0.5)*shk+touchDy; 1155 1166 // File cycling - swap displayed files periodically as boot progresses 1156 1167 var now=performance.now();if(files.length>1&&now-lastFileSwap>FILE_SWAP_INTERVAL){lastFileSwap=now;displayFileIdx=(displayFileIdx+1)%files.length;for(var k in scrollYs)scrollYs[k]=0;} 1168 + // 🎹 Notepat.com piano boot animation 1169 + if(isNotepat){ 1170 + var npBg=isLightMode?'#f8f6f0':'#0a0a12';x.fillStyle=npBg;x.fillRect(0,0,W,H); 1171 + // Subtle scan lines 1172 + x.globalAlpha=isLightMode?0.02:0.04;x.fillStyle=isLightMode?'#888':'#000';for(var yy=0;yy<H;yy+=2*S)x.fillRect(0,yy,W,S);x.globalAlpha=1; 1173 + // Draw piano keyboard at bottom ~30% of screen 1174 + var pianoY=Math.floor(H*0.62);var pianoH=H-pianoY;var totalWhite=14;var kW=Math.floor(W/totalWhite); 1175 + // White keys 1176 + for(var ki=0;ki<totalWhite;ki++){var kx=ki*kW;var isPressed=false; 1177 + for(var nki=NP_KEYS.length-1;nki>=0;nki--){if(NP_KEYS[nki].idx===ki&&NP_KEYS[nki].white){isPressed=true;break;}} 1178 + var wKeyCol=isLightMode?(isPressed?'#e8e0d8':'#faf8f4'):(isPressed?'#2a2a3a':'#e8e4de'); 1179 + x.fillStyle=wKeyCol;x.fillRect(kx+S,pianoY,kW-2*S,pianoH); 1180 + // Key border 1181 + x.strokeStyle=isLightMode?'#ccc':'#333';x.lineWidth=S;x.strokeRect(kx+S,pianoY,kW-2*S,pianoH); 1182 + // Glow on pressed keys 1183 + if(isPressed){for(var nki=NP_KEYS.length-1;nki>=0;nki--){if(NP_KEYS[nki].idx===ki&&NP_KEYS[nki].white){var nk=NP_KEYS[nki];var glA=nk.life*0.3;x.globalAlpha=glA;var gc=NP_KEY_COLS[nk.ci%NP_KEY_COLS.length];x.fillStyle='rgb('+gc[0]+','+gc[1]+','+gc[2]+')';x.fillRect(kx+S,pianoY,kW-2*S,pianoH);x.globalAlpha=1;break;}}} 1184 + } 1185 + // Black keys (pentatonic pattern: 2, 3 grouped) 1186 + var blackPattern=[1,1,0,1,1,1,0];var bkW=Math.floor(kW*0.6);var bkH=Math.floor(pianoH*0.6); 1187 + for(var ki=0;ki<totalWhite-1;ki++){var bp2=blackPattern[ki%7];if(!bp2)continue;var bkx=ki*kW+kW-Math.floor(bkW/2); 1188 + var isBPressed=false;for(var nki=NP_KEYS.length-1;nki>=0;nki--){if(NP_KEYS[nki].idx===ki&&!NP_KEYS[nki].white){isBPressed=true;break;}} 1189 + var bKeyCol=isLightMode?(isBPressed?'#1a1a2a':'#222'):(isBPressed?'#3a3a5a':'#1a1a1a'); 1190 + x.fillStyle=bKeyCol;x.fillRect(bkx,pianoY,bkW,bkH); 1191 + if(isBPressed){for(var nki=NP_KEYS.length-1;nki>=0;nki--){if(NP_KEYS[nki].idx===ki&&!NP_KEYS[nki].white){var nk2=NP_KEYS[nki];var glA2=nk2.life*0.4;x.globalAlpha=glA2;var gc2=NP_KEY_COLS[nk2.ci%NP_KEY_COLS.length];x.fillStyle='rgb('+gc2[0]+','+gc2[1]+','+gc2[2]+')';x.fillRect(bkx,pianoY,bkW,bkH);x.globalAlpha=1;break;}}} 1192 + } 1193 + // Spawn new key presses randomly 1194 + if(now-NP_LAST_KEY>NP_KEY_INTERVAL){NP_LAST_KEY=now;NP_KEY_INTERVAL=80+Math.random()*200; 1195 + var isWhite=Math.random()>0.3;var idx=Math.floor(Math.random()*totalWhite);var ci=Math.floor(Math.random()*NP_KEY_COLS.length); 1196 + NP_KEYS.push({idx:idx,white:isWhite,life:1,ci:ci,born:now}); 1197 + // Spawn rising particles from the key 1198 + var pkx=isWhite?(idx*kW+kW/2):(idx*kW+kW);var pky=pianoY; 1199 + for(var pi=0;pi<3+Math.floor(Math.random()*4);pi++){ 1200 + NP_PARTICLES.push({x:pkx+(Math.random()-0.5)*kW*0.5,y:pky,vy:-(1+Math.random()*3)*S,vx:(Math.random()-0.5)*1.5*S,life:1,ci:ci,sz:(1.5+Math.random()*2.5)*S}); 1201 + } 1202 + } 1203 + // Update and draw particles (rising notes/sparkles) 1204 + for(var pi=NP_PARTICLES.length-1;pi>=0;pi--){var p=NP_PARTICLES[pi];p.x+=p.vx;p.y+=p.vy;p.vy*=0.99;p.life-=0.012; 1205 + if(p.life<=0){NP_PARTICLES.splice(pi,1);continue;} 1206 + var pc=NP_KEY_COLS[p.ci%NP_KEY_COLS.length];x.globalAlpha=p.life*0.7;x.fillStyle='rgb('+pc[0]+','+pc[1]+','+pc[2]+')'; 1207 + // Draw as small rounded rect (like a mini note) 1208 + var psz=p.sz*p.life;x.beginPath();x.roundRect(p.x-psz/2,p.y-psz/2,psz,psz*0.7,psz*0.2);x.fill(); 1209 + } 1210 + x.globalAlpha=1; 1211 + // Update key presses (fade out) 1212 + for(var nki=NP_KEYS.length-1;nki>=0;nki--){NP_KEYS[nki].life-=0.02;if(NP_KEYS[nki].life<=0)NP_KEYS.splice(nki,1);} 1213 + // "notepat" text centered above keyboard 1214 + var npFS=Math.floor(12*S);x.font='bold '+npFS+'px monospace';var npTxt='notepat';var npTW=x.measureText(npTxt).width;var npTX=(W-npTW)/2;var npTY=pianoY-12*S; 1215 + // Subtle pulsing glow behind text 1216 + var npPulse=0.15+Math.sin(f*0.06)*0.08;x.globalAlpha=npPulse;x.fillStyle=isLightMode?'rgba(255,107,157,0.3)':'rgba(78,205,196,0.25)';x.beginPath();x.roundRect(npTX-8*S,npTY-npFS*0.8,npTW+16*S,npFS*1.4,4*S);x.fill(); 1217 + x.globalAlpha=0.9;x.fillStyle=isLightMode?'#333':'#e8e4de';x.fillText(npTxt,npTX,npTY); 1218 + // ".com" superscript 1219 + var comFS=Math.floor(6*S);x.font=comFS+'px monospace';x.fillStyle=isLightMode?'#0891b2':'#4ecdc4';x.fillText('.com',npTX+npTW+2*S,npTY-npFS*0.35); 1220 + x.globalAlpha=1; 1221 + // Boot log messages (top-left, like kidlisp) 1222 + var npLogFS=4*S;x.font=npLogFS+'px monospace';var npLogY=8*S; 1223 + for(var li=0;li<lines.length&&li<8;li++){var ln=lines[li],ly=npLogY+li*5*S,la=Math.max(0.3,1-li*0.1);var lc2=NP_KEY_COLS[li%NP_KEY_COLS.length];x.globalAlpha=la*0.15;x.fillStyle='rgb('+lc2[0]+','+lc2[1]+','+lc2[2]+')';var tw=x.measureText(ln.text).width;x.beginPath();x.roundRect(4*S,ly-npLogFS*0.7,tw+12*S,npLogFS*1.1,2*S);x.fill();x.globalAlpha=la;x.fillStyle='rgb('+lc2[0]+','+lc2[1]+','+lc2[2]+')';x.fillText(ln.text,6*S,ly);} 1224 + x.globalAlpha=1;requestAnimationFrame(anim);return;} 1157 1225 // KidLisp simplified mode: colored bars + logs only (or device mode: black/white) 1158 1226 if(isKidlisp||isDeviceMode){var klBg=isDeviceMode?'#000000':(isLightMode?'rgba(247,247,247,0.95)':'rgba(42,37,32,0.95)');x.fillStyle=klBg;x.fillRect(0,0,W,H);if(!isDeviceMode){x.globalAlpha=isLightMode?0.015:0.03;x.fillStyle=isLightMode?'#888':'#000';for(var yy=0;yy<H;yy+=3*S)x.fillRect(0,yy,W,S);}x.globalAlpha=1;var klCols=getKidlispCols();var dS=isDeviceMode?Math.max(1,densityParam):1;var embedPad=isKidlisp?8*S*dS:0; 1159 1227 // In device mode with density=1, use simpler/fewer bars for performance
+8
system/public/aesthetic.computer/boot.mjs
··· 880 880 } else if ( 881 881 window.location.hostname === "aesthetic.computer" || 882 882 window.location.hostname.endsWith(".ac") || 883 + window.location.hostname === "notepat.com" || 884 + window.location.hostname === "www.notepat.com" || 883 885 window.location.hostname === "m2w2.whistlegraph.com" || 884 886 window.acPACK_MODE // Disable debug mode in OBJKT packages 885 887 ) { ··· 911 913 location.hostname === "www.wipppps.world" 912 914 ) { 913 915 window.acSTARTING_PIECE = "wipppps"; 916 + } 917 + if ( 918 + location.hostname === "notepat.com" || 919 + location.hostname === "www.notepat.com" 920 + ) { 921 + window.acSTARTING_PIECE = "notepat"; 914 922 } 915 923 916 924 if (window.acSTARTING_PIECE === undefined) window.acSTARTING_PIECE = "prompt";