From a33711de3e9d868d630eb87c7c4d1aef642179ab Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 05:27:19 +0000 Subject: [PATCH 01/63] Tumble Trials Closet: 43 new items (sports kits, pirates with eye patches, suits, robots, more) 31 costumes, 5 hats, 3 face extras and 4 victory dances, added at the end of each list so saved kits keep their looks. Costumes may now be paint only (no shape: a hat can be worn with them) and may paint over the face (eye patch, shades). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn --- e63334287a3deaa3/cosmetics.js | 43 ++++ e63334287a3deaa3/tumble-trials/closet.js | 286 ++++++++++++++++++++++- e63334287a3deaa3/tumble-trials/es.js | 6 +- 3 files changed, 331 insertions(+), 4 deletions(-) diff --git a/e63334287a3deaa3/cosmetics.js b/e63334287a3deaa3/cosmetics.js index dbdea3e5..286a6a77 100644 --- a/e63334287a3deaa3/cosmetics.js +++ b/e63334287a3deaa3/cosmetics.js @@ -693,6 +693,49 @@ I('tumble-trials', 'splash', 3, 'Rainbow Splat', 'rare', '#ff5c5c', '#5cc8ff', 'A ring of rainbow splats.'); I('tumble-trials', 'splash', 4, 'Star Shower', 'rare', '#ffd23f', '#ffffff', 'A fountain of stars.'); I('tumble-trials', 'splash', 5, 'Glitter Geyser', 'epic', '#ffcf3d', '#ff7ac3', 'A tall geyser of glitter.'); + I('tumble-trials', 'face', 7, 'Eye Patch', 'common', '#1e1b24', '#fff8ee', 'A black pirate eye patch on a strap.'); + I('tumble-trials', 'face', 8, 'Black Shades', 'uncommon', '#1b1a22', '#9aa6b4', 'Dark square shades, very serious.'); + I('tumble-trials', 'face', 9, 'Eye Black', 'common', '#1e1b24', '#f2f4f7', 'Two black stripes under the eyes, game-day style.'); + I('tumble-trials', 'hat', 15, 'Baseball Cap', 'common', '#e8282b', '#ffffff', 'A red cap with a curved brim.'); + I('tumble-trials', 'hat', 16, 'Fedora', 'uncommon', '#6b7280', '#1e1b24', 'A grey felt hat with a black band.'); + I('tumble-trials', 'hat', 17, 'Pirate Bandana', 'common', '#d9312b', '#ffffff', 'A red spotted bandana knotted at the back.'); + I('tumble-trials', 'hat', 18, 'Fur Hat', 'rare', '#8a7460', '#b8a48e', 'A tall, fluffy fur hat for cold days.'); + I('tumble-trials', 'hat', 19, 'Bowler Hat', 'common', '#2f2c38', '#6a6578', 'A round black bowler hat.'); + I('tumble-trials', 'costume', 13, 'Soccer Kit', 'common', '#2e8bff', '#ffffff', 'A blue shirt with a star badge and a 9 on the back.'); + I('tumble-trials', 'costume', 14, 'Basketball Kit', 'common', '#7a3cff', '#ffd23f', 'A purple vest and shorts, number 7, and a headband.'); + I('tumble-trials', 'costume', 15, 'Gridiron Gear', 'rare', '#d9312b', '#ffffff', 'Helmet, face guard, shoulder pads and number 42.'); + I('tumble-trials', 'costume', 16, 'Baseball Uniform', 'uncommon', '#fbfaf5', '#1f3b73', 'Pinstripes, a button front and a navy cap.'); + I('tumble-trials', 'costume', 17, 'Hockey Kit', 'uncommon', '#19b3a6', '#ffffff', 'A striped teal jersey and a white helmet.'); + I('tumble-trials', 'costume', 18, 'Tennis Whites', 'common', '#ffffff', '#46d37a', 'A crisp white polo with a green headband.'); + I('tumble-trials', 'costume', 19, 'Boxing Champ', 'rare', '#e8282b', '#ffcf3d', 'Red trunks, padded headgear and a gold belt.'); + I('tumble-trials', 'costume', 20, 'Track Star', 'common', '#ff3b5c', '#ffffff', 'A running vest with a race number pinned on.'); + I('tumble-trials', 'costume', 21, 'Swim Team', 'uncommon', '#1f3b73', '#ffd23f', 'A swim cap, goggles and racing trunks.'); + I('tumble-trials', 'costume', 22, 'Ski Racer', 'rare', '#ff3b3b', '#2e5ad9', 'A zigzag race suit, helmet and orange goggles.'); + I('tumble-trials', 'costume', 23, 'Racing Driver', 'epic', '#ff6b1a', '#1e1b24', 'A race suit with checkers and a helmet, visor up.'); + I('tumble-trials', 'costume', 24, 'Referee', 'common', '#ffffff', '#1e1b24', 'Black and white stripes and a whistle.'); + I('tumble-trials', 'costume', 25, 'Team Mascot', 'legendary', '#ffb21f', '#2e5ad9', 'A fluffy bird mascot with a beak, a crest and a scarf.'); + I('tumble-trials', 'costume', 26, 'Karate Gi', 'uncommon', '#ffffff', '#1e1b24', 'A white gi, a black belt and a red headband.'); + I('tumble-trials', 'costume', 27, 'Golf Pro', 'common', '#2e5ad9', '#46d37a', 'An argyle vest and a tweed flat cap.'); + I('tumble-trials', 'costume', 28, 'Cheer Squad', 'common', '#ff4f9a', '#ffffff', 'A cheer top, a pleated skirt and a big bow.'); + I('tumble-trials', 'costume', 29, 'Pirate Captain', 'epic', '#b3202a', '#e8b923', 'A red coat, a tricorn hat with a plume and an eye patch.'); + I('tumble-trials', 'costume', 30, 'Deckhand', 'uncommon', '#ffffff', '#1f3b73', 'A striped shirt, a bandana and an eye patch.'); + I('tumble-trials', 'costume', 31, 'Parrot Pal', 'rare', '#3f6e1d', '#e8282b', 'A pirate vest, an eye patch and a parrot on your shoulder.'); + I('tumble-trials', 'costume', 32, 'Ghost Pirate', 'legendary', '#bff5e6', '#5fc9b4', 'A pale, wispy pirate in a ragged hat.'); + I('tumble-trials', 'costume', 33, 'Pinstripe Suit', 'rare', '#2b3550', '#e8282b', 'A 1920s pinstripe suit, red tie and fedora.'); + I('tumble-trials', 'costume', 34, 'The Boss', 'legendary', '#b98a52', '#7a6250', 'A long camel coat with a fur collar and a fur hat.'); + I('tumble-trials', 'costume', 35, 'Tracksuit Tough Guy', 'uncommon', '#2e5ad9', '#ffcf3d', 'A blue tracksuit and a big gold chain.'); + I('tumble-trials', 'costume', 36, 'Bodyguard', 'uncommon', '#34323c', '#1e1b24', 'A dark suit, dark shades and an earpiece.'); + I('tumble-trials', 'costume', 37, 'Tuxedo', 'epic', '#2a2830', '#ffffff', 'A tuxedo, a bow tie, a top hat and a rose.'); + I('tumble-trials', 'costume', 38, 'Business Suit', 'common', '#6b7280', '#2e5ad9', 'A grey suit and a striped blue tie.'); + I('tumble-trials', 'costume', 39, 'Tin Robot', 'rare', '#aab3bd', '#e8282b', 'A wind-up tin robot with dials and an antenna.'); + I('tumble-trials', 'costume', 40, 'Sleek Android', 'epic', '#f4f7fb', '#2ec5ff', 'A white android with glowing blue lines.'); + I('tumble-trials', 'costume', 41, 'Junkyard Bot', 'rare', '#b0683a', '#7d8794', 'A rusty robot patched together from spare parts.'); + I('tumble-trials', 'costume', 42, 'Wizard', 'epic', '#6a3cc8', '#ffd23f', 'A starry robe, a bent pointy hat and a long beard.'); + I('tumble-trials', 'costume', 43, 'Firefighter', 'uncommon', '#c9a24a', '#ffd23f', 'A coat with bright bands and a red helmet.'); + I('tumble-trials', 'dance', 7, 'Touchdown Spike', 'uncommon', '#d9312b', '#ffffff', 'Wind up, spike the ball, then jump about.'); + I('tumble-trials', 'dance', 8, 'Boxer Shuffle', 'uncommon', '#e8282b', '#ffcf3d', 'Bounce on your toes and throw quick jabs.'); + I('tumble-trials', 'dance', 9, 'Hornpipe Jig', 'rare', '#1f3b73', '#ffffff', 'A sailor\'s hopping jig with folded arms.'); + I('tumble-trials', 'dance', 10, 'Big Boss Shrug', 'epic', '#b98a52', '#e8b923', 'Lean back, arms wide: no problem here.'); // ---- Shell Crackers items ---- // Looks only (shell-crackers/kit.js draws them by number): every egg type is the same size and the same hit box as a // plain egg, and a hat or a gun skin never changes what can be hit or how a gun shoots. Crack effects play where an diff --git a/e63334287a3deaa3/tumble-trials/closet.js b/e63334287a3deaa3/tumble-trials/closet.js index b56ebc11..5bc9c26c 100644 --- a/e63334287a3deaa3/tumble-trials/closet.js +++ b/e63334287a3deaa3/tumble-trials/closet.js @@ -390,6 +390,287 @@ const SPLASHES=[ ['Star Shower','#ffd23f','#ffffff',p=>{for(let i=0;i<44;i++)FX.spawn(_s.set(p.x,p.y+.4,p.z),_v.set(rand(-2.5,2.5),rand(10,15),rand(-2.5,2.5)),i%3?'#ffd23f':'#ffffff',rand(1.5,2.2),1.35)}], ['Glitter Geyser','#ffcf3d','#ff7ac3',p=>{const C=['#ffcf3d','#ff7ac3','#ffffff','#b8a4ff'];for(let i=0;i<70;i++)FX.spawn(_s.set(p.x+rand(-.2,.2),p.y+.3,p.z+rand(-.2,.2)),_v.set(rand(-1.2,1.2),rand(12,18),rand(-1.2,1.2)),pick(C),rand(2,3),.8)}] ]; +// ===================================================================== +// Wave 2 (Nov 2026): sports kits, pirates (with eye patches), suits, robots and more. Always added at the END of each +// list, so every older number keeps its look. A costume here may have no shape (null): it is paint only, costs +// nothing, and leaves room for a hat. Its arm and foot colours may be null (the bean's own colour shows, as on bare +// arms), and an eighth part, if any, is painted over the face (an eye patch, shades). Costume painters get the head +// colour (the bean's colour, or the Closet colour) so a kit shows the bean's own colour above the neck. +// ===================================================================== +const fillC=(x,c)=>{x.fillStyle=c;x.fillRect(0,0,W,H)}; +const bandY=(x,c,y0,y1)=>{x.fillStyle=c;x.fillRect(0,V(y1),W,V(y0)-V(y1))}; +const NECK=.9; +const poly=(x,P)=>{x.beginPath();for(const [u,y] of P)x.lineTo(U(u),V(y));x.closePath();x.fill()}; +// the head (bean colour) above a shirt, with a round or V neckline under the face and a trim line along it +function neck(x,head,trim,dip,w){dip=dip==null?.08:dip;w=w||.3; + const path=()=>{x.beginPath();x.moveTo(0,V(NECK));x.lineTo(U(-w),V(NECK));x.quadraticCurveTo(U(-w*.35),V(NECK-dip),U(0),V(NECK-dip));x.quadraticCurveTo(U(w*.35),V(NECK-dip),U(w),V(NECK));x.lineTo(W,V(NECK))}; + path();x.lineTo(W,-4);x.lineTo(0,-4);x.closePath();x.fillStyle=head;x.fill(); + if(trim){path();x.strokeStyle=trim;x.lineWidth=7;x.lineJoin='round';x.stroke()}} +// a number on the back (and, smaller, on the chest), drawn upright on the round body +function num(x,n,fill,stroke,size,cx,y){size=size||64;cx=cx==null?W:cx;y=y==null?.6:y;x.save();x.font='900 '+size+'px Arial,Helvetica,sans-serif';x.textAlign='center';x.textBaseline='middle';x.lineJoin='round'; + wrap(cx,X=>{x.save();x.translate(X,V(y));x.scale(1,AR*1.15);if(stroke){x.strokeStyle=stroke;x.lineWidth=size*.18;x.strokeText(n,0,0)}x.fillStyle=fill;x.fillText(n,0,0);x.restore()},size*1.3);x.restore()} +const sideStripe=(x,c,w,y0,y1)=>{x.fillStyle=c;for(const s of [-1,1])x.fillRect(U(s*SIDE)-w/2,V(y1),w,V(y0)-V(y1))}; +const vStripes=(x,c,n,y0,y1,f)=>{x.fillStyle=c;for(let i=0;ibandY(x,c,y,y+(h||.04)); +// a jacket, shirt, lapels and tie (or bow), for the suits +function suit(x,head,o){ + fillC(x,o.jacket); + if(o.pin){x.fillStyle=o.pin;for(let i=0;i<44;i++)x.fillRect(i*W/44,0,1.8,H)} + bandY(x,head,NECK,BODY_H+.1); + x.fillStyle=o.shirt;poly(x,[[-.24,NECK+.03],[0,o.vb||.5],[.24,NECK+.03]]); + if(o.tie){x.fillStyle=o.tie;poly(x,[[-.045,NECK+.01],[.045,NECK+.01],[.028,.84],[.065,.6],[0,.53],[-.065,.6],[-.028,.84]]); + if(o.tieS){x.strokeStyle=o.tieS;x.lineWidth=3;for(let i=0;i<5;i++){x.beginPath();x.moveTo(U(-.06),V(.62+i*.055));x.lineTo(U(.06),V(.66+i*.055));x.stroke()}}} + x.fillStyle=o.lap;for(const s of [-1,1])poly(x,[[s*.22,NECK+.03],[s*.4,NECK],[s*.3,.8],[s*.36,.76],[s*.07,(o.vb||.5)-.02],[0,(o.vb||.5)-.02]]); + x.fillStyle='rgba(20,16,30,.18)';x.fillRect(U(-.005),V(o.vb||.5),3,V(.02)-V(o.vb||.5)); + x.fillStyle=o.btn||'rgba(20,16,30,.55)';for(const y of [.44,.32])dot(x,U(.025),V(y),4.5); + if(o.sq){x.fillStyle=o.sq;poly(x,[[.36,.7],[.5,.7],[.44,.78],[.4,.74]])} + if(o.trousers){bandY(x,o.trousers,0,.22)} +} +function fur(x,c,seed,n,len){const R=G.rng(seed);x.strokeStyle=c;x.lineWidth=3;x.lineCap='round';for(let i=0;i{x.beginPath();x.moveTo(X,cy);x.lineTo(X+Math.cos(a)*len,cy+Math.sin(a)*len);x.stroke()},20)}} +function rivets(x,c,ys,n){x.fillStyle=c;for(const y of ys)for(let i=0;i{const X=ex+(i?8:-8);x.beginPath();x.roundRect?x.roundRect(X-13,ey+10,26,6,3):x.rect(X-13,ey+10,26,6);x.fill()})} + +// ---- shapes shared by hats and costumes (coordinates as above: the top of the head is y = 0.8, the face looks along +z) ---- +const capB=(c,c2)=>b=>{const y=.56;b.add(Sph(.385,18,9,0,Math.PI/2),c,[0,y,0],null,[1,.82,1]).add(Cyl(.25,.25,.03,18),c,[0,y+.0,.4],[.32,0,0],[1,1,.9]).add(Sph(.04,8,6),c2||c,[0,y+.32,0])}; +const headbandB=(c,y,r)=>b=>{b.add(Tor(r||.365,.042,6,26),c,[0,y||.6,0],[Math.PI/2,0,0])}; +function helmetB(b,c,r){const y=.38;r=r||.47; + b.add(Sph(r,22,8,0,Math.PI*.36),c,[0,y,0]).add(new THREE.SphereGeometry(r,22,6,Math.PI/2+1,TAU-2,Math.PI*.36,Math.PI*.27),c,[0,y,0]);} +// a stripe over the top of a helmet, front to back +const topStripe=(b,c,r,w)=>b.add(Tor(r,w||.03,4,24,Math.PI*.78),c,[0,.38,0],[0,Math.PI/2,Math.PI*.04]); +// a horizontal bar curving round the front at height y +const frontBar=(b,c,r,y,arc,t)=>b.add(Tor(r,t||.018,4,16,arc),c,[0,y,0],[Math.PI/2,0,Math.PI/2-arc/2]); +const fedoraB=(c,band,tilt)=>b=>{const y=.68;b.add(Lathe([[0,.27],[.14,.28],[.22,.25],[.28,.14],[.3,.03],[.46,.03],[.52,.08],[.49,.03],[.43,-.01],[.3,-.02],[0,-.02]],24),c,[0,y,0],[tilt||0,0,-.06]); + b.add(Cyl(.293,.3,.07,24,true),band,[0,y+.065,0],[tilt||0,0,-.06]);b.add(Box(.02,.06,.16),shade(c,-.3),[0,y+.27,.04],[tilt||0,0,-.06])}; +const topHatB=(c,band)=>b=>{b.add(Cyl(.42,.42,.03,26),c,[0,.66,0]).add(Cyl(.28,.29,.44,22),c,[0,.89,0]).add(Cyl(.295,.295,.08,22,true),band,[0,.72,0])}; +const bowlerB=c=>b=>{b.add(Sph(.31,18,8,0,Math.PI/2),c,[0,.66,0],null,[1,1.1,1]).add(Cyl(.41,.41,.026,24),c,[0,.66,0]).add(Tor(.41,.02,5,26),c,[0,.67,0],[Math.PI/2,0,0]).add(Cyl(.315,.315,.06,22,true),shade(c,.35),[0,.69,0])}; +function tricornB(b,c,trim,tatter){const y=.62; + b.add(Sph(.31,16,8,0,Math.PI/2),c,[0,y-.02,0],null,[1,.95,1]); + for(let i=0;i<3;i++){const a=Math.PI/3+i*TAU/3,cx=Math.sin(a)*.25,cz=Math.cos(a)*.25; + b.add(Box(.8,.27,.035),c,[cx,y+.1,cz],[.32,a,0,'YXZ']); + const up=[Math.sin(.32)*Math.sin(a),Math.cos(.32),Math.sin(.32)*Math.cos(a)]; + if(trim)b.add(Box(.8,.035,.05),trim,[cx+up[0]*.135,y+.1+up[1]*.135,cz+up[2]*.135],[.32,a,0,'YXZ']); + if(tatter)for(let k=-1;k<=1;k+=2)b.add(Box(.09,.08,.04),'#e8fff9',[cx+up[0]*.135+Math.cos(a)*k*.24,y+.1+up[1]*.135,cz+up[2]*.135-Math.sin(a)*k*.24],[.32,a,.6*k,'YXZ'])}} +const bandanaB=(c,c2)=>b=>{const y=.5;b.add(Sph(.395,18,9,0,Math.PI/2),c,[0,y,0],null,[1,.8,1.02]).add(Sph(.065,8,6),c2||c,[0,y+.02,-.4]); + for(const s of [-1,1])b.add(Box(.09,.24,.025),c2||c,[s*.07,y-.12,-.42],[.2,0,s*.38]); + for(let i=0;i<10;i++){const a=i/10*TAU+.3,r=.395*Math.sin(Math.PI*.3);b.add(Sph(.022,6,4),'#ffffff',[Math.sin(a)*r*1.02,y+.395*.8*Math.cos(Math.PI*.3),Math.cos(a)*r*1.04])}}; +const furHatB=c=>b=>{const y=.76;b.add(Cyl(.37,.35,.34,22),c,[0,y,0]).add(Sph(.37,22,6,0,Math.PI/2),c,[0,y+.16,0],null,[1,.3,1]);const R=G.rng(41); + for(let i=0;i<54;i++){const a=i/54*TAU*3+R()*.3,h=-.15+(i%3)*.13+R()*.04;b.add(Sph(.075,7,5),i%2?shade(c,.14):shade(c,-.06),[Math.sin(a)*.355,y+h,Math.cos(a)*.355])} + for(let i=0;i<10;i++){const a=i/10*TAU;b.add(Sph(.08,7,5),shade(c,.14),[Math.sin(a)*.2,y+.24,Math.cos(a)*.2])}}; +// a gold chain hanging round the neck, with a round medallion at the front +function chainB(b,c,medal){b.add(Tor(.455,.022,5,34),c,[0,.04,0],[Math.PI/2+.38,0,0]);if(medal)b.add(Cyl(.075,.075,.025,16),c,[0,-.2,.43],[Math.PI/2-.25,0,0]).add(Sph(.03,8,6),medal,[0,-.2,.45])} +function bowTieB(b,c){b.add(Sph(.035,8,6),c,[0,.07,.445]);for(const s of [-1,1])b.add(Cone(.065,.13,4),c,[s*.08,.07,.43],[0,0,s*Math.PI/2],[1,1,.45])} +const visorBand=(b,c,r,t0,t1,half)=>b.add(new THREE.SphereGeometry(r,20,3,Math.PI/2-half,half*2,Math.PI*t0,Math.PI*(t1-t0)),c,[0,.38,0]); + +FACES.push( + ['Eye Patch','#1e1b24','#fff8ee',eyePatch], + ['Black Shades','#1b1a22','#9aa6b4',shades], + ['Eye Black','#1e1b24','#f2f4f7',eyeBlack] +); +HATS.push( + ['Baseball Cap','#e8282b','#ffffff',capB('#e8282b','#ffffff')], + ['Fedora','#6b7280','#1e1b24',fedoraB('#6b7280','#1e1b24')], + ['Pirate Bandana','#d9312b','#ffffff',bandanaB('#d9312b')], + ['Fur Hat','#8a7460','#b8a48e',furHatB('#8a7460')], + ['Bowler Hat','#2f2c38','#6a6578',bowlerB('#2f2c38')] +); +COSTUMES.push( + // ---------------- SPORTS ---------------- + ['Soccer Kit','#2e8bff','#ffffff',(x,c)=>{fillC(x,'#2e8bff');sideStripe(x,'#ffffff',22,.36,NECK);bandY(x,'#ffffff',0,.36);hem(x,'#2e8bff',.3,.03); + neck(x,c,'#ffffff',.06,.26);x.fillStyle='#ffffff';poly(x,[[-.24,.78],[-.13,.78],[-.13,.68],[-.185,.62],[-.24,.68]]);x.fillStyle='#2e8bff';starAt(x,U(-.185),V(.715),8); + num(x,'9','#ffffff','#1f4fa8',70);num(x,'9','#ffffff',null,26,U(.2),.72);sheen(x,.18)}, + null,'#2e8bff','#26222e'], + ['Basketball Kit','#7a3cff','#ffd23f',(x,c)=>{fillC(x,'#7a3cff');bandY(x,c,NECK-.02,BODY_H+.1); + x.fillStyle=c;for(const s of [-1,1]){ell(x,U(s*SIDE),V(.8),.17*PXU,.14*PXV);x.fill()} + x.strokeStyle='#ffd23f';x.lineWidth=6;for(const s of [-1,1]){ell(x,U(s*SIDE),V(.8),.17*PXU,.14*PXV);x.stroke()} + neck(x,c,'#ffd23f',.14,.2);sideStripe(x,'#ffd23f',14,0,.4);hem(x,'#ffd23f',.4,.025); + num(x,'7','#ffd23f','#3d1a8c',74);num(x,'7','#ffd23f','#3d1a8c',46,U(0),.6);sheen(x,.18)}, + headbandB('#ffd23f'),null,'#ffffff'], + ['Gridiron Gear','#d9312b','#ffffff',(x,c)=>{fillC(x,'#d9312b');bandY(x,'#f2e6c9',0,.4);x.fillStyle='#d9312b';x.fillRect(0,V(.4),W,4); + sideStripe(x,'#d9312b',10,0,.4);neck(x,c,'#ffffff',.05,.24);for(const s of [-1,1]){x.fillStyle='#ffffff';x.fillRect(U(s*SIDE)-30,V(.88),60,8);x.fillRect(U(s*SIDE)-30,V(.84),60,5)} + num(x,'42','#ffffff','#7a1712',62);num(x,'42','#ffffff','#7a1712',50,U(0),.62);sheen(x,.2)}, + b=>{helmetB(b,'#d9312b');topStripe(b,'#ffffff',.475,.035); + frontBar(b,'#9aa4b0',.5,.17,1.7);frontBar(b,'#9aa4b0',.5,.29,1.5);for(const s of [-1,1])b.add(Cyl(.018,.018,.24,6),'#9aa4b0',[s*Math.sin(.82)*.5,.24,Math.cos(.82)*.5]); + for(const s of [-1,1])b.add(Sph(.24,12,8),'#d9312b',[s*.28,.04,0],null,[1.1,.55,1.2])},'#d9312b','#1e1b24'], + ['Baseball Uniform','#fbfaf5','#1f3b73',(x,c)=>{fillC(x,'#fbfaf5');x.fillStyle='rgba(31,59,115,.5)';for(let i=0;i<34;i++)x.fillRect(i*W/34,0,2,H); + bandY(x,'#1f3b73',.36,.39);neck(x,c,'#1f3b73',.1,.2);x.fillStyle='#1f3b73';x.fillRect(U(0)-2,V(.8),4,V(.39)-V(.8)); + x.fillStyle='#1f3b73';for(const y of [.72,.6,.48])dot(x,U(.035),V(y),4);bandY(x,'#1f3b73',0,.07); + num(x,'12','#1f3b73','#ffffff',62);sheen(x,.15)}, + capB('#1f3b73','#1f3b73'),'#fbfaf5','#1f3b73'], + ['Hockey Kit','#19b3a6','#ffffff',(x,c)=>{fillC(x,'#19b3a6');bandY(x,'#ffffff',.44,.52);bandY(x,'#1e1b24',.47,.49);bandY(x,'#2a2a33',0,.36);hem(x,'#19b3a6',.3,.03); + neck(x,c,'#ffffff',.12,.22);x.strokeStyle='#ffffff';x.lineWidth=3;for(let i=0;i<4;i++){x.beginPath();x.moveTo(U(-.05),V(.88-i*.025));x.lineTo(U(.05),V(.88-i*.025));x.stroke()} + num(x,'88','#ffffff','#0d6b63',62);sheen(x,.18)}, + b=>{helmetB(b,'#ffffff',.465);for(const s of [-1,1])b.add(Cyl(.09,.09,.05,14),'#e6e9ee',[s*.44,.3,.05],[0,0,Math.PI/2]);b.add(Box(.5,.03,.08),'#19b3a6',[0,.62,.32],[-.5,0,0])},'#19b3a6','#9aa6b4'], + ['Tennis Whites','#ffffff','#46d37a',(x,c)=>{fillC(x,'#ffffff');bandY(x,'#f6f6f9',0,.36);hem(x,'#46d37a',.355,.02);neck(x,c,null,.02,.26); + x.fillStyle='#ffffff';for(const s of [-1,1])poly(x,[[s*.04,NECK-.02],[s*.28,NECK+.02],[s*.24,.82],[s*.06,.84]]);x.strokeStyle='#46d37a';x.lineWidth=3; + for(const s of [-1,1]){x.beginPath();x.moveTo(U(s*.06),V(.84));x.lineTo(U(s*.24),V(.82));x.stroke()}x.fillStyle='#d8dbe2';for(const y of [.8,.74])dot(x,U(0),V(y),3.5); + x.fillStyle='#46d37a';ell(x,U(.24),V(.7),9,9*AR);x.fill();sheen(x,.12)}, + headbandB('#46d37a'),'#ffffff','#ffffff'], + ['Boxing Champ','#e8282b','#ffcf3d',(x,c)=>{fillC(x,c);bandY(x,'#e8282b',.04,.56);bandY(x,'#ffffff',.5,.6);bandY(x,'#e8282b',.53,.56); + sideStripe(x,'#ffffff',10,.04,.5);x.strokeStyle='rgba(36,22,63,.25)';x.lineWidth=3;x.beginPath();x.moveTo(U(0),V(.5));x.lineTo(U(0),V(.2));x.stroke();sheen(x,.2)}, + b=>{helmetB(b,'#e8282b',.46);for(const s of [-1,1])b.add(Sph(.12,10,8),'#e8282b',[s*.35,.22,.24],null,[.6,1,1]); + b.add(Tor(.43,.055,6,30),'#ffcf3d',[0,-.39,0],[Math.PI/2,0,0]).add(Cyl(.13,.13,.04,18),'#ffcf3d',[0,-.39,.44],[Math.PI/2,0,0]).add(Sph(.05,10,8),'#e8282b',[0,-.39,.47]); + for(const s of [-1,1])b.add(Box(.09,.1,.03),'#ffe58a',[s*.2,-.39,.4],[0,s*.45,0])},'#e8282b','#ffffff'], + ['Track Star','#ff3b5c','#ffffff',(x,c)=>{fillC(x,'#ff3b5c');bandY(x,c,NECK-.02,BODY_H+.1);x.fillStyle=c;for(const s of [-1,1]){ell(x,U(s*SIDE),V(.82),.15*PXU,.13*PXV);x.fill()} + neck(x,c,null,.12,.2);sideStripe(x,'#ffffff',8,.3,.86);bandY(x,'#1f3b73',0,.3); + x.fillStyle='#ffffff';x.fillRect(U(-.17),V(.8),.34*PXU,V(.5)-V(.8));x.strokeStyle='#b9bfca';x.lineWidth=2;x.strokeRect(U(-.17),V(.8),.34*PXU,V(.5)-V(.8)); + x.fillStyle='#c9d1da';for(const [u,y] of [[-.15,.78],[.15,.78],[-.15,.52],[.15,.52]])dot(x,U(u),V(y),3); + num(x,'205','#1e1b24',null,36,U(0),.645);x.fillStyle='#ff3b5c';x.fillRect(U(-.15),V(.765),.3*PXU,5);sheen(x,.15)}, + null,null,'#9be84a'], + ['Swim Team','#1f3b73','#ffd23f',(x,c)=>{fillC(x,c);bandY(x,'#1f3b73',.04,.46);sideStripe(x,'#ffd23f',12,.04,.46);hem(x,'#ffd23f',.42,.02);sheen(x,.22)}, + b=>{const y=.48;b.add(Sph(.405,18,9,0,Math.PI*.5),'#ffd23f',[0,y,0],null,[1,.86,1.02]).add(Tor(.405,.018,4,28),'#e0b520',[0,y+.005,0],[Math.PI/2,0,0]); + b.add(Tor(.38,.018,4,28),'#1e1b24',[0,.58,0],[Math.PI/2,-.0,0]);for(const s of [-1,1])b.add(Sph(.075,12,8),'#2ec5ff',[s*.11,.6,.33],[-.3,s*.25,0],[1,.75,.45]).add(Tor(.075,.016,4,14),'#1e1b24',[s*.11,.6,.345],[-.3,s*.25,0],[1,.75,1])}, + null,null], + ['Ski Racer','#ff3b3b','#2e5ad9',(x,c)=>{fillC(x,'#ff3b3b');x.fillStyle='#ffffff';for(let i=0;i<5;i++){const x0=i*W/5;x.beginPath();x.moveTo(x0,V(.2));x.lineTo(x0+W/10,V(.55));x.lineTo(x0+W/5,V(.2));x.lineTo(x0+W/5,V(.32));x.lineTo(x0+W/10,V(.67));x.lineTo(x0,V(.32));x.fill()} + x.fillStyle='#2e5ad9';for(let i=0;i<5;i++){const x0=i*W/5;x.beginPath();x.moveTo(x0,V(.32));x.lineTo(x0+W/10,V(.67));x.lineTo(x0+W/5,V(.32));x.lineTo(x0+W/5,V(.4));x.lineTo(x0+W/10,V(.75));x.lineTo(x0,V(.4));x.fill()} + neck(x,c,'#2e5ad9',.04,.24);x.fillStyle='#ffffff';x.fillRect(U(-.15),V(.86),.3*PXU,V(.78)-V(.86));num(x,'3','#ff3b3b',null,30,U(0),.82);sheen(x,.3)}, + b=>{helmetB(b,'#ff3b3b',.47);topStripe(b,'#ffffff',.475,.03);visorBand(b,'#ff9f1a',.49,.29,.38,.62);b.add(Tor(.42,.025,4,28),'#1e1b24',[0,.55,-.0],[Math.PI/2,0,0]); + for(const s of [-1,1])b.add(Box(.05,.11,.05),'#1e1b24',[s*Math.sin(.62)*.47,.58,Math.cos(.62)*.47],[0,s*.62,0])},'#ff3b3b','#ffffff'], + ['Racing Driver','#ff6b1a','#1e1b24',(x,c)=>{fillC(x,'#ff6b1a'); + for(const y0 of [.34,.74]){for(let i=0;i<32;i++)for(let r=0;r<2;r++){x.fillStyle=(i+r)%2?'#ffffff':'#1e1b24';x.fillRect(i*W/32,V(y0+.045*(r+1)),W/32+.5,V(y0)-V(y0+.045)+.5)}} + sideStripe(x,'#1e1b24',14,0,.34);neck(x,c,'#1e1b24',.04,.24); + x.fillStyle='#ffffff';for(const [u,y] of [[-.22,.58],[.22,.58]]){x.beginPath();x.roundRect?x.roundRect(U(u)-18,V(y)-12,36,24,5):x.rect(U(u)-18,V(y)-12,36,24);x.fill()} + x.fillStyle='#ff6b1a';starAt(x,U(-.22),V(.58),9);x.fillStyle='#1f3b73';x.fillRect(U(.22)-12,V(.58)-6,24,4);x.fillRect(U(.22)-12,V(.58)+2,24,4); + num(x,'1','#ffffff','#1e1b24',70,W,.56);sheen(x,.22)}, + b=>{helmetB(b,'#ffffff',.48);topStripe(b,'#ff6b1a',.485,.05);visorBand(b,'#3b4a6b',.5,.18,.3,.75);for(const s of [-1,1])b.add(Cyl(.035,.035,.03,10),'#9aa4b0',[s*Math.sin(.75)*.48,.6,Math.cos(.75)*.48],[0,0,Math.PI/2]); + b.add(Tor(.44,.04,5,28),'#1e1b24',[0,.08,0],[Math.PI/2,0,0])},'#ff6b1a','#1e1b24'], + ['Referee','#ffffff','#1e1b24',(x,c)=>{fillC(x,'#ffffff');vStripes(x,'#1e1b24',22,.36,NECK);bandY(x,'#2a2830',0,.36);neck(x,c,'#1e1b24',.06,.24); + x.fillStyle='#ffd23f';x.fillRect(U(.18)-10,V(.76),20,14);sheen(x,.15)}, + b=>{b.add(Tor(.45,.01,4,34),'#1e1b24',[0,.03,0],[Math.PI/2+.42,0,0]).add(Cyl(.036,.036,.12,10),'#c9d1da',[0,-.18,.455],[0,0,Math.PI/2]).add(Sph(.045,10,8),'#c9d1da',[.06,-.18,.455]).add(Box(.04,.03,.03),'#c9d1da',[-.03,-.15,.455])}, + '#ffffff','#1e1b24'], + ['Team Mascot','#ffb21f','#2e5ad9',(x,c)=>{fillC(x,'#ffb21f');fur(x,'#ffd36a',61,420,9);fur(x,'#e0901a',62,260,7); + x.fillStyle='#fff1c9';ell(x,U(0),V(.3),.42*PXU,.36*PXV);x.fill(); + bandY(x,'#2e5ad9',.42,.66);hem(x,'#ffffff',.62,.025);hem(x,'#ffffff',.42,.025);num(x,'00','#ffffff','#14306e',48,W,.54);sheen(x,.12)}, + b=>{b.add(Cone(.12,.26,10),'#ff7a1a',[0,.58,.44],[Math.PI/2,0,0],[1.1,1,.7]).add(Cone(.08,.16,10),'#e85f0c',[0,.5,.4],[Math.PI/2+.25,0,0],[1.1,1,.6]); + for(const s of [-1,1])b.add(Sph(.12,14,10),'#ffffff',[s*.13,.68,.27],null,[1,1.15,.6]).add(Sph(.055,10,8),'#1b1430',[s*.12,.68,.34]).add(Box(.17,.035,.03),'#c96a10',[s*.13,.83,.24],[-.3,0,-s*.3]); + for(let i=-1;i<=1;i++)b.add(Sph(.1,10,8),i?'#e8282b':'#ff4d4d',[i*.07,.88,-.05+Math.abs(i)*-.05],[-.3,0,-i*.4],[.45,1.6,.45]); + for(let i=-2;i<=2;i++)b.add(Sph(.14,10,8),i%2?'#ff8a1f':'#e8282b',[i*.09,-.42,-.47],[-.9,0,i*.35],[.4,1.4,.25]); + for(let i=0;i<8;i++)b.add(Tor(.45,.065,6,6,TAU/8+.02),i%2?'#ffffff':'#2e5ad9',[0,.1,0],[Math.PI/2,0,i*TAU/8]); + b.add(Box(.13,.28,.05),'#2e5ad9',[.22,-.08,.44],[-.15,0,.12]).add(Box(.13,.07,.052),'#ffffff',[.235,-.15,.44],[-.15,0,.12])},'#ffb21f','#ff7a1a'], + ['Karate Gi','#ffffff','#1e1b24',(x,c)=>{fillC(x,'#fbfbf8');neck(x,c,null,.36,.12); + x.fillStyle='#fbfbf8';poly(x,[[-.14,NECK+.01],[-.02,NECK+.01],[.26,.46],[.12,.46]]);x.strokeStyle='rgba(120,120,140,.5)';x.lineWidth=3; + x.beginPath();x.moveTo(U(-.13),V(NECK));x.lineTo(U(.14),V(.46));x.stroke();x.beginPath();x.moveTo(U(.14),V(NECK));x.lineTo(U(.04),V(.72));x.stroke(); + bandY(x,'#1e1b24',.38,.46);x.strokeStyle='rgba(255,255,255,.25)';x.lineWidth=2;x.beginPath();x.moveTo(0,V(.42));x.lineTo(W,V(.42));x.stroke();sheen(x,.12)}, + b=>{b.add(Sph(.065,10,8),'#1e1b24',[0,-.38,.43],null,[1.3,1,.7]);for(const s of [-1,1])b.add(Box(.07,.26,.025),'#1e1b24',[s*.06,-.52,.43],[-.1,0,s*.25]); + headbandB('#e8282b',.6,.362)(b);for(const s of [-1,1])b.add(Box(.07,.26,.02),'#e8282b',[s*.06,.47,-.38],[.25,0,s*.35])},'#fbfbf8',null], + ['Golf Pro','#2e5ad9','#46d37a',(x,c)=>{fillC(x,'#ffffff');bandY(x,'#e3d3a8',0,.36); + x.save();x.beginPath();x.rect(0,V(.86),W,V(.36)-V(.86));x.clip();fillC(x,'#2e5ad9');const s=W/14,h=(V(.36)-V(.86))/3; + for(let r=0;r<4;r++)for(let i=0;i<15;i++){x.fillStyle=(i+r)%2?'#46d37a':'#2a4fbf';const cx=i*s+(r%2)*s/2,cy=V(.86)+r*h;x.beginPath();x.moveTo(cx,cy-h/2);x.lineTo(cx+s/2,cy);x.lineTo(cx,cy+h/2);x.lineTo(cx-s/2,cy);x.fill()} + x.strokeStyle='rgba(255,255,255,.7)';x.lineWidth=1.5;for(let i=-14;i<28;i++){x.beginPath();x.moveTo(i*s,V(.86));x.lineTo(i*s+h*3*.5,V(.36));x.stroke();x.beginPath();x.moveTo(i*s,V(.86));x.lineTo(i*s-h*3*.5,V(.36));x.stroke()}x.restore(); + neck(x,c,'#ffffff',.2,.18);x.fillStyle='#ffffff';for(const s2 of [-1,1])poly(x,[[s2*.02,NECK-.02],[s2*.24,NECK+.02],[s2*.2,.84],[s2*.04,.86]]);sheen(x,.12)}, + b=>{const y=.55;b.add(Sph(.4,18,8,0,Math.PI/2),'#8a7258',[0,y,-.02],null,[1.02,.72,1.12]).add(Cyl(.2,.2,.03,16),'#7a6248',[0,y+.02,.33],[.2,0,0],[1,1,.55]).add(Sph(.035,8,6),'#7a6248',[0,y+.21,.03])}, + '#ffffff','#ffffff'], + ['Cheer Squad','#ff4f9a','#ffffff',(x,c)=>{fillC(x,'#ff4f9a');bandY(x,c,NECK-.02,BODY_H+.1);x.fillStyle=c;for(const s of [-1,1]){ell(x,U(s*SIDE),V(.8),.15*PXU,.13*PXV);x.fill()} + neck(x,c,'#ffffff',.14,.2);x.fillStyle='#ffffff';poly(x,[[-.34,.72],[0,.56],[.34,.72],[.34,.66],[0,.5],[-.34,.66]]); + bandY(x,'#ffffff',.42,.46);bandY(x,'#ff4f9a',.16,.42);x.strokeStyle='rgba(120,10,60,.35)';x.lineWidth=3;for(let i=0;i<26;i++){x.beginPath();x.moveTo(i*W/26,V(.42));x.lineTo(i*W/26+3,V(.16));x.stroke()}hem(x,'#ffffff',.16,.025);sheen(x,.16)}, + b=>{for(const s of [-1,1])b.add(Sph(.17,12,8),'#ffffff',[s*.19,.8,-.12],[-.5,0,s*.4],[1.4,.9,.45]);b.add(Sph(.075,8,6),'#ffffff',[0,.8,-.13]);for(const s of [-1,1])b.add(Box(.07,.2,.025),'#ffffff',[s*.07,.66,-.28],[.5,0,s*.3])}, + null,'#ffffff'], + // ---------------- PIRATES ---------------- + ['Pirate Captain','#b3202a','#e8b923',(x,c)=>{fillC(x,'#b3202a');bandY(x,'#1e1b24',0,.14); + bandY(x,c,NECK,BODY_H+.1);x.fillStyle='#fbf3e0';poly(x,[[-.22,NECK+.02],[0,.62],[.22,NECK+.02]]);x.strokeStyle='#e6d6b4';x.lineWidth=3;for(let i=0;i<4;i++){x.beginPath();x.moveTo(U(-.16+i*.02),V(.86-i*.06));x.quadraticCurveTo(U(0),V(.8-i*.06),U(.16-i*.02),V(.86-i*.06));x.stroke()} + x.fillStyle='#e8b923';for(const s of [-1,1]){x.fillRect(U(s*.2)-3,V(NECK),6,V(.14)-V(NECK));for(const y of [.76,.64,.52,.4,.28])dot(x,U(s*.28),V(y),5)} + bandY(x,'#3b2416',.4,.47);x.fillStyle='#e8b923';x.fillRect(U(0)-14,V(.475),28,V(.395)-V(.475));x.fillStyle='#3b2416';x.fillRect(U(0)-7,V(.455),14,V(.415)-V(.455)); + hem(x,'#e8b923',.14,.025);sheen(x,.2)}, + b=>{tricornB(b,'#1e1b24','#e8b923');b.add(Sph(.09,10,8),'#ffffff',[.3,.82,-.05],[0,0,-.9],[.5,1.9,.5])},'#b3202a','#1e1b24',eyePatch], + ['Deckhand','#ffffff','#1f3b73',(x,c)=>{fillC(x,'#ffffff');for(let i=0;i<8;i++)bandY(x,'#1f3b73',.36+i*.07,.36+i*.07+.035);bandY(x,'#c9a46a',0,.36); + x.strokeStyle='#8a6a3a';x.lineWidth=5;x.setLineDash([7,4]);x.beginPath();x.moveTo(0,V(.37));x.lineTo(W,V(.37));x.stroke();x.setLineDash([]); + x.fillStyle='#b8925a';for(let i=0;i<10;i++){x.beginPath();x.moveTo(i*W/10,V(.0));x.lineTo(i*W/10+W/20,V(.06));x.lineTo(i*W/10+W/10,V(0));x.fill()} + neck(x,c,null,.1,.24);x.fillStyle='rgba(120,90,50,.35)';dot(x,U(.3),V(.2),8);dot(x,U(-.5),V(.1),6);sheen(x,.15)}, + bandanaB('#d9312b'),'#ffffff',null,eyePatch], + ['Parrot Pal','#3f6e1d','#e8282b',(x,c)=>{fillC(x,'#fbf3e0');bandY(x,'#2a2830',0,.34);bandY(x,'#e8282b',.34,.44); + x.fillStyle='#6b4a1f';for(const s of [-1,1])poly(x,[[s*.08,NECK],[s*.7,NECK],[s*.7,.44],[s*.16,.44]]);x.fillStyle='#6b4a1f';x.fillRect(0,V(NECK),W*.18,V(.44)-V(NECK));x.fillRect(W*.82,V(NECK),W*.18,V(.44)-V(NECK)); + x.fillStyle='#e8b923';for(const s of [-1,1])for(const y of [.74,.6])dot(x,U(s*.2),V(y),4);neck(x,c,null,.08,.2);sheen(x,.16)}, + b=>{bandanaB('#2e5ad9')(b);const P=[.43,.25,.02]; + b.add(Sph(.1,12,10),'#2fb85a',P,[.25,0,-.15],[.8,1.25,.85]).add(Sph(.075,12,10),'#e8282b',[P[0]+.01,P[1]+.14,P[2]+.03]).add(Cone(.03,.08,8),'#ffd23f',[P[0]+.015,P[1]+.13,P[2]+.12],[Math.PI/2+.4,0,0]); + b.add(Sph(.07,10,8),'#1e8a45',[P[0]+.06,P[1]-.01,P[2]-.02],[.2,0,-.2],[.5,1.2,.9]).add(Box(.05,.22,.02),'#2e5ad9',[P[0]-.01,P[1]-.17,P[2]-.07],[.5,0,0]).add(Box(.04,.18,.02),'#ffd23f',[P[0]+.03,P[1]-.15,P[2]-.07],[.5,0,-.15]); + for(const s of [-1,1])b.add(Sph(.018,6,4),'#1b1430',[P[0]+s*.045,P[1]+.16,P[2]+.08])},'#fbf3e0','#2a2830',eyePatch], + ['Ghost Pirate','#bff5e6','#5fc9b4',(x,c)=>{fillC(x,'#c8f7ea');const g=x.createLinearGradient(0,0,0,H);g.addColorStop(0,'rgba(255,255,255,.35)');g.addColorStop(1,'rgba(255,255,255,0)');x.fillStyle=g;x.fillRect(0,0,W,H); + x.fillStyle='#7fd6c4';x.beginPath();x.moveTo(0,V(NECK));for(let i=0;i<=16;i++){x.lineTo(i*W/16,V(i%2?.08:.24))}x.lineTo(W,V(NECK));x.fill(); + x.fillStyle='#c8f7ea';x.beginPath();x.moveTo(U(-.24),V(NECK));x.lineTo(U(0),V(.5));x.lineTo(U(.24),V(NECK));x.fill(); + x.fillStyle='#e8fff9';for(const s of [-1,1])for(const y of [.74,.6,.46])dot(x,U(s*.28),V(y),5); + x.strokeStyle='rgba(255,255,255,.6)';x.lineWidth=3;const R=G.rng(71);for(let i=0;i<14;i++){const cx=R()*W,cy=V(.1+R()*.7);x.beginPath();x.moveTo(cx,cy);x.bezierCurveTo(cx+10,cy-12,cx-10,cy-24,cx,cy-36);x.stroke()} + sheen(x,.1)}, + b=>{tricornB(b,'#8fd9c8',null,true);b.add(Sph(.05,8,6),'#e8fff9',[0,.86,.18])},'#bff5e6','#8fd9c8',x=>{eyePatch(x)}], + // ---------------- MOBSTERS AND SUITS ---------------- + ['Pinstripe Suit','#2b3550','#e8282b',(x,c)=>{suit(x,c,{jacket:'#2b3550',pin:'rgba(220,226,240,.55)',shirt:'#ffffff',tie:'#e8282b',tieS:'#a3141c',lap:'#232b42',sq:'#ffffff'}); + x.fillStyle='#e8282b';heart(x,U(-.34),V(.76),5);sheen(x,.18)}, + fedoraB('#4a5163','#1e1b24'),'#2b3550','#f7f5ee'], + ['The Boss','#b98a52','#7a6250',(x,c)=>{suit(x,c,{jacket:'#b98a52',shirt:'#ffffff',tie:'#3a2f4a',lap:'#a3763f',vb:.56,btn:'#5a3a1a'}); + x.fillStyle='#2a2830';x.fillRect(U(-.06),V(.56),.12*PXU,V(.0)-V(.56)); + bandY(x,'#a3763f',.42,.47);x.fillStyle='#e8b923';x.fillRect(U(.3)-8,V(.475),16,V(.415)-V(.475)); + x.strokeStyle='rgba(90,58,26,.35)';x.lineWidth=3;for(const s of [-1,1]){x.beginPath();x.moveTo(U(s*.06),V(.56));x.lineTo(U(s*.06),V(0));x.stroke()} + x.fillStyle='#fbfbf8';poly(x,[[-.42,.92],[-.3,.92],[-.2,.62],[-.3,.58]]);sheen(x,.18)}, + b=>{b.add(Tor(.44,.085,8,28),'#7a6250',[0,.09,-.02],[Math.PI/2+.12,0,0]);const R=G.rng(43);for(let i=0;i<18;i++){const a=R()*TAU;b.add(Sph(.05,6,5),'#8f7663',[Math.sin(a)*.47,.09-Math.cos(a)*.05,Math.cos(a)*.47-.02])} + furHatB('#7a6250')(b)},'#b98a52','#2a2830'], + ['Tracksuit Tough Guy','#2e5ad9','#ffcf3d',(x,c)=>{fillC(x,'#2e5ad9');for(const off of [-10,6])for(const s of [-1,1]){x.fillStyle='#ffffff';x.fillRect(U(s*SIDE)+off,0,5,V(0)-V(NECK)+H)} + neck(x,c,'#ffffff',.02,.24);x.fillStyle='#ffffff';x.fillRect(U(0)-2,V(NECK),4,V(.38)-V(NECK));x.fillStyle='#c9d1da';x.fillRect(U(0)-4,V(.86),8,10); + bandY(x,'#2448b8',.36,.4);x.strokeStyle='rgba(255,255,255,.18)';x.lineWidth=2;for(let i=0;i<14;i++){x.beginPath();x.moveTo(i*W/14,V(.6));x.quadraticCurveTo(i*W/14+12,V(.5),i*W/14,V(.42));x.stroke()}sheen(x,.25)}, + b=>chainB(b,'#ffcf3d','#ffe58a'),'#2e5ad9','#ffffff'], + ['Bodyguard','#34323c','#1e1b24',(x,c)=>{suit(x,c,{jacket:'#3a3844',shirt:'#ffffff',tie:'#1e1b24',lap:'#2e2c37',btn:'#16141c'});sheen(x,.25)}, + b=>{b.add(Sph(.045,8,6),'#e8e0d0',[.43,.3,.04]);for(let i=0;i<5;i++)b.add(Tor(.022,.007,4,10),'#e8e0d0',[.44,.24-i*.04,-.03],[Math.PI/2,0,0])},'#3a3844','#1e1b24',shades], + ['Tuxedo','#2a2830','#ffffff',(x,c)=>{suit(x,c,{jacket:'#2f2d36',shirt:'#ffffff',lap:'#4a4756',vb:.44,btn:'#4a4756'}); + x.fillStyle='#1e1b24';for(const y of [.8,.7,.6])dot(x,U(0),V(y),3.5);x.fillStyle='#d9312b';heart(x,U(-.34),V(.78),6);x.fillStyle='#2e8b3a';dot(x,U(-.32),V(.72),3);sheen(x,.25)}, + b=>{bowTieB(b,'#1e1b24');topHatB('#2f2d36','#4a4756')(b)},'#2f2d36','#1e1b24'], + ['Business Suit','#6b7280','#2e5ad9',(x,c)=>{suit(x,c,{jacket:'#6b7280',shirt:'#e9f1ff',tie:'#2e5ad9',tieS:'#9fc3ff',lap:'#5d6472',sq:'#e9f1ff'});sheen(x,.2)}, + null,'#6b7280','#5a3a22'], + // ---------------- ROBOTS ---------------- + ['Tin Robot','#aab3bd','#e8282b',(x,c)=>{const g=x.createLinearGradient(0,0,W,0);for(let i=0;i<=8;i++)g.addColorStop(i/8,i%2?'#bcc5cf':'#9ea8b4');x.fillStyle=g;x.fillRect(0,0,W,H); + x.strokeStyle='rgba(60,70,85,.55)';x.lineWidth=3;for(const y of [.2,.86,1.45]){x.beginPath();x.moveTo(0,V(y));x.lineTo(W,V(y));x.stroke()}rivets(x,'rgba(60,70,85,.6)',[.24,.82,1.41],24); + x.fillStyle='#7d8794';x.beginPath();x.roundRect?x.roundRect(U(-.24),V(.78),.48*PXU,V(.3)-V(.78),8):x.rect(U(-.24),V(.78),.48*PXU,V(.3)-V(.78));x.fill(); + [['#e8282b',-.14],['#ffd23f',-.04],['#46d37a',.06]].forEach(([cc,u])=>{x.fillStyle=cc;dot(x,U(u),V(.7),6)});x.fillStyle='#ffffff';ell(x,U(.15),V(.5),20,20*AR);x.fill(); + x.strokeStyle='#1e1b24';x.lineWidth=3;x.beginPath();x.moveTo(U(.15),V(.5));x.lineTo(U(.15)+12,V(.5)-8);x.stroke();x.fillStyle='#2ec5ff';for(let i=0;i<4;i++)x.fillRect(U(-.2)+i*10,V(.44),6,V(.34)-V(.44));sheen(x,.25)}, + b=>{b.add(Cyl(.025,.025,.26,8),'#7d8794',[0,.92,0]).add(Sph(.065,10,8),'#e8282b',[0,1.07,0]).add(Cyl(.08,.08,.03,12),'#7d8794',[0,.8,0]); + for(const s of [-1,1])b.add(Cyl(.085,.085,.08,12),'#8a949f',[s*.43,.32,0],[0,0,Math.PI/2]).add(Cyl(.04,.04,.07,8),'#e8282b',[s*.49,.32,0],[0,0,Math.PI/2]); + b.add(Cyl(.03,.03,.18,8),'#c9a46a',[0,-.15,-.5],[Math.PI/2,0,0]);for(const s of [-1,1])b.add(Sph(.075,10,8),'#e8b923',[s*.07,-.15,-.6],null,[1,1.2,.3])},'#8a949f','#6b7480'], + ['Sleek Android','#f4f7fb','#2ec5ff',(x,c)=>{fillC(x,'#f4f7fb');const g=x.createLinearGradient(0,0,0,H);g.addColorStop(0,'rgba(255,255,255,.6)');g.addColorStop(1,'rgba(160,180,205,.35)');x.fillStyle=g;x.fillRect(0,0,W,H); + x.strokeStyle='#2ec5ff';x.lineWidth=3.5;x.lineJoin='round';const R=G.rng(81);for(let i=0;i<16;i++){let X=R()*W,Y=V(.05+R()*.75);x.beginPath();x.moveTo(X,Y);for(let k=0;k<3;k++){if(k%2)X+=(R()-.5)*60;else Y-=10+R()*24;x.lineTo(X,Y)}x.stroke();x.fillStyle='#2ec5ff';dot(x,X,Y,4)} + x.strokeStyle='rgba(150,165,185,.6)';x.lineWidth=2;for(const y of [.86,.36]){x.beginPath();x.moveTo(0,V(y));x.lineTo(W,V(y));x.stroke()}x.fillStyle='#2ec5ff';ell(x,U(0),V(.66),14,14*AR);x.fill();x.fillStyle='#e6fbff';ell(x,U(0),V(.66),6,6*AR);x.fill();sheen(x,.2)}, + b=>{for(const s of [-1,1])b.add(Cyl(.12,.12,.05,20),'#e6ecf3',[s*.43,.32,0],[0,0,Math.PI/2]).add(Cyl(.075,.075,.06,18),'#2ec5ff',[s*.445,.32,0],[0,0,Math.PI/2]);b.add(Tor(.38,.018,4,30,Math.PI),'#2ec5ff',[0,.38,0],[0,Math.PI/2,0])},'#e6ecf3','#9fb0c4'], + ['Junkyard Bot','#b0683a','#7d8794',(x,c)=>{fillC(x,'#b0683a');const R=G.rng(91),P=['#7d8794','#5f9e8f','#c9a14a','#8a5a3a','#9aa4b0']; + for(let i=0;i<16;i++){const cx=R()*W,cy=R()*H,w=30+R()*50,h=20+R()*36;x.fillStyle=P[i%5];wrap(cx,X=>{x.fillRect(X-w/2,cy-h/2,w,h);x.fillStyle='rgba(40,30,25,.55)';for(const [dx,dy] of [[-1,-1],[1,-1],[-1,1],[1,1]])dot(x,X+dx*(w/2-5),cy+dy*(h/2-5),2.5);x.fillStyle=P[i%5]},60)} + x.fillStyle='rgba(120,60,25,.45)';for(let i=0;i<24;i++){const cx=R()*W,cy=R()*H;x.fillRect(cx,cy,3,10+R()*16)}num(x,'B-7','#f2e6c9',null,30,U(.3),.55);sheen(x,.2)}, + b=>{b.add(Cyl(.02,.02,.22,6),'#7d8794',[.1,.9,0],[0,0,-.35]).add(Cyl(.02,.02,.16,6),'#7d8794',[.2,1.05,0],[0,0,.6]).add(Sph(.045,8,6),'#ffd23f',[.14,1.12,0]); + for(let i=0;i<5;i++)b.add(Tor(.05,.012,4,12),'#c9d1da',[-.16,.8+i*.035,0],[Math.PI/2,0,0]);b.add(Sph(.04,8,6),'#e8282b',[-.16,.99,0]); + b.add(Cyl(.09,.11,.08,6),'#7d8794',[-.43,.32,0],[0,0,Math.PI/2]).add(Cyl(.1,.1,.05,16),'#5f9e8f',[.43,.3,0],[0,0,Math.PI/2]).add(Tor(.06,.012,4,12),'#2a2a33',[.46,.3,0],[0,Math.PI/2,0])},'#7d8794','#5a6370'], + // ---------------- AND MORE ---------------- + ['Wizard','#6a3cc8','#ffd23f',(x,c)=>{fillC(x,'#6a3cc8');x.fillStyle='#ffd23f';const R=G.rng(97);for(let i=0;i<22;i++){const cx=R()*W,cy=V(.05+R()*.8);wrap(cx,X=>starAt(x,X,cy,6+R()*5),14)} + for(let i=0;i<5;i++){const cx=R()*W,cy=V(.15+R()*.6);x.fillStyle='#fff3b0';wrap(cx,X=>{ell(x,X,cy,10,10*AR);x.fill();x.fillStyle='#6a3cc8';ell(x,X+5,cy-2,9,9*AR);x.fill();x.fillStyle='#fff3b0'},14)} + hem(x,'#ffd23f',.02,.05);bandY(x,'#ffd23f',.44,.48);neck(x,c,'#ffd23f',.08,.26);sheen(x,.18)}, + b=>{b.add(Cyl(.52,.52,.025,26),'#5a30b0',[0,.64,0]).add(Cyl(.27,.33,.24,20),'#6a3cc8',[0,.77,0]).add(Cyl(.275,.31,.06,20,true),'#ffd23f',[0,.68,0]); + b.add(Cyl(.18,.27,.24,18),'#6a3cc8',[0,1,-.04],[-.2,0,0]).add(Cyl(.09,.18,.22,16),'#6a3cc8',[0,1.2,-.14],[-.5,0,0]).add(Cone(.09,.24,14),'#6a3cc8',[0,1.33,-.3],[-1.05,0,0]); + b.add(Sph(.04,8,6),'#ffd23f',[0,1.41,-.42]);starPts(b,'#ffd23f',[.2,.8,.2],.06); + for(const [bx,by,r] of [[0,-.06,.17],[-.13,-.02,.12],[.13,-.02,.12],[-.08,-.2,.13],[.08,-.2,.13],[0,-.32,.12],[0,-.44,.08]])b.add(Sph(r,12,9),'#f7f5ee',[bx,by,.4+(by<-.3?.01:0)],null,[1,1.1,.5])},'#6a3cc8','#3b2a7a'], + ['Firefighter','#c9a24a','#ffd23f',(x,c)=>{fillC(x,'#c9a24a');for(const y of [.22,.56]){bandY(x,'#ffd23f',y,y+.07);bandY(x,'#e6ecf3',y+.022,y+.048)} + neck(x,c,'#1e1b24',.02,.24);x.fillStyle='#1e1b24';x.fillRect(U(0)-3,V(NECK),6,V(.04)-V(NECK));for(const y of [.8,.68,.44,.32])x.fillRect(U(0)-10,V(y)-3,20,6);sheen(x,.2)}, + b=>{b.add(Sph(.45,22,9,0,Math.PI*.45),'#e8282b',[0,.4,0]).add(Cyl(.56,.56,.03,26),'#d9312b',[0,.44,-.1],[-.12,0,0],[.88,1,1.12]); + b.add(Box(.06,.08,.62),'#d9312b',[0,.84,-.02]).add(Box(.2,.24,.03),'#ffcf3d',[0,.66,.42],[-.35,0,0]).add(Sph(.05,10,8),'#e8282b',[0,.66,.44],null,[1,1,.4])},'#c9a24a','#1e1b24'] +); +// a little five-point star of spheres (the wizard hat's badge) +function starPts(b,c,p,r){for(let i=0;i<5;i++){const a=i/5*TAU;b.add(Sph(r*.45,6,4),c,[p[0]+Math.sin(a)*r*.6,p[1]+Math.cos(a)*r*.6,p[2]])}b.add(Sph(r*.5,6,4),c,p)} +DANCES.push( + ['Touchdown Spike','#d9312b','#ffffff',(B,t)=>{const p=(t*.8)%1;B.tilt.rotation.set(0,0,0);B.tilt.position.y=.8; + if(p<.4){const u=p/.4;B.tilt.rotation.x=-.18*u;arms(B,0,.5,0,.4+2.5*u)} + else if(p<.55){const u=(p-.4)/.15;B.tilt.rotation.x=-.18+.5*u;arms(B,0,.5,-1.4*u,2.9-2.5*u)} + else{const u=(p-.55)/.45,h=Math.abs(Math.sin(u*Math.PI*3));B.tilt.position.y=.8+h*.3;B.tilt.rotation.z=Math.sin(u*Math.PI*6)*.12;arms(B,0,2.5+h*.3,0,2.5+h*.3)}}], + ['Boxer Shuffle','#e8282b','#ffcf3d',(B,t)=>{const s=Math.sin(t*14),j=Math.floor(t*3)%2,ph=(t*3)%1,jab=ph<.35?Math.sin(ph/.35*Math.PI):0; + B.tilt.position.y=.8+Math.abs(s)*.05;B.tilt.rotation.set(.12,Math.sin(t*3)*.25,0);arms(B,-1.25-(j?0:jab*.7),.3,-1.25-(j?jab*.7:0),.3);B.legs[0].rotation.x=s*.35;B.legs[1].rotation.x=-s*.35}], + ['Hornpipe Jig','#1f3b73','#ffffff',(B,t)=>{const s=Math.sin(t*4*Math.PI);B.tilt.position.y=.8+Math.abs(s)*.18;B.tilt.rotation.set(0,0,s*.12);arms(B,-1,-.2,-1,-.2); + B.legs[0].rotation.x=-Math.max(0,s)*1.1;B.legs[1].rotation.x=-Math.max(0,-s)*1.1}], + ['Big Boss Shrug','#b98a52','#e8b923',(B,t)=>{const p=(t/2.4)%1,u=Math.sin(Math.min(1,p*2.5)*Math.PI/2),k=p<.7?u:u*(1-(p-.7)/.3); + B.tilt.rotation.set(-.14*k,Math.sin(t*.8)*.15,0);B.tilt.position.y=.8+k*.05+Math.sin(t*5)*.01*k;arms(B,-.55*k,.3+.95*k,-.55*k,.3+.95*k)}] +); const LISTS=[COLOURS,PREMIUM,PATTERNS,PANTS,HATS,FACES,COSTUMES,DANCES,SCREAMS,SPLASHES]; const item=(k,i)=>k&&k[i]?LISTS[i][k[i]-1]||null:null; @@ -427,7 +708,7 @@ function dress(B,k){ } // what goes on the head: a costume's shape, else the undies on the head, else a hat let head=false; - if(cos){add(geoOf('cos'+k[6],cos[4]));head=true} + if(cos&&cos[4]){add(geoOf('cos'+k[6],cos[4]));head=true} else if(k[3]===HEAD_UNDIES){add(geoOf('undies',buildHeadUndies));head=true} else{const h=item(k,4);if(h){add(geoOf('hat'+k[4],h[3]));head=true;if(k[4]===2){c.prop=add(propGeo());c.prop.position.y=TOP-.2+.4}}} if(B.hat)B.hat.visible=!head&&!B.crown; @@ -439,7 +720,7 @@ function repaint(B){ const x=B.cv.getContext('2d'),look=B.look,cos=item(k,6),col=item(k,0),prem=cos?null:item(k,1),pat=item(k,2),pants=item(k,3),base=col?col[1]:look.c; let limb=base,foot=shade(base,-.3); x.save(); - if(cos){cos[3](x);limb=cos[5];foot=cos[6]} + if(cos){cos[3](x,base);limb=cos[5]||base;foot=cos[6]||shade(base,-.3)} else{ if(prem){const t=B.cl?B.cl.t:0,kind=prem[5];prem[3](x,base,t);limb=kind==='jelly'?shade(base,.3):kind==='rainbow'?'#'+_c.setHSL((t*24%360)/360,.88,.62).getHexString():prem[4];foot=shade(limb,-.3)} else{x.fillStyle=base;x.fillRect(0,0,W,H)} @@ -448,6 +729,7 @@ function repaint(B){ } x.restore(); G.drawFace(x,look); + if(cos&&cos[7]){x.save();cos[7](x);x.restore()} // over the face: a pirate's eye patch, a bodyguard's shades const f=item(k,5);if(f){x.save();f[3](x);x.restore()} B.tex.needsUpdate=true; B.limbMat.color.set(limb);B.footMat.color.set(foot); diff --git a/e63334287a3deaa3/tumble-trials/es.js b/e63334287a3deaa3/tumble-trials/es.js index 2b5a9e91..0cdbc947 100644 --- a/e63334287a3deaa3/tumble-trials/es.js +++ b/e63334287a3deaa3/tumble-trials/es.js @@ -1,6 +1,6 @@ /* Tumble Trials in Spanish: this game's own words for lang.js (see the comment at the top of ../lang.js). Also used by closet.js. Round names and bots' names stay in English as names; the show's calls, menus, HUD, lobby and results are translated. - Closet item names come from the lists shared with ../cosmetics.js and stay English. */ + Closet item names come from the lists shared with ../cosmetics.js and stay English, except the wave added in November 2026 (at the end). */ if (window.BackRoomLang) BackRoomLang.add({ // HUD and the show's calls 'Tumble Trials game view': 'Vista del juego Tumble Trials', 'Lobby': 'Sala de espera', 'Round {a} of {b}': 'Ronda {a} de {b}', 'Round 1': 'Ronda 1', @@ -113,5 +113,7 @@ if (window.BackRoomLang) BackRoomLang.add({ 'One hat at a time. A costume or undies on the head takes its place.': 'Un sombrero a la vez. Un disfraz o calzones en la cabeza ocupan su lugar.', 'Extras over your face.': 'Extras sobre tu cara.', 'A whole costume around the same bean: same size, same hitbox, your face still shows.': 'Un disfraz completo alrededor del mismo frijolito: mismo tamaño, misma hitbox, y tu cara se sigue viendo.', 'Danced when you qualify from a race or win the crown.': 'Se baila cuando clasificas en una carrera o ganas la corona.', 'Heard as you fall towards the slime.': 'Se escucha mientras caes a la baba.', - 'Goes off as well as the slime when you are knocked out.': 'Salta junto con la baba cuando quedas eliminado.' + 'Goes off as well as the slime when you are knocked out.': 'Salta junto con la baba cuando quedas eliminado.', + // Closet items added in November 2026 (wave 2); the older ones stay English + 'Eye Patch': 'Parche en el ojo', 'Black Shades': 'Gafas oscuras', 'Eye Black': 'Pintura de partido', 'Baseball Cap': 'Gorra de béisbol', 'Fedora': 'Sombrero fedora', 'Pirate Bandana': 'Pañuelo pirata', 'Fur Hat': 'Gorro de piel', 'Bowler Hat': 'Bombín', 'Soccer Kit': 'Equipo de fútbol', 'Basketball Kit': 'Equipo de básquet', 'Gridiron Gear': 'Equipo de fútbol americano', 'Baseball Uniform': 'Uniforme de béisbol', 'Hockey Kit': 'Equipo de hockey', 'Tennis Whites': 'Ropa de tenis', 'Boxing Champ': 'Campeón de boxeo', 'Track Star': 'Estrella del atletismo', 'Swim Team': 'Equipo de natación', 'Ski Racer': 'Esquiador de carreras', 'Racing Driver': 'Piloto de carreras', 'Referee': 'Árbitro', 'Team Mascot': 'Mascota del equipo', 'Karate Gi': 'Karategui', 'Golf Pro': 'Golfista', 'Cheer Squad': 'Porrista', 'Pirate Captain': 'Capitán pirata', 'Deckhand': 'Marinero pirata', 'Parrot Pal': 'Pirata con loro', 'Ghost Pirate': 'Pirata fantasma', 'Pinstripe Suit': 'Traje a rayas', 'The Boss': 'El Jefe', 'Tracksuit Tough Guy': 'Tipo duro en chándal', 'Bodyguard': 'Guardaespaldas', 'Tuxedo': 'Esmoquin', 'Business Suit': 'Traje de oficina', 'Tin Robot': 'Robot de hojalata', 'Sleek Android': 'Androide elegante', 'Junkyard Bot': 'Robot chatarra', 'Wizard': 'Mago', 'Firefighter': 'Bombero', 'Touchdown Spike': 'Festejo de touchdown', 'Boxer Shuffle': 'Paso de boxeador', 'Hornpipe Jig': 'Baile marinero', 'Big Boss Shrug': 'Encogida del jefe' }); From 4d1409d65838e7cf8dda0447f408df1adfb3fa1c Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 05:28:09 +0000 Subject: [PATCH 02/63] Driftfall Locker: 21 sports outfits (OUTFITS 41-61), captains only Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn --- e63334287a3deaa3/cosmetics.js | 21 ++++ e63334287a3deaa3/drop-zone/es.js | 6 ++ e63334287a3deaa3/drop-zone/index.html | 150 +++++++++++++++++++++++++- 3 files changed, 176 insertions(+), 1 deletion(-) diff --git a/e63334287a3deaa3/cosmetics.js b/e63334287a3deaa3/cosmetics.js index dbdea3e5..9dea4f61 100644 --- a/e63334287a3deaa3/cosmetics.js +++ b/e63334287a3deaa3/cosmetics.js @@ -1012,6 +1012,27 @@ I('drop-zone', 'victory', 2, 'Flex', 'uncommon', '#E8742A', '#FFFFFF', 'Show those arms.'); I('drop-zone', 'victory', 3, 'Take a Bow', 'rare', '#8A5A2B', '#F2EFE8', 'A deep, slow bow to the crowd.'); I('drop-zone', 'victory', 4, 'Jump for Joy', 'epic', '#5FD068', '#FFD23F', 'Jumping up and down with arms wide.'); + I('drop-zone', 'outfit', 41, 'Goalkeeper', 'uncommon', '#FFB43A', '#3A9BDC', 'A zigzag keeper shirt, big gloves and the number 1.'); + I('drop-zone', 'outfit', 42, 'Basketball Player', 'common', '#3A9BDC', '#F08A2A', 'A vest in your colour, a headband and a ball on your back.'); + I('drop-zone', 'outfit', 43, 'Linebacker', 'uncommon', '#3A9BDC', '#FFFFFF', 'Shoulder pads, a helmet with a face guard and white pants.'); + I('drop-zone', 'outfit', 44, 'Baseball Batter', 'common', '#F2EFE8', '#3A9BDC', 'Pinstripes, a batting helmet and a bat in your bag.'); + I('drop-zone', 'outfit', 45, 'Hockey Player', 'uncommon', '#3A9BDC', '#FFFFFF', 'A long striped jersey, padded gloves and a caged helmet.'); + I('drop-zone', 'outfit', 46, 'Tennis Pro', 'common', '#F2EFE8', '#3A9BDC', 'Tennis whites, a cap and two rackets in a bag.'); + I('drop-zone', 'outfit', 47, 'Boxer', 'rare', '#3A9BDC', '#E8453C', 'A satin robe with gold trim, gloves and a head guard.'); + I('drop-zone', 'outfit', 48, 'Cyclist', 'common', '#3A9BDC', '#FFD23F', 'An aero helmet, orange glasses and two bottles.'); + I('drop-zone', 'outfit', 49, 'Swim Team', 'common', '#3A9BDC', '#FFD23F', 'A long team parka, a towel, a swim cap and goggles.'); + I('drop-zone', 'outfit', 50, 'Golfer', 'rare', '#3A9BDC', '#E8453C', 'A diamond sweater vest, a flat cap and a bag of clubs.'); + I('drop-zone', 'outfit', 51, 'Skateboarder', 'common', '#E8453C', '#FFD23F', 'A long tee, a beanie and a board strapped on.'); + I('drop-zone', 'outfit', 52, 'Surfer', 'common', '#3A9BDC', '#2FB8B0', 'A rash guard, board shorts and a surfboard.'); + I('drop-zone', 'outfit', 53, 'Skier', 'uncommon', '#3A9BDC', '#FF8A1F', 'A puffy jacket, goggles and crossed skis.'); + I('drop-zone', 'outfit', 54, 'Pit Crew', 'common', '#3A9BDC', '#FFFFFF', 'Overalls, a headset and a spare tyre.'); + I('drop-zone', 'outfit', 55, 'Referee', 'uncommon', '#F2EFE8', '#5A606B', 'Stripes, a whistle and a yellow card ready.'); + I('drop-zone', 'outfit', 56, 'Coach', 'common', '#3A9BDC', '#F2EFE8', 'A tracksuit, a whistle, a stopwatch and a bag of balls.'); + I('drop-zone', 'outfit', 57, 'Team Mascot', 'legendary', '#FFC93C', '#FF8A1F', 'A big friendly bird with a crest in your colour.'); + I('drop-zone', 'outfit', 58, 'Fencer', 'rare', '#F2EFE8', '#8D96A0', 'A white jacket, a mesh mask and a long kit bag.'); + I('drop-zone', 'outfit', 59, 'Karate', 'common', '#F2EFE8', '#3A9BDC', 'A white suit, a belt in your colour and a rolled mat.'); + I('drop-zone', 'outfit', 60, 'Cheer Captain', 'common', '#3A9BDC', '#FFD23F', 'A pleated skirt, a ponytail bow and pom-poms.'); + I('drop-zone', 'outfit', 61, 'Jockey', 'rare', '#3A9BDC', '#FFD23F', 'Diamond racing silks and a silk cap.'); // Items a game hands over itself are in no pack: give is 'free' (anyone may wear it; the game grants it the first time it // is worn) or 'earned' (the game grants it when it is won). grant(id), below, only adds these. GAME_ITEMS.forEach(function (it) { if (it.game !== 'slipstream') return; if (it.slot === 'sponsor' || (it.slot === 'helmet' && it.no <= 8)) it.give = 'free'; else if (it.slot === 'livery' && it.no > 8) it.give = 'earned'; }); diff --git a/e63334287a3deaa3/drop-zone/es.js b/e63334287a3deaa3/drop-zone/es.js index de32a4b2..c637fc74 100644 --- a/e63334287a3deaa3/drop-zone/es.js +++ b/e63334287a3deaa3/drop-zone/es.js @@ -201,6 +201,12 @@ 'Lumberjack': 'Leñador', 'Park Ranger': 'Guardaparques', 'Scuba Diver': 'Submarinista', 'Head Chef': 'Jefe de cocina', 'Hazmat Suit': 'Traje de protección', 'Castle Knight': 'Caballero del castillo', 'Astronaut': 'Astronauta', 'Farmer': 'Granjero', 'Mail Carrier': 'Cartero', 'Lifeguard': 'Guardavidas', 'Ninja': 'Ninja', 'Scarecrow': 'Espantapájaros', 'Skeleton': 'Esqueleto', 'Banana Suit': 'Traje de banana', 'Cardboard Box Robot': 'Robot de caja de cartón', + // wave two outfits + 'Goalkeeper': 'Arquero', 'Basketball Player': 'Basquetbolista', 'Linebacker': 'Apoyador', 'Baseball Batter': 'Bateador', 'Hockey Player': 'Jugador de hockey', + 'Tennis Pro': 'Tenista', 'Boxer': 'Boxeador', 'Cyclist': 'Ciclista', 'Swim Team': 'Equipo de natación', 'Golfer': 'Golfista', + 'Skateboarder': 'Skater', 'Surfer': 'Surfista', 'Skier': 'Esquiador', 'Pit Crew': 'Mecánico de boxes', 'Referee': 'Árbitro', + 'Coach': 'Entrenador', 'Team Mascot': 'Mascota del equipo', 'Fencer': 'Esgrimista', 'Karate': 'Karateca', 'Cheer Captain': 'Capitana de porristas', + 'Jockey': 'Jockey', // gliders 'Umbrella': 'Paraguas', 'Paper Airplane': 'Avión de papel', 'Hang Glider': 'Ala delta', 'Kite': 'Barrilete', 'Bedsheet Parachute': 'Paracaídas de sábana', 'Trash Bag Parachute': 'Paracaídas de bolsa', 'Cardboard Wings': 'Alas de cartón', 'Dragon Wings': 'Alas de dragón', 'Bat Wings': 'Alas de murciélago', diff --git a/e63334287a3deaa3/drop-zone/index.html b/e63334287a3deaa3/drop-zone/index.html index f6a73241..6919e354 100644 --- a/e63334287a3deaa3/drop-zone/index.html +++ b/e63334287a3deaa3/drop-zone/index.html @@ -3283,6 +3283,21 @@

{L(B,-.27,1.36,-.24,.19,.19,.14,col,-.4);L(B,.3,1.36,-.22,.19,.19,.14,col)}; + // wave two's helpers: a number made of bars (front: read from the front), an eye patch (pushed up onto the forehead under + // a drawn face, so the drawing shows), a shirt front and tie, dark glasses, a fedora, a three-cornered hat + const DIG=['abcdef','bc','abged','abgcd','fgbc','afgcd','afgedc','abc','abcdefg','abfgcd']; + const num=(B,n,x,y,z,h,col,front)=>{const s=String(n),w=h*.55,t=h*.17,gap=w+h*.22,sx=front?-1:1; + for(let k=0;kX(B,cx+sx*a,y+b[0],z,b[1],b[2],.03,col); + if(S.includes('a'))bx(0,[h/2,w,t]);if(S.includes('g'))bx(0,[0,w,t]);if(S.includes('d'))bx(0,[-h/2,w,t]); + if(S.includes('b'))bx(w/2,[h/4,t,h/2]);if(S.includes('c'))bx(w/2,[-h/4,t,h/2]);if(S.includes('f'))bx(-w/2,[h/4,t,h/2]);if(S.includes('e'))bx(-w/2,[-h/4,t,h/2])}}; + const patch=(B,c,col)=>{col=col||INK;if(c.face)X(B,.1,1.99,-.262,.13,.11,.03,col);else{X(B,.085,1.805,-.292,.14,.13,.03,col);T(B,0,0,1.87,-.276,.5,.03,.02,col,0,0,-.42)}}; + const tie=(B,shirt,col)=>{L(B,0,1.46,-.2,.24,.3,.14,shirt);X(B,0,1.4,-.28,.07,.26,.03,col);X(B,0,1.55,-.28,.1,.05,.03,col)}; + const lapels=(B,col)=>{T(B,0,-.13,1.42,-.255,.09,.4,.03,col,0,0,.3);T(B,0,.13,1.42,-.255,.09,.4,.03,col,0,0,-.3)}; + const shades=(B,c,col)=>{if(c.face)return;col=col||GLASS;X(B,-.1,1.82,-.29,.16,.09,.03,col);X(B,.1,1.82,-.29,.16,.09,.03,col);X(B,0,1.835,-.29,.08,.025,.03,col)}; + const fedora=(B,col,band)=>{R(B,0,2.03,0,.8,.05,.8,col);R(B,0,2.15,0,.48,.24,.48,col);L(B,0,2.07,0,.51,.06,.51,band);X(B,0,2.28,0,.07,.04,.34,shadeOf(col,.85))}; + const tricorne=(B,col,trim)=>{R(B,0,2.12,0,.46,.22,.46,col);for(const a of [0,Math.PI*2/3,-Math.PI*2/3]){T(B,0,Math.sin(a)*.25,2.1,Math.cos(a)*.25,.86,.2,.05,col,0,a,0);T(B,0,Math.sin(a)*.255,2.2,Math.cos(a)*.255,.86,.03,.06,trim,0,a,0)}}; + const gloves=(B,col,s)=>{s=s||1;L(B,-.1,1.355,-.505,.14*s,.16*s,.17*s,col,-.4);L(B,.3,1.355,-.505,.14*s,.16*s,.17*s,col)}; + const hairUp=(B,c)=>R(B,0,2.0,.04,.53,.3,.5,c.hair); // a full head of hair, as high as the standard cap return[ {id:'std',name:'Standard'},...NEW, {id:'hood',name:'Hooded Jacket', @@ -3478,7 +3493,140 @@

{X(B,0,1.24,.34,.5,.56,.18,CB);X(B,0,1.24,.435,.06,.58,.02,0xe0d1ab)})}, // another box on the back hat(B,c){X(B,0,1.81,0,.64,.6,.62,0xc6955a);X(B,0,2.11,0,.66,.03,.64,0xa77a48);if(!c.face){X(B,-.13,1.86,-.315,.12,.12,.02,0x2a2d34);X(B,.13,1.86,-.315,.12,.12,.02,0x2a2d34);X(B,0,1.68,-.315,.28,.04,.02,0x2a2d34)} - T(B,0,.12,2.3,0,.04,.36,.04,0xff6fb5,0,0,-.3);L(B,.19,2.47,0,.08,.08,.08,0x3fa9f5)}} // box head, drawn face, a bendy-straw aerial + T(B,0,.12,2.3,0,.04,.36,.04,0xff6fb5,0,0,-.3);L(B,.19,2.47,0,.08,.08,.08,0x3fa9f5)}}, // box head, drawn face, a bendy-straw aerial + // Wave two (19 November 2026, the owner: "many more sports style skins", robots, pirates with eye patches, suits and + // more): OUTFITS 41 on. The same rules as the sixteen above: something on the back as deep as the backpack, never + // darker than the standard, no grass greens, as tall as the standard cap. Kits are our own, in the player's colour. + {id:'goalie',name:'Goalkeeper',legs:(h,sk)=>[0,0xffa726,sk,WHITE,0xffa726,0x2a2d34], + body(B,c){const GK=0xffb43a,GD=0xf08a1f;fitBase(B,c,GK,GK,WHITE,GK,{torso:false}); + bagPaint(B,0,1.22,0,.7,.72,.42,[4,4,3],GK,(f,i,j)=>f[0]==='z'&&(i+j)%2===0?GD:undefined); // zigzag panels + L(B,0,1.6,0,.36,.08,.36,c.hex);bands(B,GD);R(B,0,.88,0,.72,.16,.44,0xffa726);num(B,1,0,1.3,-.255,.22,c.hex,1); // collar, elbow pads, shorts, the 1 + gloves(B,WHITE,1.4); // big gloves + back(B,c,()=>{pack(B,c.hex);L(B,0,1.24,.43,.22,.22,.06,WHITE);X(B,0,1.24,.465,.08,.08,.02,INK);X(B,0,1.24,.462,.2,.025,.02,INK)})}, // a kit bag with a ball on it + hat(B,c){R(B,0,2.07,0,.52,.15,.52,c.hex);L(B,0,2.02,-.27,.5,.06,.16,c.lite);L(B,0,2.15,0,.08,.04,.08,WHITE)}}, // cap + {id:'hoops',name:'Basketball Player',legs:(h,sk)=>[1,h,WHITE,WHITE,WHITE,WHITE], + body(B,c){fitBase(B,c,c.hex,c.skin,c.skin,c.skin,{hair:'top'}); + L(B,0,1.6,-.02,.38,.06,.38,WHITE);for(const s of [-1,1]){X(B,s*.3,1.42,-.24,.05,.34,.05,WHITE);X(B,s*.3,1.42,.24,.05,.34,.05,WHITE)} // collar and armhole trim + R(B,0,.9,0,.74,.12,.46,WHITE);num(B,12,0,1.24,-.255,.2,WHITE,1);cuffs(B,WHITE); // waistband, number, wristbands + back(B,c,()=>{R(B,0,1.24,.33,.44,.44,.22,0xf08a2a);X(B,0,1.24,.455,.03,.46,.02,INK);X(B,0,1.24,.455,.46,.03,.02,INK)})}, // a basketball on the back + hat(B,c){hairUp(B,c);L(B,0,1.96,0,.56,.07,.56,WHITE)}}, // hair and a headband + {id:'gridiron',name:'Linebacker',hatFace:{y:1.79,cell:.03,flat:-.372},legs:h=>[1,WHITE,h,WHITE,WHITE,INK], + body(B,c){fitBase(B,c,c.hex,c.hex,c.skin,c.hex);tee(B,c.hex); + for(const s of [-1,1])L(B,s*.27,1.56,0,.34,.16,.54,c.hex); // shoulder pads + num(B,5,0,1.22,-.255,.22,WHITE,1);R(B,0,.88,0,.72,.14,.44,WHITE); + back(B,c,()=>{R(B,0,1.3,.31,.56,.56,.2,c.hex);num(B,5,0,1.28,.43,.22,WHITE)})}, // the pads' back plate with the number + hat(B,c){R(B,0,1.84,0,.62,.62,.64,c.hex);X(B,0,2.17,0,.1,.04,.62,WHITE);X(B,0,1.79,-.345,.42,.34,.04,c.skin);if(!c.face)eyes(B,1.83,-.37); // helmet, stripe, the face opening + for(const y of [1.69,1.78])X(B,0,y,-.39,.44,.035,.03,0xdfe4ea);X(B,0,1.735,-.39,.035,.12,.03,0xdfe4ea);for(const s of [-1,1])X(B,s*.34,1.82,-.02,.03,.12,.12,WHITE)}}, // face guard, ear holes + {id:'slugger',name:'Baseball Batter',legs:h=>[1,WHITE,h,WHITE,WHITE,INK], + body(B,c){fitBase(B,c,WHITE,WHITE,c.skin,WHITE,{torso:false});tee(B,c.hex); + bagPaint(B,0,1.22,0,.7,.72,.42,[6,4,4],WHITE,(f,i)=>f[0]!=='y'&&i%2?0xc9d1de:undefined); // pinstripes + X(B,0,1.26,-.255,.035,.6,.03,c.hex);for(const y of [1.46,1.3,1.14])X(B,0,y,-.272,.04,.04,.02,c.hex); // placket and buttons + num(B,7,-.18,1.36,-.255,.15,c.hex,1);R(B,0,.9,0,.74,.1,.46,c.hex); + back(B,c,()=>{R(B,0,1.2,.31,.36,.56,.2,c.hex);T(B,1,.12,1.42,.33,.07,.8,.07,0xf4e6c8,0,0,-.25);L(B,.22,1.8,.33,.09,.09,.09,0xf4e6c8)})}, // a bat bag with the bat sticking out + hat(B,c){R(B,0,2.0,.02,.56,.3,.56,c.hex);L(B,0,1.94,-.29,.5,.05,.18,c.hex);L(B,.3,1.8,.02,.08,.26,.3,c.hex);X(B,0,2.16,0,.07,.03,.07,WHITE)}}, // batting helmet with an ear flap + {id:'hockey',name:'Hockey Player',hatFace:{y:1.79,cell:.03,flat:-.358},legs:h=>[1,h,h,WHITE,WHITE,0xb9c2cc], + body(B,c){fitBase(B,c,c.hex,c.hex,c.lite,c.hex); + L(B,0,.86,0,.8,.24,.5,c.hex);for(const y of [.82,.92])L(B,0,y,0,.82,.035,.52,WHITE); // the jersey's long hem and its stripes + L(B,-.27,1.36,-.24,.19,.19,.08,WHITE,-.4);L(B,.3,1.36,-.22,.19,.19,.08,WHITE);L(B,0,1.6,-.02,.38,.07,.38,WHITE); + gloves(B,c.lite,1.45); // padded gloves + back(B,c,()=>{pack(B,c.hex);num(B,9,0,1.26,.43,.22,WHITE)})}, + hat(B,c){R(B,0,1.88,.02,.6,.52,.6,WHITE);X(B,0,1.79,-.33,.42,.3,.04,c.skin);if(!c.face)eyes(B,1.84,-.355); // helmet, face opening + for(const x of [-.12,0,.12])X(B,x,1.76,-.375,.025,.34,.025,0xb9c2cc);for(const y of [1.66,1.78,1.9])X(B,0,y,-.375,.44,.025,.025,0xb9c2cc);X(B,0,2.17,0,.08,.03,.5,c.hex)}}, // cage, stripe + {id:'tennis',name:'Tennis Pro',legs:(h,sk)=>[0,WHITE,sk,WHITE,h,WHITE], + body(B,c){fitBase(B,c,WHITE,WHITE,c.skin,WHITE);tee(B,WHITE); + L(B,-.12,1.57,-.2,.22,.1,.15,c.hex);L(B,.12,1.57,-.2,.22,.1,.15,c.hex);X(B,0,1.47,-.255,.04,.14,.03,c.hex); // polo collar and placket + for(const s of [-1,1])X(B,s*.41,1.2,0,.04,.7,.3,c.hex);cuffs(B,c.hex);L(B,0,.9,0,.74,.08,.46,WHITE); // side stripes, wristbands + back(B,c,()=>{R(B,0,1.18,.31,.4,.64,.2,c.hex);for(const s of [-1,1]){T(B,1,s*.1,1.64,.33,.22,.3,.05,WHITE,0,0,s*.2);T(B,0,s*.1,1.64,.36,.16,.22,.01,0xc9e86a,0,0,s*.2)}})}, // a racket bag, two rackets poking out + hat(B,c){R(B,0,2.07,0,.52,.15,.52,WHITE);L(B,0,2.02,-.27,.5,.06,.16,WHITE);L(B,0,1.98,0,.55,.06,.55,c.hex)}}, + {id:'boxer',name:'Boxer',hatFace:{y:1.79,cell:.028,flat:-.338},legs:(h,sk)=>[0,h,sk,WHITE,WHITE,WHITE], + body(B,c){fitBase(B,c,c.hex,c.hex,0xe8453c,c.hex); // a satin robe + R(B,0,.82,0,.76,.26,.5,c.hex);L(B,0,.71,0,.78,.05,.52,GOLD);L(B,0,.98,0,.74,.08,.47,c.lite); // its skirt, gold hem, sash + T(B,0,-.1,1.32,-.255,.06,.56,.03,GOLD,0,0,.35);T(B,0,.1,1.32,-.255,.06,.56,.03,GOLD,0,0,-.35);cuffs(B,GOLD); // gold trim + for(const [x,r] of [[-.1,-.4],[.3,0]])L(B,x,1.355,-.505,.22,.24,.26,0xe8453c,r); // boxing gloves + back(B,c,()=>{R(B,0,1.24,.31,.6,.62,.16,c.hex);L(B,0,1.56,.33,.5,.2,.24,c.hex);X(B,0,1.3,.405,.36,.06,.02,GOLD);X(B,0,1.18,.405,.24,.06,.02,GOLD)})}, // the robe's back and its hood, down + hat(B,c){R(B,0,1.93,0,.56,.44,.56,0xe8453c);X(B,0,1.79,-.31,.36,.3,.04,c.skin);if(!c.face)eyes(B,1.83,-.335);X(B,0,2.0,-.315,.38,.06,.04,WHITE)}}, // head guard + {id:'cyclist',name:'Cyclist',legs:(h,sk)=>[1,h,WHITE,sk,sk,WHITE], + body(B,c){fitBase(B,c,c.hex,c.skin,c.skin,c.hex);tee(B,c.hex); + L(B,0,1.38,-.005,.72,.14,.44,0xffd23f);X(B,0,1.2,-.255,.035,.5,.03,WHITE);gloves(B,WHITE,1.05); // chest band, zip, mitts + R(B,0,.9,0,.74,.08,.46,c.dark); + back(B,c,()=>{R(B,0,1.12,.3,.56,.3,.2,c.hex);for(const s of [-1,1])L(B,s*.14,1.34,.34,.13,.26,.13,s<0?WHITE:0x3fa9f5)})}, // jersey pockets and two bottles + hat(B,c){R(B,0,2.03,.06,.56,.26,.66,WHITE);T(B,1,0,1.98,.33,.22,.12,.26,WHITE,-.4,0,0);for(const x of [-.12,0,.12])X(B,x,2.17,.04,.05,.03,.5,c.hex); // aero helmet, its tail, vents + if(!c.face)X(B,0,1.84,-.29,.46,.08,.03,0xff8a1f)}}, // orange glasses + {id:'swimmer',name:'Swim Team',legs:(h,sk)=>[1,h,sk,sk,sk,0x3fa9f5], + body(B,c){fitBase(B,c,c.hex,c.hex,c.skin,c.hex); + R(B,0,.8,0,.78,.3,.52,c.hex);X(B,0,1.1,-.27,.04,.9,.03,WHITE);for(const s of [-1,1])X(B,s*.425,1.0,0,.04,.6,.2,WHITE); // a long parka, zip, side stripes + L(B,0,1.6,-.02,.46,.1,.44,WHITE);X(B,-.13,1.42,-.255,.1,.3,.04,WHITE);X(B,.13,1.42,-.255,.1,.3,.04,WHITE);cuffs(B,WHITE); // a towel round the neck + back(B,c,()=>{R(B,0,1.36,.3,.5,.44,.22,c.hex);L(B,0,1.36,.4,.36,.3,.04,c.lite)})}, // the hood, down + hat(B,c){R(B,0,2.0,.03,.54,.32,.54,0xffd23f);X(B,0,1.97,-.3,.46,.04,.03,INK);for(const s of [-1,1])L(B,s*.1,1.97,-.31,.13,.08,.06,0x3fa9f5)}}, // swim cap and goggles + {id:'golfer',name:'Golfer',legs:h=>[1,WHITE,WHITE,h,h,WHITE], + body(B,c){fitBase(B,c,c.hex,WHITE,c.skin,WHITE,{torso:false}); + bagPaint(B,0,1.22,0,.7,.72,.42,[4,4,3],c.hex,(f,i,j)=>f[0]==='z'&&(i+j)%2?c.lite:undefined); // a diamond sweater vest + L(B,-.12,1.57,-.2,.22,.1,.15,WHITE);L(B,.12,1.57,-.2,.22,.1,.15,WHITE);L(B,-.1,1.355,-.505,.13,.15,.16,WHITE,-.4);R(B,0,.9,0,.74,.08,.46,WHITE); // polo collar, one glove + back(B,c,()=>{R(B,0,1.2,.33,.3,.72,.26,WHITE);L(B,0,1.0,.33,.32,.08,.28,0xe8453c);for(const x of [-.07,0,.07]){T(B,0,x,1.64,.33,.04,.24,.04,0xb9c2cc);L(B,x,1.78,.33,.08,.08,.12,x?0xffd23f:0xe8453c)}})}, // a golf bag, clubs with covers + hat(B,c){R(B,0,2.08,0,.56,.15,.58,c.hex);L(B,0,2.02,-.28,.48,.05,.14,c.hex);L(B,0,2.18,0,.13,.1,.13,0xe8453c)}}, // flat cap with a bobble + {id:'skater',name:'Skateboarder',legs:0x5a8ad0, + body(B,c){fitBase(B,c,c.hex,c.hex,c.skin,c.hex);tee(B,c.hex); + L(B,0,.86,0,.76,.2,.5,c.hex);T(B,0,.03,1.34,-.255,.07,.2,.03,0xffd23f,0,0,.4);T(B,0,-.03,1.22,-.255,.07,.2,.03,0xffd23f,0,0,.4);X(B,0,1.28,-.255,.1,.05,.03,0xffd23f); // a long tee with a bolt + bands(B,0xe8453c);cuffs(B,WHITE); + back(B,c,()=>{pack(B,WHITE);T(B,1,0,1.24,.44,.3,.9,.05,0xffd23f,0,0,0);X(B,0,1.24,.47,.04,.8,.02,c.hex);for(const y of [.86,1.62])for(const s of [-1,1])X(B,s*.11,y,.47,.07,.07,.07,0xe8453c)})}, // a skateboard strapped on + hat(B,c){R(B,0,2.0,.02,.54,.3,.54,0xe8453c);L(B,0,1.9,.02,.57,.08,.57,0xc8382e)}}, // beanie + {id:'surfer',name:'Surfer',legs:(h,sk)=>[1,0x2fb8b0,h,h,h,sk], + body(B,c){fitBase(B,c,c.hex,c.hex,c.skin,c.hex); + for(const s of [-1,1])X(B,s*.41,1.2,0,.04,.7,.3,WHITE);X(B,0,1.52,-.24,.3,.08,.03,WHITE);R(B,0,.9,0,.74,.12,.46,0x2fb8b0);X(B,.2,.86,-.29,.12,.12,.02,0xffd23f); // rash guard, board shorts with a flower + back(B,c,()=>{T(B,1,0,1.2,.44,.36,1.2,.06,WHITE,0,0,0);X(B,0,1.2,.475,.06,1.2,.02,c.hex);L(B,0,.7,.47,.04,.1,.08,0x2fb8b0)})}, // a surfboard on the back + hat(B,c){R(B,0,2.04,0,.7,.06,.7,0xffd23f);R(B,0,2.13,0,.48,.2,.48,0xffd23f);L(B,0,2.07,0,.5,.05,.5,c.hex)}}, // bucket hat + {id:'skier',name:'Skier',legs:h=>[1,h,WHITE,h,h,WHITE], + body(B,c){fitBase(B,c,c.hex,c.hex,c.lite,c.hex); + for(const y of [1.0,1.2,1.4])L(B,0,y,0,.74,.06,.46,c.lite);L(B,0,1.58,0,.5,.14,.46,WHITE);X(B,0,1.24,-.27,.04,.6,.03,WHITE);X(B,-.2,1.3,-.275,.12,.1,.02,WHITE); // puffy bands, collar, zip, lift pass + back(B,c,()=>{pack(B,WHITE);for(const s of [-1,1])T(B,1,0,1.24,.44,.08,1.3,.04,0xffd23f,0,0,s*.35)})}, // crossed skis over a pack + hat(B,c){R(B,0,2.0,.02,.6,.32,.6,WHITE);L(B,0,1.98,-.31,.46,.12,.06,0xff8a1f);X(B,0,1.98,-.27,.56,.04,.06,c.hex)}}, // helmet and goggles + {id:'pitcrew',name:'Pit Crew',legs:h=>h, + body(B,c){fitBase(B,c,c.hex,c.hex,WHITE,WHITE); + L(B,0,1.38,-.005,.72,.14,.44,WHITE);R(B,0,.9,0,.73,.1,.45,WHITE);X(B,.2,1.48,-.275,.14,.07,.02,0xffd23f); // chest band, belt, a name tab + gloves(B,WHITE,1.1); + back(B,c,()=>{T(B,1,0,1.24,.36,.62,.62,.2,0x3a3e45);L(B,0,1.24,.47,.3,.3,.04,0xdfe4ea);L(B,0,1.24,.47,.5,.03,.03,0xffd23f)})}, // a spare tyre on the back + hat(B,c){R(B,0,2.07,0,.52,.15,.52,c.hex);R(B,0,2.02,.27,.5,.06,.16,WHITE);X(B,0,2.17,0,.62,.04,.06,0x3a3e45);for(const s of [-1,1])L(B,s*.3,1.82,0,.1,.22,.22,0x3a3e45);T(B,0,.2,1.7,-.22,.02,.02,.24,0x3a3e45,0,.6,0)}}, // cap backwards, a headset + {id:'referee',name:'Referee', + body(B,c){fitBase(B,c,WHITE,WHITE,c.skin,WHITE,{torso:false});tee(B,WHITE); + bagPaint(B,0,1.22,0,.7,.72,.42,[8,4,6],WHITE,(f,i)=>f[0]!=='y'&&i%2?0x5a606b:undefined); // stripes + L(B,0,1.6,-.02,.38,.07,.38,0x50555f);X(B,0,1.5,-.24,.03,.2,.03,0xe8453c);L(B,0,1.38,-.27,.08,.08,.06,0xb9c2cc);X(B,.2,1.4,-.27,.07,.11,.02,0xffd23f);R(B,0,.9,0,.74,.1,.46,0x2b2f36); // collar, whistle, a yellow card + back(B,c,()=>{pack(B,c.hex);X(B,0,1.3,.43,.24,.06,.04,WHITE)})}, + hat(B,c){R(B,0,2.07,0,.52,.15,.52,WHITE);L(B,0,2.02,-.27,.5,.06,.16,0x2b2f36);X(B,0,2.07,-.27,.1,.06,.02,c.hex)}}, + {id:'coach',name:'Coach',legs:h=>[1,h,h,h,h,WHITE], + body(B,c){fitBase(B,c,c.hex,c.hex,c.skin,c.hex); + L(B,0,1.6,0,.44,.1,.4,WHITE);X(B,0,1.24,-.255,.035,.62,.04,WHITE);for(const s of [-1,1])X(B,s*.425,1.2,0,.04,.7,.08,WHITE);cuffs(B,WHITE);L(B,0,.9,0,.74,.1,.46,c.lite); // tracksuit top + X(B,0,1.5,-.24,.03,.2,.03,0xffd23f);L(B,0,1.38,-.27,.08,.08,.06,0xb9c2cc);L(B,.2,1.3,-.27,.12,.12,.04,0xdfe4ea);X(B,.2,1.3,-.295,.06,.02,.01,0xe8453c); // whistle, stopwatch + back(B,c,()=>{R(B,0,1.2,.32,.5,.5,.22,0xf2efe8);for(const [x,y,k] of [[-.12,1.32,0xf08a2a],[.12,1.32,WHITE],[0,1.12,0xffd23f]])L(B,x,y,.42,.18,.18,.1,k)})}, // a bag of balls + hat(B,c){R(B,0,2.07,0,.52,.15,.52,WHITE);L(B,0,2.02,-.27,.5,.06,.16,c.hex);X(B,0,2.08,-.27,.12,.06,.02,c.hex)}}, + {id:'mascot',name:'Team Mascot',hatFace:{y:1.86,cell:.034,box:[1.9,0,.62,.6,.62]},legs:()=>[1,0xffc93c,0xff8a1f,0xffc93c,0xffc93c,0xff8a1f], + body(B,c){const Y=0xffc93c;fitBase(B,c,c.hex,Y,Y,c.hex,{hair:false}); + R(B,0,.88,0,.72,.16,.44,c.hex);num(B,0,-.07,1.26,-.255,.2,WHITE,1);num(B,0,.07,1.26,-.255,.2,WHITE,1);L(B,0,1.6,-.02,.4,.08,.4,WHITE); // jersey with 00 + back(B,c,()=>{R(B,0,1.24,.3,.5,.56,.2,c.hex);for(let k=0;k<5;k++){const a=(k-2)*.32;T(B,1,Math.sin(a)*.26,.97+Math.cos(a)*.26,.42,.13,.42,.06,k%2?Y:0xff8a1f,0,0,-a)}})}, // the tail + hat(B,c){const Y=0xffc93c;R(B,0,1.9,0,.62,.6,.62,Y);if(!c.face){for(const s of [-1,1]){L(B,s*.13,1.98,-.32,.18,.2,.06,WHITE);X(B,s*.11,1.97,-.355,.07,.09,.02,INK)}} + T(B,1,0,1.8,-.36,.24,.13,.24,0xff8a1f,.4,0,0);for(let k=0;k<3;k++)T(B,0,(k-1)*.11,2.27,.02,.07,.26,.14,c.hex,0,0,(k-1)*-.4)}}, // a big bird head, eyes, beak, a crest in your colour + {id:'fencer',name:'Fencer',hatFace:{y:1.8,cell:.03,flat:-.39},legs:()=>[1,WHITE,WHITE,WHITE,WHITE,0xdfe4ea], + body(B,c){fitBase(B,c,WHITE,WHITE,WHITE,WHITE); + T(B,0,.12,1.3,-.255,.04,.6,.03,0xb9c2cc,0,0,.3);bands(B,c.hex);L(B,0,1.58,0,.44,.12,.44,WHITE);R(B,0,.9,0,.74,.08,.46,0xe6e2d8); // jacket, its fastening, collar + back(B,c,()=>{T(B,1,0,1.2,.36,.2,1.1,.2,c.hex,0,0,.5);T(B,0,0,1.2,.47,.03,1.0,.02,WHITE,0,0,.5);X(B,0,1.3,.27,.4,.3,.08,c.hex)})}, // a long kit bag across the back + hat(B,c){R(B,0,1.84,-.02,.56,.6,.62,WHITE);X(B,0,1.8,-.36,.42,.42,.04,0x8d96a0);for(const y of [1.66,1.74,1.82,1.9])X(B,0,y,-.385,.42,.012,.01,0xb9c2cc);L(B,0,1.56,-.27,.4,.14,.1,WHITE)}}, // mask, mesh, bib + {id:'karate',name:'Karate',legs:()=>[1,WHITE,WHITE,WHITE,WHITE,WHITE], + body(B,c){fitBase(B,c,WHITE,WHITE,c.skin,WHITE); + T(B,0,-.07,1.36,-.252,.1,.5,.04,0xe6e2d8,0,0,-.5);T(B,0,.07,1.36,-.256,.1,.5,.04,0xe6e2d8,0,0,.5); // the jacket crossing over + R(B,0,.92,0,.75,.1,.47,c.hex);L(B,0,.9,-.28,.12,.1,.06,c.hex);for(const s of [-1,1])T(B,0,s*.05,.78,-.28,.05,.22,.03,c.hex,0,0,s*.25); // belt in your colour, knot and ends + back(B,c,()=>{T(B,1,0,1.36,.36,.24,.7,.24,0x3fa9f5,0,0,Math.PI/2);for(const s of [-1,1])X(B,s*.18,1.36,.36,.04,.26,.26,0xffd23f)})}, // a rolled mat + hat(B,c){hairUp(B,c);L(B,0,1.96,0,.56,.07,.56,c.hex);for(const s of [-1,1])T(B,1,s*.06,1.86,.32,.06,.24,.04,c.hex,.4,0,s*.3)}}, // a headband and its tails + {id:'cheer',name:'Cheer Captain',legs:()=>[1,WHITE,WHITE,WHITE,WHITE,WHITE], + body(B,c){fitBase(B,c,c.hex,c.hex,c.skin,c.hex); + R(B,0,.84,0,.78,.24,.52,c.hex);for(const y of [.76,.8])L(B,0,y,0,.8,.02,.54,WHITE);T(B,0,-.1,1.45,-.255,.06,.3,.03,WHITE,0,0,.5);T(B,0,.1,1.45,-.255,.06,.3,.03,WHITE,0,0,-.5); // pleated skirt, a white V + T(B,0,0,1.22,-.26,.1,.1,.02,0xffd23f,0,0,.785); + back(B,c,()=>{for(const s of [-1,1])R(B,s*.16,1.24,.34,.3,.3,.24,s<0?0xffd23f:c.lite)})}, // two pom-poms + hat(B,c){R(B,0,2.02,.04,.52,.26,.5,c.hair);L(B,0,2.06,.28,.16,.34,.16,c.hair);for(const s of [-1,1])T(B,1,s*.1,2.18,.2,.16,.1,.06,c.hex,0,0,s*.3)}}, // ponytail and a bow + {id:'jockey',name:'Jockey',legs:()=>[1,WHITE,0x3a3e45,0x3a3e45,0x3a3e45,0x2a2d34], + body(B,c){fitBase(B,c,c.hex,c.hex,WHITE,0xffd23f,{torso:false}); + bagPaint(B,0,1.22,0,.7,.72,.42,[6,6,3],c.hex,(f,i,j)=>(i+j)%2?0xffd23f:undefined); // racing silks + L(B,0,1.6,0,.38,.08,.38,WHITE);cuffs(B,0xffd23f);R(B,0,.9,0,.74,.08,.46,WHITE); + back(B,c,()=>{pack(B,0xe8453c);for(const [x,y] of [[-.1,1.18],[-.12,1.3],[-.06,1.39],[.06,1.39],[.12,1.3],[.1,1.18]])X(B,x,y,.43,.07,.07,.04,GOLD)})}, // a saddle bag with a horseshoe + hat(B,c){R(B,0,2.0,.02,.56,.3,.56,c.hex);L(B,0,1.94,-.29,.48,.04,.14,c.hex);L(B,0,2.17,0,.12,.1,.12,0xffd23f);X(B,0,2.0,-.31,.4,.06,.04,0xb9c2cc)}}, // silk cap, peak, bobble, goggles up ]; })(); const NOOB=OUTFITS.findIndex(o=>o.id==='noob'); // the look everyone starts with, and the only one for players without the Locker From 17187166ccb6038a11a7435cfd272b6ea9a79b12 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 05:31:05 +0000 Subject: [PATCH 03/63] Shell Crackers Locker: 15 sports, pirate, suit and robot egg types and 10 hats (captains only) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn --- e63334287a3deaa3/cosmetics.js | 26 ++++ e63334287a3deaa3/shell-crackers/kit.js | 199 +++++++++++++++++++++++-- 2 files changed, 215 insertions(+), 10 deletions(-) diff --git a/e63334287a3deaa3/cosmetics.js b/e63334287a3deaa3/cosmetics.js index dbdea3e5..b2bdd9d2 100644 --- a/e63334287a3deaa3/cosmetics.js +++ b/e63334287a3deaa3/cosmetics.js @@ -740,6 +740,32 @@ I('shell-crackers', 'crack', 3, 'Chick Hatches', 'epic', '#FFD84A', '#F4A41C', 'A chick hops out and runs off.'); I('shell-crackers', 'crack', 4, 'Shell Confetti', 'rare', '#FF5C8A', '#58B4FF', 'The shell bursts into bright confetti.'); I('shell-crackers', 'crack', 5, 'Stink Puff', 'common', '#A3B85E', '#5A6B2A', 'A green whiff and two very happy flies.'); + // Wave 2 (19 Nov): sports balls and kits, pirates, suits and robots. Same egg, same size, same hit box. + I('shell-crackers', 'egg', 20, 'Soccer Ball Egg', 'common', '#FFFFFF', '#3C3C46', 'Black and white panels, ready for kick-off.'); + I('shell-crackers', 'egg', 21, 'Basketball Egg', 'common', '#F29A4E', '#3A2216', 'Pebbly orange with dark seams. Nothing but net.'); + I('shell-crackers', 'egg', 22, 'Baseball Egg', 'common', '#FFFDF6', '#D8343A', 'White leather and red stitches.'); + I('shell-crackers', 'egg', 23, 'Football Egg', 'uncommon', '#B5703F', '#FFF8EC', 'Already the right shape. Laces at the back.'); + I('shell-crackers', 'egg', 24, 'Tennis Ball Egg', 'common', '#E2F25A', '#FBFFF0', 'Fuzzy, bright and a little bouncy.'); + I('shell-crackers', 'egg', 25, 'Eight Ball Egg', 'rare', '#686876', '#FBFBF6', 'Glossy, with the eight right on the forehead.'); + I('shell-crackers', 'egg', 26, 'Hockey Mask Egg', 'rare', '#FFFFFF', '#D8343A', 'A white goalie mask with stripes over the top.'); + I('shell-crackers', 'egg', 27, 'Referee Egg', 'uncommon', '#FBFBFB', '#3A3A42', 'Striped shirt, whistle on a cord. Fair calls only.'); + I('shell-crackers', 'egg', 28, 'Golf Ball Egg', 'common', '#FFFFFF', '#AAB2C0', 'Rows and rows of dimples.'); + I('shell-crackers', 'egg', 29, 'Pirate Egg', 'epic', '#D8343A', '#2E2E34', 'A spotted bandana, a gold earring and an eye patch.'); + I('shell-crackers', 'egg', 30, 'Pinstripe Suit Egg', 'rare', '#5E647C', '#C8323A', 'A sharp pinstripe jacket, a red tie and a pocket square.'); + I('shell-crackers', 'egg', 31, 'Tuxedo Egg', 'epic', '#5C5C68', '#FFFFFF', 'Dressed for the gala, bow tie and all.'); + I('shell-crackers', 'egg', 32, 'Tin Robot Egg', 'epic', '#D6DBE2', '#E2503F', 'Rivets, blinking lights and a wind-up key on the back.'); + I('shell-crackers', 'egg', 33, 'Android Egg', 'legendary', '#FFFFFF', '#3EC8E8', 'Glossy white panels with thin glowing seams.'); + I('shell-crackers', 'egg', 34, 'Junkyard Bot Egg', 'uncommon', '#B4B0A8', '#B07A4C', 'Patched together from whatever was lying around.'); + I('shell-crackers', 'hat', 8, 'Fedora', 'uncommon', '#7C8192', '#2E2E36', 'Grey felt with a dark band. Very old-movie.'); + I('shell-crackers', 'hat', 9, 'Pirate Tricorn', 'rare', '#3E302A', '#E8B830', 'Three turned-up sides, gold trim and a red plume.'); + I('shell-crackers', 'hat', 10, 'Sweatband', 'common', '#3A7FE0', '#FBFBF6', 'Blue towelling band with white stripes, for the final set.'); + I('shell-crackers', 'hat', 11, 'Football Helmet', 'epic', '#2F6FD8', '#FFFFFF', 'Glossy blue with a stripe and a face guard under the chin.'); + I('shell-crackers', 'hat', 12, 'Top Hat', 'uncommon', '#3C3C46', '#A8222E', 'Tall and smart, with a deep red band.'); + I('shell-crackers', 'hat', 13, 'Referee Cap', 'common', '#FBFBFB', '#34343C', 'Black and white panels. The whistle is extra.'); + I('shell-crackers', 'hat', 14, 'Ball Cap', 'common', '#D8343A', '#FFD04A', 'Team red with a gold star on the front.'); + I('shell-crackers', 'hat', 15, 'Robot Antenna', 'rare', '#C9CED6', '#FF4A3A', 'A metal cap, a springy aerial and bolts for ears.'); + I('shell-crackers', 'hat', 16, 'Parrot', 'legendary', '#E2343A', '#2F7AD8', 'A loud friend who sits on your head and watches.'); + I('shell-crackers', 'hat', 17, 'Bowler Hat', 'common', '#7A5E46', '#3A2C22', 'Round and brown, for detectives and bankers.'); // ---- Asteroid Run items ---- // Asteroid Run: aliens to run as (a new picture on the runner's own plane, same size and hit area), run trails and // tunnel colours, drawn by asteroid-run/wardrobe.js by slot and number. In no pack: captains wear them free in the diff --git a/e63334287a3deaa3/shell-crackers/kit.js b/e63334287a3deaa3/shell-crackers/kit.js index 3e6f20b5..94c99cec 100644 --- a/e63334287a3deaa3/shell-crackers/kit.js +++ b/e63334287a3deaa3/shell-crackers/kit.js @@ -41,7 +41,7 @@ window.ShellKit=function(X){ const {THREE,store,$}=X; const GAME='shell-crackers'; const SLOTS=['egg','hat','gun','crack']; -const N={egg:19,hat:7,gun:12,crack:5}; +const N={egg:34,hat:17,gun:12,crack:5}; const V3=THREE.Vector3; const rnd=(a,b)=>a+Math.random()*(b-a); const now=()=>performance.now()/1000; @@ -201,9 +201,138 @@ const EGGS=[null, g.strokeStyle='#b98656';g.lineWidth=2.5;g.stroke();g.fillStyle='#fbe6cf';g.fillRect(-L*.17,-H/2+4,L*.34,H-8);g.strokeStyle='#d9a878';g.lineWidth=2;g.strokeRect(-L*.17,-H/2+4,L*.34,H-8); g.fillStyle='rgba(140,90,50,.6)';for(const sx of [-1,1])for(let i=0;i<3;i++)for(const py of [-H*.18,H*.18]){g.beginPath();g.arc(sx*(L*.26+i*L*.07),py,2,0,7);g.fill()}g.restore()}; plaster(262,162,-.12,112,36); - wrap(10,xx=>{plaster(xx,96,.7,74,22);plaster(xx,96,-.7,74,22)})}} - + wrap(10,xx=>{plaster(xx,96,.7,74,22);plaster(xx,96,-.7,74,22)})}}, + // ---- wave 2: sports balls and kits, pirates, suits, robots (20 to 34) ---- + // 20 Soccer Ball Egg: white panels, dark pentagons (none on the face), grey seams + {shard:'#f4f4f2',paint(g){grad(g,'#ffffff','#e9ebee'); + const D='#3c3c46',seam='rgba(120,126,138,.85)'; + const spots=[];for(let i=0;i<5;i++)spots.push([51.2+102.4*i,i===2?50:62,16]); // the row above the face: the middle one sits high, clear of the brows + for(let i=0;i<5;i++)spots.push([102.4*i+256,166,21]); + g.lineWidth=2.5;g.strokeStyle=seam; + for(const [x,y,R] of spots)wrap(x%TW,xx=>{for(let k=0;k<5;k++){const a=-Math.PI/2+k/5*Math.PI*2,kk=kAt(y);g.beginPath();g.moveTo(xx+Math.cos(a)*R*kk,y+Math.sin(a)*R);g.lineTo(xx+Math.cos(a)*(R+24)*kk,y+Math.sin(a)*(R+24));g.stroke()}}); + for(const [x,y,R] of spots)wrap(x%TW,xx=>poly(g,xx,y,R,5,-Math.PI/2,D)); + g.fillStyle=D;g.beginPath();g.moveTo(0,0);for(let x=0;x<=TW;x+=8)g.lineTo(x,13+5*Math.cos(x/TW*Math.PI*10));g.lineTo(TW,0);g.fill(); + g.beginPath();g.moveTo(0,TH);for(let x=0;x<=TW;x+=8)g.lineTo(x,TH-12-5*Math.cos(x/TW*Math.PI*10+1));g.lineTo(TW,TH);g.fill(); + g.fillStyle='rgba(255,255,255,.7)';g.fillRect(0,32,TW,7)}}, + // 21 Basketball Egg: pebbled orange with dark seams + {shard:'#e8843a',paint(g,r){grad(g,'#f29a4e','#d9762e');dots(g,r,900,['#c4651f','#ffb070'],.8,1.6,.35,.6); + g.strokeStyle='#3a2216';g.lineWidth=5;g.lineCap='round'; + g.beginPath();g.moveTo(0,150);g.lineTo(TW,150);g.stroke(); + for(const x of [128,384]){g.beginPath();g.moveTo(x,0);g.lineTo(x,TH);g.stroke()} + for(const c of [0,TW])for(const s of [-1,1]){g.beginPath();for(let y=0;y<=TH;y+=4){const q=Math.sin(y/TH*Math.PI);g.lineTo(c+s*(30+62*q),y)}g.stroke()} + g.fillStyle='rgba(255,220,180,.35)';g.fillRect(0,34,TW,8)}}, + // 22 Baseball Egg: white leather, one red stitched seam that loops round under the face + {shard:'#f6f2e8',paint(g,r){grad(g,'#fffdf6','#ece6d8');dots(g,r,120,['#ddd5c4'],.8,2,.3,.5); + const sy=x=>140+62*Math.cos(x/TW*Math.PI*4); + g.strokeStyle='#e8a5a0';g.lineWidth=3;g.beginPath();for(let x=0;x<=TW;x+=4)g.lineTo(x,sy(x));g.stroke(); + g.strokeStyle='#d8343a';g.lineWidth=2.6;g.lineCap='round'; + for(let x=0;x{g.strokeStyle='#5a3418';g.lineWidth=3;g.beginPath();g.moveTo(xx,70);g.lineTo(xx,186);g.stroke(); + g.fillStyle='#fffaf0';g.strokeStyle='#c9b8a0';g.lineWidth=1.5;for(let y=78;y<=180;y+=13){g.beginPath();g.roundRect?g.roundRect(xx-20,y-3,40,7,3):g.rect(xx-20,y-3,40,7);g.fill();g.stroke()}})}}, + // 24 Tennis Ball Egg: fuzzy yellow-green with a white seam over the forehead + {shard:'#d6ea3e',paint(g,r){grad(g,'#e2f25a','#c8de30');dots(g,r,1500,['#f4ff9a','#b4c824','#eaf880'],.7,1.6,.3,.6); + const sy=x=>128-62*Math.cos(x/TW*Math.PI*4)*(x>200&&x<312?1:1); + g.lineCap='round';g.strokeStyle='rgba(150,165,30,.55)';g.lineWidth=13;g.beginPath();for(let x=0;x<=TW;x+=4)g.lineTo(x,sy(x)+1);g.stroke(); + g.strokeStyle='#fbfff0';g.lineWidth=9;g.beginPath();for(let x=0;x<=TW;x+=4)g.lineTo(x,sy(x));g.stroke()}}, + // 25 Eight Ball Egg: glossy, never darker than the Charcoal shell, with the white circle on the forehead + {shard:'#5c5c68',mat:'shiny',spec:0x9a9aa8,shin:80,paint(g){grad(g,'#686876','#575762'); + g.fillStyle='rgba(255,255,255,.45)';g.fillRect(0,30,TW,8);g.fillStyle='rgba(255,255,255,.2)';g.fillRect(0,42,TW,5); + wrap(256,xx=>{g.fillStyle='#fbfbf6';g.beginPath();g.ellipse(xx,58,15*kAt(58)*1.1,17,0,0,7);g.fill(); + g.save();g.translate(xx,59);g.scale(kAt(59)*.95,1.1);g.fillStyle='#2b2b30';g.font='900 22px Arial, sans-serif';g.textAlign='center';g.textBaseline='middle';g.fillText('8',0,1);g.restore()}); + wrap(0,xx=>{g.fillStyle='#fbfbf6';g.beginPath();g.ellipse(xx,128,13*kAt(128)*1.15,15,0,0,7);g.fill();g.save();g.translate(xx,129);g.scale(kAt(128)*.95,1);g.fillStyle='#2b2b30';g.font='900 22px Arial, sans-serif';g.textAlign='center';g.textBaseline='middle';g.fillText('8',0,1);g.restore()})}}, + // 26 Hockey Mask Egg: a white goalie mask with breathing holes, a red and blue stripe over the top, and straps behind + {shard:'#f4f4f0',mat:'shiny',spec:0x50545c,shin:35,paint(g){grad(g,'#ffffff','#eceef0'); + g.fillStyle='#d8343a';g.fillRect(244,0,24,96);g.fillStyle='#3a6fd8';g.fillRect(234,0,8,90);g.fillRect(270,0,8,90); + for(const s of [-1,1]){g.fillStyle='#d8343a';g.beginPath();g.moveTo(256+s*70,30);g.lineTo(256+s*120,70);g.lineTo(256+s*112,80);g.lineTo(256+s*62,42);g.fill()} + g.fillStyle='#4a4a54';for(const s of [-1,1]){g.beginPath();g.ellipse(256+s*25,104,24,15,0,0,7);g.fill()} + for(let row=0;row<3;row++)for(let i=-2;i<=2;i++){const x=256+i*15+(row%2?7:0),y=146+row*13;if(Math.abs(i)===2&&row===2)continue;g.beginPath();g.ellipse(x,y,4.5,3.5,0,0,7);g.fill()} + for(const s of [-1,1])for(let i=0;i<3;i++){g.beginPath();g.ellipse(256+s*(62+i*9),122+i*12,3.5,4.5,0,0,7);g.fill()} + g.strokeStyle='#b0b4bc';g.lineWidth=3;g.beginPath();g.ellipse(256,120,118,88,0,0,7);g.stroke(); + g.fillStyle='#7a7e88';for(const y of [70,160])wrap(0,xx=>g.fillRect(xx-138,y-6,276,12))}}, + // 27 Referee Egg: plain shell on top, a black-and-white striped shirt below with a collar and a whistle on a cord + {shard:'#f2f2f2',paint(g,r){grad(g,'#fffdf7','#efe9dc');dots(g,r,80,['#d9d1c0'],.8,2,.15,.4); + const top=x=>150+10*Math.cos((x-256)/TW*Math.PI*2); + for(let x=0;x=0;x-=8)g.lineTo(x,top(x)+6);g.fill(); + g.fillStyle='#fbfbfb';g.beginPath();g.moveTo(222,top(222)-6);g.lineTo(256,200);g.lineTo(290,top(290)-6);g.fill();g.strokeStyle='#3a3a42';g.lineWidth=4;g.stroke(); + g.strokeStyle='#e2343a';g.lineWidth=3;g.beginPath();g.moveTo(226,152);g.quadraticCurveTo(256,214,286,152);g.stroke(); + g.fillStyle='#c9ced6';g.beginPath();g.roundRect?g.roundRect(244,180,26,14,6):g.rect(244,180,26,14);g.fill();g.strokeStyle='#7a808a';g.lineWidth=2;g.stroke()}}, + // 28 Golf Ball Egg: bright white with rows of dimples + {shard:'#f8f9fb',paint(g){grad(g,'#ffffff','#eef0f4'); + for(let row=0;row<17;row++){const y=8+row*15,k=kAt(Math.min(248,Math.max(8,y))),step=14*Math.min(k,4.5); + for(let x=(row%2)*step/2;x84&&y<136)continue; + g.fillStyle='rgba(150,160,175,.45)';g.beginPath();g.ellipse(x,y+1,5.5*Math.min(k,4.5)*.75,5,0,0,7);g.fill();g.fillStyle='rgba(255,255,255,.95)';g.beginPath();g.ellipse(x-1,y-1.4,3.6*Math.min(k,4.5)*.75,3,0,0,7);g.fill()}}}}, + // 29 Pirate Egg: a red spotted bandana knotted at the back, an earring, the eye patch's strap (the patch itself is below) + {shard:'#f2e4cc',parts:pirateParts,paint(g,r){grad(g,'#f8ecd6','#e6d4b4');dots(g,r,120,['#d6c09c'],.8,2,.2,.5); + const edge=x=>64+6*Math.sin(x/TW*Math.PI*6)+(Math.abs(((x+TW/2)%TW)-TW/2)<40?14:0); + g.fillStyle='#d8343a';g.beginPath();g.moveTo(0,0);for(let x=0;x<=TW;x+=4)g.lineTo(x,edge(x));g.lineTo(TW,0);g.fill(); + g.fillStyle='#fff6e8';for(let i=0;i<46;i++){const x=r()*TW,y=6+r()*48;g.beginPath();g.ellipse(x,y,5*kAt(y)*.6,4,0,0,7);g.fill()} + g.strokeStyle='#9e1e24';g.lineWidth=3;g.beginPath();for(let x=0;x<=TW;x+=4)g.lineTo(x,edge(x));g.stroke(); + wrap(0,xx=>{g.fillStyle='#d8343a';for(const s of [-1,1]){g.beginPath();g.moveTo(xx+s*6,74);g.lineTo(xx+s*30,124);g.lineTo(xx+s*12,128);g.closePath();g.fill()}g.beginPath();g.ellipse(xx,74,13,10,0,0,7);g.fill()}); + g.strokeStyle='#2e2e34';g.lineWidth=5;g.lineCap='round';g.beginPath();g.moveTo(300,edge(300)-2);g.quadraticCurveTo(262,84,231,104);g.quadraticCurveTo(190,128,128,134);g.lineTo(0,120);g.stroke(); + g.beginPath();g.moveTo(TW,120);g.lineTo(440,90);g.stroke(); + g.strokeStyle='#e8b830';g.lineWidth=3.5;g.beginPath();g.ellipse(384,142,7,10,0,0,7);g.stroke()}}, + // 30 Pinstripe Suit Egg: shell on top, a pinstripe jacket below, white shirt, a tie and a pocket square + {shard:'#5e647c',paint(g,r){grad(g,'#fffdf7','#efe9dc');dots(g,r,60,['#d9d1c0'],.8,2,.15,.4); + suit(g,{jacket:'#5e647c',lapel:'#6e7590',pin:'rgba(235,238,248,.55)',shirt:'#fbfbfb'}); + g.fillStyle='#c8323a';g.beginPath();g.moveTo(249,150);g.lineTo(263,150);g.lineTo(266,166);g.lineTo(262,214);g.lineTo(256,224);g.lineTo(250,214);g.lineTo(246,166);g.fill(); + g.fillStyle='#e85a60';for(let y=170;y<214;y+=12){g.fillRect(250,y,12,3)} + g.fillStyle='#a8222a';g.beginPath();g.moveTo(248,142);g.lineTo(264,142);g.lineTo(262,154);g.lineTo(250,154);g.fill(); + g.fillStyle='#fbfbfb';g.beginPath();g.moveTo(318,172);g.lineTo(338,172);g.lineTo(333,160);g.lineTo(326,166);g.lineTo(321,160);g.fill()}}, + // 31 Tuxedo Egg: a dark jacket with satin lapels, a white shirt with studs, and a bow tie (below) + {shard:'#5c5c68',parts:bowTieParts,paint(g,r){grad(g,'#fffdf7','#efe9dc');dots(g,r,60,['#d9d1c0'],.8,2,.15,.4); + suit(g,{jacket:'#5c5c68',lapel:'#7c7c8c',pin:null,shirt:'#ffffff'}); + g.strokeStyle='rgba(180,184,196,.8)';g.lineWidth=1.5;for(let y=176;y<240;y+=6){g.beginPath();g.moveTo(240,y);g.lineTo(272,y);g.stroke()} + g.fillStyle='#3a3a44';for(const y of [168,190,212]){g.beginPath();g.arc(256,y,3.4,0,7);g.fill()} + g.fillStyle='#fbfbfb';g.beginPath();g.moveTo(318,172);g.lineTo(338,172);g.lineTo(328,160);g.fill()}}, + // 32 Tin Robot Egg: polished tin with rivets, a chest panel of lights and a dial, and a wind-up key on the back (below) + {shard:'#c8ccd4',mat:'shiny',spec:0x8c929c,shin:70,parts:keyParts,paint(g,r){grad(g,'#d6dbe2','#aab1bb'); + g.fillStyle='rgba(255,255,255,.55)';g.fillRect(0,40,TW,9); + for(const y of [74,150,214]){g.fillStyle='#8a929e';g.fillRect(0,y,TW,4);g.fillStyle='#eef1f5';g.fillRect(0,y+4,TW,2); + for(let x=6;x{g.fillStyle=c;g.beginPath();g.arc(x,174,5,0,7);g.fill();g.fillStyle='rgba(255,255,255,.7)';g.beginPath();g.arc(x-1.5,172.5,1.6,0,7);g.fill()}); + g.fillStyle='#fbfbfb';g.beginPath();g.arc(256,192,6,0,7);g.fill();g.strokeStyle='#e2503f';g.lineWidth=2;g.beginPath();g.moveTo(256,192);g.lineTo(260,188);g.stroke(); + g.strokeStyle='#7a828e';g.lineWidth=2;for(let i=0;i<4;i++){g.beginPath();g.moveTo(240,133+i*4);g.lineTo(272,133+i*4);g.stroke()}}}, + // 33 Android Egg: glossy white panels with thin cyan seams and two little temple lights + {shard:'#eef3f8',mat:'shiny',spec:0x6a7480,shin:90,paint(g){grad(g,'#ffffff','#dfe6ee'); + g.strokeStyle='#3ec8e8';g.lineWidth=3;g.lineCap='round'; + g.beginPath();for(let x=0;x<=TW;x+=4)g.lineTo(x,62+8*Math.cos((x-256)/TW*Math.PI*2));g.stroke(); + g.beginPath();for(let x=0;x<=TW;x+=4)g.lineTo(x,150-16*Math.cos((x-256)/TW*Math.PI*2));g.stroke(); + for(const x of [150,362]){g.beginPath();g.moveTo(x,62);g.lineTo(x,150);g.stroke()} + g.beginPath();g.moveTo(0,62);g.lineTo(0,240);g.stroke();g.beginPath();g.moveTo(TW,62);g.lineTo(TW,240);g.stroke(); + g.strokeStyle='rgba(120,140,160,.4)';g.lineWidth=2;g.beginPath();g.moveTo(200,170);g.lineTo(256,206);g.lineTo(312,170);g.stroke(); + for(const x of [176,336]){g.fillStyle='#bdf3ff';g.beginPath();g.arc(x,104,7,0,7);g.fill();g.fillStyle='#3ec8e8';g.beginPath();g.arc(x,104,4.5,0,7);g.fill()} + g.fillStyle='rgba(255,255,255,.8)';g.fillRect(0,30,TW,8)}}, + // 34 Junkyard Bot Egg: patched plates in odd metals, bolts at the corners, a rust streak or two + {shard:'#a8a49c',paint(g,r){grad(g,'#b4b0a8','#9c988f'); + const cols=['#b8b4aa','#b07a4c','#94a496','#a2abb6','#c4b08a']; + for(let i=0;i<34;i++){const w=40+r()*70,h=26+r()*40,x=r()*TW,y=r()*(TH-20),c=cols[i%5];if(x>196&&x<316&&y>70&&y<132)continue; + wrap(x,xx=>{g.fillStyle=c;g.fillRect(xx-w/2,y-h/2,w,h);g.strokeStyle='rgba(70,64,56,.6)';g.lineWidth=2;g.strokeRect(xx-w/2,y-h/2,w,h); + g.fillStyle='#6e6a62';for(const [px,py] of [[-1,-1],[1,-1],[-1,1],[1,1]]){g.beginPath();g.arc(xx+px*(w/2-5),y+py*(h/2-5),2.6,0,7);g.fill()}})} + for(let i=0;i<9;i++){const x=r()*TW,y=r()*TH;g.fillStyle='rgba(170,96,44,.45)';g.fillRect(x,y,5+r()*4,18+r()*30)} + g.strokeStyle='#3e3a34';g.lineWidth=2.5;g.beginPath();g.moveTo(200,150);g.lineTo(212,160);g.lineTo(206,168);g.lineTo(218,178);g.stroke()}} ]; +// how much wider than tall a round spot must be painted at canvas row y to look round on the egg +function kAt(y){const t=Math.PI*(1-Math.min(250,Math.max(6,y))/TH),s=Math.sin(t),c=Math.cos(t),rr=.44*s*(1+.12*c),dr=.44*(c*(1+.12*c)-.12*s*s),dy=.72*s;return Math.hypot(dr,dy)/rr} +function poly(g,x,y,R,n,a0,col){const k=kAt(y);g.fillStyle=col;g.beginPath();for(let i=0;i146+8*Math.cos((x-256)/TW*Math.PI*2); + g.fillStyle=o.jacket;g.beginPath();g.moveTo(0,top(0));for(let x=0;x<=TW;x+=8)g.lineTo(x,top(x));g.lineTo(TW,TH);g.lineTo(0,TH);g.fill(); + if(o.pin){g.strokeStyle=o.pin;g.lineWidth=1.4;for(let x=4;x{g.beginPath();g.moveTo(x,y);let a=r()*Math.PI*2;for(let k=0;k{const W=0xfffdf8,Wd=0xf3efe6;const M=new THREE.Matrix4().compose(new V3(.03,.635,.01),new THREE.Quaternion().setFromEuler(new THREE.Euler(-.08,0,.26)),new V3(1,1,1)); const Q=[];P(Q,'sph',W,0,0,0,.3,.1,.29);for(let i=0;i<9;i++){const a=i/9*Math.PI*2;P(Q,'sph',i%2?W:Wd,Math.sin(a)*.27,-.005,Math.cos(a)*.27,.09,.05,.09)} P(Q,'sph',0xffc93c,.05,.06,.02,.1,.06,.1);P(Q,'sph',0xffe27a,.03,.09,0,.035,.02,.035);P(Q,'cyl',Wd,.05,.11,.02,.012,.04,.012); - for(const q of Q){q.m.premultiply(M);L.push(q)}} + for(const q of Q){q.m.premultiply(M);L.push(q)}}, + // ---- wave 2 (8 to 17) ---- + // 8 Fedora: grey felt, a dark band, a pinched crown and a snap brim + L=>{const F=0x7c8192,Fd=0x666a7a,K=0x2e2e36;P(L,'cyl',F,0,.565,0,.41,.018,.4);P(L,'tor',Fd,0,.565,0,.41,.4,.4,Math.PI/2); + P(L,'taper',F,0,.715,0,.27,.3,.27);P(L,'sph',F,0,.86,0,.195,.045,.2);P(L,'box',Fd,0,.885,0,.03,.03,.24); + P(L,'band',K,0,.605,0,.266,.065,.266);P(L,'box',K,.2,.61,.17,.06,.05,.03,0,.8,0)}, + // 9 Pirate Tricorn: three turned-up sides with gold trim, a point to the front and a red plume + L=>{const C=0x3e302a,Gd=0xe8b830;P(L,'sph',C,0,.72,0,.215,.19,.215); + for(let i=0;i<3;i++){const b=Math.PI/3+i*Math.PI*2/3,Q=[];P(Q,'box',C,0,0,0,.8,.13,.035);P(Q,'box',Gd,0,.065,-.004,.8,.02,.04); + const M=new THREE.Matrix4().compose(new V3(Math.sin(b)*.215,.67,-Math.cos(b)*.215),new THREE.Quaternion().setFromEuler(new THREE.Euler(-.14,-b,0,'YXZ')),new V3(1,1,1)); + for(const q of Q){q.m.premultiply(M);L.push(q)}} + for(let i=0;i<3;i++){const a=i*Math.PI*2/3;P(L,'sph',Gd,Math.sin(a)*.43,.73,-Math.cos(a)*.43,.03,.03,.03)} + for(let k=0;k<5;k++)P(L,'sph',k%2?0xe2503f:0xff7a6a,.16+k*.02,.8+k*.035,.1+k*.015,.035,.06,.025,0,0,-.6)}, + // 10 Sweatband: white terry towelling with two red stripes, worn above the brows + L=>{const B=0x3a7fe0,W=0xfbfbf6;P(L,'band',B,0,.43,0,.348,.09,.348);P(L,'band',W,0,.41,0,.352,.014,.352);P(L,'band',W,0,.45,0,.344,.014,.344); + P(L,'band',B,0,.48,0,.322,.03,.322)}, + // 11 Football Helmet: a glossy blue shell with a white stripe, ear pads and a face guard that stays under the mouth + L=>{const B=0x2f6fd8,Bd=0x2558b0,W=0xffffff,Gy=0xc9ced6;P(L,'dome',B,0,.4,0,.37,.37,.38);P(L,'tor',Bd,0,.4,0,.37,.38,.3,Math.PI/2); + for(let k=0;k<=14;k++){const th=-Math.PI/2+k/14*Math.PI;P(L,'box',W,0,.4+Math.cos(th)*.372,Math.sin(th)*.382,.05,.012,.07,th)} + for(const s of [-1,1]){P(L,'sph',B,s*.36,.32,.05,.06,.12,.16);P(L,'cyl',Bd,s*.41,.3,.06,.045,.02,.045,0,0,Math.PI/2);P(L,'cyl',Gy,s*.435,.09,.01,.014,.39,.014,0,0,s*.18)} + for(const y of [-.06,-.13])L.push({g:G.arc,c:Gy,m:X.partM(0,y,0,.47,.5,.5,Math.PI/2,0,Math.PI)}); + P(L,'cyl',Gy,0,-.095,-.5,.014,.09,.014)}, + // 12 Top Hat: tall, with a deep red band + L=>{const K=0x3c3c46,Kl=0x4a4a56,R=0xa8222e;P(L,'cyl',K,0,.6,0,.36,.022,.36);P(L,'tor',Kl,0,.605,0,.36,.36,.3,Math.PI/2); + P(L,'cyl',K,0,.8,0,.215,.4,.215);P(L,'cyl',Kl,0,1.0,0,.205,.01,.205);P(L,'band',R,0,.65,0,.219,.07,.219)}, + // 13 Referee Cap: black and white panels, a black peak and a button on top + L=>{const W=0xfbfbfb,K=0x34343c;P(L,'dome',W,0,.56,0,.27,.2,.27); + for(let i=0;i<6;i+=2)P(L,'sect',K,0,.56,0,.276,.205,.276,0,i/6*Math.PI*2,0); + P(L,'cyl',K,0,.57,-.33,.19,.016,.17,.1,0,0);P(L,'sph',K,0,.765,0,.03,.02,.03);P(L,'band',K,0,.575,0,.272,.03,.272)}, + // 14 Ball Cap: team red, a white front panel with a gold star badge, curved peak + L=>{const R=0xd8343a,Rd=0xb02a30;P(L,'dome',R,0,.56,0,.27,.21,.27); + poly3(L,0xffd04a,0,.705,-.2,.07,.78);P(L,'cyl',Rd,0,.57,-.33,.19,.016,.17,.1,0,0);P(L,'sph',Rd,0,.775,0,.03,.02,.03);P(L,'band',Rd,0,.575,0,.272,.03,.272)}, + // 15 Robot Antenna: a riveted metal cap, a springy aerial with a red bulb, and bolt ears at the sides + L=>{const S=0xc9ced6,Sd=0x9aa2ac,R=0xff4a3a;P(L,'dome',S,0,.6,0,.25,.13,.25);P(L,'band',Sd,0,.61,0,.252,.03,.252); + for(let i=0;i<8;i++){const a=i/8*Math.PI*2;P(L,'sph',Sd,Math.sin(a)*.252,.63,-Math.cos(a)*.252,.016,.016,.016)} + P(L,'cyl',Sd,0,.78,0,.012,.14,.012);for(let k=0;k<4;k++)P(L,'tor',S,0,.86+k*.03,0,.03,.03,.03,Math.PI/2);P(L,'cyl',Sd,0,.99,0,.01,.06,.01); + P(L,'sph',R,0,1.04,0,.045,.045,.045);P(L,'sph',0xffc0b0,-.015,1.055,-.02,.014,.014,.014); + for(const s of [-1,1]){P(L,'cyl',Sd,s*.42,.2,0,.07,.05,.07,0,0,Math.PI/2);P(L,'cyl',S,s*.45,.2,0,.045,.03,.045,0,0,Math.PI/2)}}, + // 16 Parrot: a red, blue and yellow parrot perched on top, looking ahead + L=>{const R=0xe2343a,Rd=0xb82a30,B=0x2f7ad8,Y=0xffd04a,K=0x2b1a10,W=0xffffff; + P(L,'sph',R,0,.86,.03,.1,.14,.1,-.25,0,0);P(L,'sph',R,0,1.0,-.02,.085,.085,.085); + P(L,'sph',W,0,1.0,-.075,.05,.045,.03);for(const s of [-1,1]){P(L,'sph',W,s*.05,1.01,-.06,.03,.03,.02);P(L,'sph',K,s*.06,1.015,-.075,.013,.015,.01)} + P(L,'sph',0x3a3a40,0,.985,-.11,.03,.04,.035);P(L,'cone',0x3a3a40,0,.955,-.12,.02,.05,.02,Math.PI*.9,0,0); + for(const s of [-1,1]){P(L,'sph',B,s*.085,.85,.05,.03,.11,.08,-.2,0,s*.15);P(L,'sph',Y,s*.088,.92,.02,.028,.04,.06,-.2,0,s*.15);P(L,'box',0x6a6a70,s*.035,.72,-.02,.015,.02,.06)} + for(let k=0;k<3;k++)P(L,'box',k===1?B:Rd,(k-1)*.025,.7,.17,.025,.012,.2,.9,0,0)}, + // 17 Bowler Hat: a round brown crown with a curled brim, for detectives and bankers + L=>{const C=0x7a5e46,Cd=0x5e4634,K=0x3a2c22;P(L,'sph',C,0,.62,0,.265,.24,.265);P(L,'cyl',C,0,.565,0,.34,.016,.34); + P(L,'tor',Cd,0,.575,0,.335,.335,.3,Math.PI/2);P(L,'band',K,0,.6,0,.248,.05,.248)} ]; +// a flat five-point star facing out of a tilted panel (the ball cap's badge) +function poly3(L,c,x,y,z,R,tilt){const Q=[];for(let i=0;i<5;i++){const a=i/5*Math.PI*2;P(Q,'cone',c,Math.sin(a)*R*.5,Math.cos(a)*R*.5,0,R*.32,R,.01,Math.PI/2*0,0,-a)} + const M=new THREE.Matrix4().compose(new V3(x,y,z),new THREE.Quaternion().setFromEuler(new THREE.Euler(tilt,0,0)),new V3(1,1,1));for(const q of Q){q.m.premultiply(M);L.push(q)}} // The rotten egg's stink lines (merged like a hat) and its flies (one small mesh that circles: the egg's only extra draw call) function stinkParts(L){const c=[0x8fa05a,0x9db06a,0x7d8d48]; for(let i=0;i<3;i++){const x=(i-1)*.16,z=.08+(i===1?.04:0);for(let k=0;k<9;k++){const y=.72+k*.04,dx=Math.sin(k*.9+i)*.035;P(L,'box',c[i],x+dx,y,z,.022,.045,.018,0,0,Math.cos(k*.9+i)*.6)}}} @@ -276,8 +455,8 @@ function flies(){if(fliesGeo)return fliesGeo;const L=[]; for(const s of [-1,1])P(L,'sph',0xe8f0f6,x+s*.026,y+.022,z,.03,.008,.018,0,a,s*.5)} return fliesGeo=X.mergeParts(L)} const faceCache=new Map(); -function faceGeo(hat,rot){const key=hat+':'+rot;if(faceCache.has(key))return faceCache.get(key); - const L=[{g:X.faceGeos.ink,c:0x2b1a10,m:new THREE.Matrix4()}];if(hat)HATS[hat](L);if(rot)stinkParts(L); +function faceGeo(hat,egg){const key=hat+':'+egg;if(faceCache.has(key))return faceCache.get(key); + const L=[{g:X.faceGeos.ink,c:0x2b1a10,m:new THREE.Matrix4()}];if(hat)HATS[hat](L);if(egg===7)stinkParts(L);else if(egg&&EGGS[egg].parts)EGGS[egg].parts(L); const geo=X.mergeParts(L);faceCache.set(key,geo);return geo} // ===================================================================== @@ -292,8 +471,8 @@ function dress(m,k,anyMode){ else if(kind==='shiny'){m.mat.specular.setHex(E.spec);m.mat.shininess=E.shin} m.emi=E&&E.emi?new THREE.Color(E.emi):null;if(!m.emi)m.mat.emissive.setRGB(0,0,0); m.stage=-1; // index.html's updateModel puts the right picture on at the next frame - const hat=k?k.hat:0,rot=egg===7,ink=m.face.children[1]; - if(hat||rot){ink.geometry=faceGeo(hat,rot?1:0);ink.material=X.gunMat}else{ink.geometry=X.faceGeos.ink;ink.material=X.inkMat} + const hat=k?k.hat:0,rot=egg===7,ep=rot||!!(E&&E.parts),ink=m.face.children[1]; + if(hat||ep){ink.geometry=faceGeo(hat,ep?egg:0);ink.material=X.gunMat}else{ink.geometry=X.faceGeos.ink;ink.material=X.inkMat} if(m.fest)m.fest.geometry=X.turkeyKit(!!hat); // Turkey Week: a Locker hat in place of the pilgrim hat if(rot&&!m.flies){m.flies=new THREE.Mesh(flies(),X.gunMat);m.body.add(m.flies)}else if(!rot&&m.flies){m.body.remove(m.flies);m.flies=null} const skin=k?k.gun:0;if((m.gunSkin|0)!==skin){m.gunSkin=skin;m.gunKey=null} // updateModel builds the gun again @@ -701,7 +880,7 @@ if(navigator.webdriver)window.__kit={parse,wireOf,wear,get mine(){return Object. // one picture of every item in a slot: eggs and hats front and back, gun skins on the given gun from both sides, // crack effects at three moments of the real effect sheet(slot,opt){opt=opt||{};const n=N[slot],cell=opt.cell||220,cols=slot==='crack'?3:opt.cols||(slot==='gun'?4:8),p=pvInit(); - const shots=[];for(let i=0;i<=n;i++){ + const shots=[];for(let i=0;i<=n;i++){if(opt.from&&i&&i1?' (back)':'')])}} else if(slot==='gun'){const key=opt.key||'beater';for(const side of [1,-1]){const k=parse('');pvSet(k);p.gun.clear();p.gun.add(X.buildGun(key,false,i));p.cam.aspect=1.4;pvShot('gun');if(side<0){const c=p.cam,b=new THREE.Box3().setFromObject(p.gun).getCenter(new V3());c.position.x=2*b.x-c.position.x;c.position.z=b.z-(c.position.z-b.z);c.lookAt(b)} shots.push([pvRender(cell*1.4|0,cell),(i?items('gun')[i-1].name:'Plain')+(side<0?' (left)':'')]);p.gun.clear()}} From 5a5dc632e001dba4928045b82323620871e6c2fd Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 05:31:56 +0000 Subject: [PATCH 04/63] Tumble Trials Closet: smoother wizard beard; README counts for the new items Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn --- README.md | 2 +- e63334287a3deaa3/tumble-trials/closet.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5ca67867..90d607b1 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Personal site hosted with GitHub Pages at **https://ascoding11.github.io**, the - `e63334287a3deaa3/turbo-trail/`: Turbo Trail (Back Room), a speedrun obby: 25 short levels (about 6 to 12 seconds each at gold pace) in five worlds of five, Candy Coast, Neon City, Lava Forge, Frost Peaks and Star Drift, each with its own sky, sea, palette and scenery (Three.js, Firebase Realtime Database race rooms under `rooms/sr-…`, same project and rules as Rumble Karts; Quick match uses `rooms/sr-pub-1` to `sr-pub-4`; invite links go through the home page as `#sr-`; rooms hold up to 12). Everything that isn't drawing lives between the `// ==CORE==` and `// ==/CORE==` markers in the page, with no DOM or Three.js in it, so a Node script can run it on its own: movement (`PHYS`, `simStep`), parts (upright boxes and cylinders, optionally moving by `line`, `spin` or `orbit`, blinking (`timed`), crumbling, lethal, a jump pad (`bounce`), a climbing wall (`wj`), ice, or a zone: `speed` pads, `lowg` low gravity and the `portal`), the level builder (`Course`), the levels (`WORLDS`, `LEVELS`, `buildLevel`) and the checking bot. Physics is a fixed 120 Hz step with the runner as an upright cylinder (radius 0.42, height 2), so it plays the same at any frame rate (a slow frame runs several steps; nothing moves more than 0.5 in one step, and the thinnest solid or lethal part is 0.25), and parts are found through an x/z grid of 10 × 10 cells. Running speed is 12.5 with snappy acceleration, a jump rises 3.24 and carries about 9 at full speed, with 0.12 s of coyote time and a 0.14 s jump buffer; in the air the stick speeds you up, turns you and brakes you (`airControl`) but never past your take-off speed. Speed pads push you to 27 along their arrows (the extra speed fades on the ground in about a second and stays in the air), jump pads throw you 7.8 up, and touching a striped climbing wall in the air lets you jump again off it (up 16.5, 8 away from the wall, keeping your speed along it; you also slide down it slowly). Levels are written with the `Course` cursor (`start`, `run`, `gap`, `stones`, `blocks`, `pad`, `bounce`, `bars`, `stairs`, `movers`, `pistons`, `spinner`, `lasers`, `wallrun`, `chimney`, `crumble`, `blinks`, `slalom`, `lowg`, `orbit`, `drop`, `turn`, `portal`); each piece also adds the checking bot's route. The bot plays with the real `simStep`: before each jump it simulates the jump and only takes it if it lands, it hops or waits for hazards, and it pushes off climbing walls; when changing a level, run the bot over it at several start times (moving parts depend on the clock) and at the top upgrade speed (`runBot(buildLevel(i), t0, 90, run)`). The medal times in `MEDALS` ([gold, silver, bronze] per level) come from the bot: gold is its median time over several start times plus 4% and 0.25 s, rounded up to a quarter second, silver is 1.3 × gold and bronze 1.75 × gold, so they need re-working out if a level changes. A level's clock starts with your first move and a fall, a lethal part or R puts you back at the level's start with the clock reset; in a Full run (all 25 on one clock, starting with your first move on 1-1) the clock keeps running through falls and T starts the run over. After each portal the split (your full-run time there against your best run's, or the level time against your best) shows green when ahead and red when behind. Stars: 1, 2 or 3 for a bronze, silver or gold best; they unlock speed upgrades (`SPEEDS`: +4%, +8%, +12% at 12, 30 and 50 stars, chosen in the Garage and used online too) and trails (`TRAILS`, at 3 to 75 stars; a camera-facing ribbon of the last 0.45 s, one draw call). Saved only in the browser under `turbotrail:` keys: `name` (a plain string, which party.js puts back after a party launch), `color`, settings (`sens`, `invY`, `follow`, `ghost`, `vol`, `mus`, `gfx`, `zoom`, `slock`, `hostC`, `room`), `prog` (`{reached, best: [25 times], run: {t, sp: [25 splits]}, speed, trail, clears, falls, runs}`), `ghost:` (your best run on that level, 20 samples a second as comma-separated whole tenths of x, y, z and hundredths of the facing, replayed as a see-through runner when Best ghost is on) and `awarded` (the last race win counted). Online, like Spire, everything travels through each runner's own node `rooms/sr-/players/`, which must always hold `n, c, x, z, h, ts`: also `y`, `a` (animation, 5 while respawning), `l` (which level of the course you're on), `r` (the race the position belongs to), `tr` (trail), `j` (join time) and `f` (a finish claim, `race:milliseconds`). The host (newest host number `he`, else whoever has been in the room longest, chosen once the room has loaded) publishes the race as JSON in its own `rs`: `{id, ph: 'race' | 'inter', t0, cs, nm, fin, ff, ne}`, where `cs` is the course (a random world's five levels, five from all over, or all 25: the host's Course option in the pause menu, saved as `turbotrail:hostC`), `t0` the server time it starts (a 5 s countdown), `fin` the finish order `[uid, ms, name]` and `ff` the first finish; the race ends when everyone live has finished, 30 s after the first finish, or after 45 s a level plus 20 s, then results show for 9 s and the next race starts. Guests clean the host's race before using it (`cleanRS`), so a broken host can't freeze them. The race clock is the simulation clock, so every runner sees the moving parts in the same places; other runners are see-through ghosts (with their trails) drawn from a short history of their updates with `../netsmooth.js`, only while they're on the same level as you, and a list on the right shows everyone's progress. The host takes finish claims at their word, so it isn't cheat-proof. A background tab keeps its node fresh (and, for the host, the race moving) with a 1 s timer. Camera: behind you, pulled in so it never ends up inside a wall, easing round to the way you're running while you hold forward (not while strafing, and not for 0.7 s after you turn it yourself; Settings → Camera: Free turns that off), and a little wider at high speed. On computers clicking the game captures the mouse (Pointer Lock) to look around; Esc frees it. Keys are rebindable with `keybinds.js` (`keybinds:turbo-trail`). On touch screens the page adds `touch` to `body`: a run stick, Jump, a restart button, and drag anywhere else to look; Fast graphics by default. Drawing: parts that never change are merged into one mesh per look (bevelled edges from a per-face `fe` attribute, as in Spire), moving, blinking and crumbling parts keep their own meshes, scenery is one mesh per level, the sky one shader and particles one point buffer, so a level is about 20 to 30 draw calls; Pretty graphics adds sun shadows. Leaderboards hooks: `BackRoomStats.min('obby', seconds)` for a finished full run (`obby` is already in stats.js's `LOWER` list; stats are kept per game folder, so it doesn't mix with Spire's), `max('stars', total)`, `add('levels', 1)` at every portal and `add('wins', 1)` for winning a race against at least one other runner. Ads follow the `AD_SLOT` pattern (empty). A test hook (`window.__sr`, with `advance(seconds)`, `autopilot(on)` and `buildLevel`/`runBot`) exists only when `navigator.webdriver` is set. **Spanish:** it loads `../lang.js` and its own words in `turbo-trail/es.js` (level names stay English; signs drawn on canvases use `T()` and follow the language when the level is built), with an EN | ES switch next to Controls in the menu and pause card. - `e63334287a3deaa3/escapade/`: Escapade (Back Room), a 3D escape-room obby (Three.js, Firebase Realtime Database rooms under `rooms/er-…`, same project and rules as Rumble Karts; Quick match uses `rooms/er-pub-1` to `er-pub-4`; invite links go through the home page as `#er-`; rooms hold up to 12). **Worlds:** six worlds of eight levels (48), each level a themed set of rooms with one way out, harder world by world. World 1, Breakout (Detention, Lab Rats, Hot Kitchen, Toy Box, Down the Drain, The Vault, Orbit Station, The Warden), is built into `index.html`, unchanged. World 2, Lost and Found (Overdue (a library), Clockwork (a clock tower), Cold Feet (an ice cave), Lost Temple, Mirror Manor (a haunted house), Stage Fright (a theatre), Gale Point (a lighthouse in a storm) and After Hours (a museum, the world's finale)), is `escapade/worlds/w2.js`; its first five were levels 9–13 before worlds came, with the same ids. World 3, Deep Down (Cave-In (an old mine), Deep End (a flooded cave), Off the Rails (an underground railway), High Water (a pump station), Fish Tank (an aquarium), Crystal Clear (a crystal cavern), Hull Breach (a sunken ship) and Hot Core (a volcano, the world's finale)), is `escapade/worlds/w3.js`; it added water you swim in (jump strokes up; an Air bar while your head is under), minecarts on rails (`rail`), water and lava that rise (`rise`, started by a flag or a trigger zone) and dark rooms you need the lantern for (`B.dark`, item `lamp`). World 4, Full Power (Assembly Line (a toy factory), Sorting Day (a recycling plant), Spin Cycle (a power station), Growing Pains (a greenhouse), Hot Swap (a data centre), Night Shift (an observatory), Spare Parts (a robot lab) and Meltdown (a power plant, the finale)), is `escapade/worlds/w4.js`; it added belts and fans a lever turns round (`rev`), pressure plates you stand on (`B.hold`), presses and piston walls that crush (`B.crusher`, `B.press`) and red, green and yellow keycards with their doors (`B.cardDoor`). World 5, Sky High (Hot Air (a balloon festival), Big Top (a flying circus), Thunderclap (a skyscraper in a storm), Sky Deck (a revolving restaurant), Zeppelin (an airship), Cloud Keep (a castle in the clouds), Orbiter (a satellite) and Eye of the Storm (a weather station in a hurricane, the finale)), is `escapade/worlds/w5.js`; it added updrafts (`B.lift`), cannons you fire yourself from (`B.cannon`, a `{w5: 'cannon'}` button), lightning on a timer with rods that power gates (`B.bolt`), groups of parts that turn a step at a press (`B.turning`, `B.turnBtn`, `B.align`) and the `clouds` scenery. World 6, The Last Door (One Way Home (a labyrinth with one-way flaps), Sun and Sand (a pyramid), Siege Works (a fortress), Dragon's Wake (a dragon's keep), Borrowed Time (a vault of clocks), Upside Dream (a dream), Long Climb (a climb over a molten sea) and The Last Door (the Keeper, a three-phase boss, and the end of the game)), is `escapade/worlds/w6.js`; it added one-way flaps (`oneway: [nx, nz]`, `B.oneway`), rings of fire you jump (shape `ring`, move `pulse`, `B.ring`) and the shadow (`B.shadow` zones: a chaser that walks your own path a few seconds behind you); escaping its last level shows "You beat Escapade!". Each of Worlds 3–6 keeps its shared code in its own marked blocks in `index.html` (`// ---- World core additions ----` inside the CORE, `// ---- World drawing additions ----` outside it) with one-line hooks ending `// W hook`; each does nothing unless a level uses it, and `worlds/README.md` section 13 lists every helper. Worlds 3–6 are `needs: 3` (`CORE_VER` 3). Each world after the first is its own file, `worlds/w.js`, loaded only when it's needed (picked in the menus, the level an online room is playing, or the next world when you reach a world's last level), so the page stays small; a world file only describes levels (`Escapade.world({n, needs, levels})`), and every shared helper, puzzle part and the bot live in `index.html`. **`escapade/worlds/README.md` is the guide for building a world**: the API, every helper and puzzle with its parameters, seeds, checkpoints, stars, the bot route, the tests a level must pass, a performance budget, a difficulty guide and the mechanics already used. The `WORLDS` list in `index.html` (one line per world: name, colour, blurb and its eight level ids) is what the menus show before a file loads and what progress counts by. `CORE_VER` goes up when the page gains something world files can use; a file says which one it needs, and a page too old for it (or one that can't load it) shows an "Update needed, reload" notice instead of breaking. Everything that isn't drawing lives between the `// ==CORE==` and `// ==/CORE==` markers: movement (`PHYS`, `simStep`, Spire's numbers: jump 3.37, 3.67 with the ledge pop, run 7.5, fixed 120 Hz step, so the frame rate never changes the physics), parts (upright boxes and cylinders, filed in a 6 × 6 xz grid for collision; moving by `line`, `spin` or `orbit`; timed, crumbling, lethal, bouncy, conveyors, ladders, low-gravity zones; and for levels 9–13: `ice` (slippery: you speed up and stop slowly, `PHYS.ICE_ACC`/`ICE_DEC`), the move types `swing` (a pendulum: platforms and blades that stay level, hanging `len` below a pivot) and `roll` (one way at a steady speed, then round again: the temple's boulder), ladders (trusses) that move and carry you while you hang on (stick off = hang, stick into it = climb), `tp` portals (`[x, y, z, yaw]`: where they send you; put the arrival point a little above the floor), zones `cold` (you freeze after `PHYS.COLD` seconds in it, shown as a Warmth bar) and `warm` (a fire thaws you), and `slide` crates (one shove and they slide until something stops them); and for World 2's last three: zones `wind` (`wind: [vx, vz]`, blows you along on the ground and in the air, in gusts when `timed`; white streaks show it, fainter just before a gust; the bot leans into it), the lever button `{toggle}` (flips a flag on and off, for scenery that swaps with `onIf`/`offIf`) and `B.all(flags, set)` (a flag that comes on once all of its flags are: the museum's vault), plus level options `sea` (a molten sea to the horizon instead of the lawn) and `msgs`/`unlock` (a level's own feed messages and Unlocked! banners)), the puzzle parts and `logicStep`/`useBtn`/`tryCode`, the level library (`LEVELS`, each with a `par` target time and a `build` that also writes the checking bot's route) and the bot; it has no DOM or Three.js in it, so a Node test can run it on its own. **Puzzles are flags** in the level's state `W.st.f`: a part with `door: 'flag'` is solid until the flag is on (a number means "on until that time": timed gates); `onIf`/`offIf` make a part exist only while a flag is on/off (the space bridge, the Warden's arms); `lock: 'item'` opens a door when you come near carrying the item; `item` parts are pickups (`key`, `card`, `fuse`, `gem`); `btn` parts are used with E / the USE button: `{set}` (a button), `{timed, dur}` (a valve), `{seq, sym}` (recipe buttons, pressed in the order `W.seqs[g].order`), `{pad}` (a keypad; the code is `W.codes[k]`, four digits from the level's seed), `{need, then}` (a fuse box), `{dial, key, n}` (turns one hand of the clock: `W.dials[g]` holds the target time, from the seed; all of a group's dials on target sets its flag), `{mirror}` (turns a mirror a quarter; `beamTrace` follows the moonbeam in `W.beams[g]` across the floor, and the beam reaching its target sets the flag); `plate` parts latch a pushed crate (`push`, kept inside `lim`, pushed along one axis at a time) and set their flag; `step` parts (`{seq, sym}`, the temple's stones) count when you land on them, in the order `W.seqs[g].order` (the mural shows it). The library's code is `W.codes.lib`, its digits shown on four coloured books in the order `W.books.lib`; the manor's right mirror is the colour `W.rose` (from the seed, like every other clue). Walls are 10 tall (22 in the low-gravity bay) so nothing standable gets you over them. Each level keeps the puzzle in its own copy for every player: there are no shared doors, so nobody can open or block anything for anyone else. **Stars**, saved in this browser under `escapade:prof` (`{best: {levelId: seconds}, st: {levelId: bits}, esc, deaths}`; bits 1 escaped, 2 beat `par`, 4 found the gem; the gem counts once found in any escaped run), by level id as always, so saves from before worlds came load as they were (8 escaped shows World 1 done and World 2 open; 13 shows World 2's first five done). The menus: Play carries on from the first level you haven't escaped; Worlds shows a card per world (name, stars of 24, how many escaped, locked or coming soon), then that world's eight levels. A level opens when you escape the one before it in its world; a world opens when you escape the last level of the one before it (or any of its own levels, say online). The menu counts escapes of 48 and stars of 144. Death (touching anything red and glowing, or falling) respawns you at your last checkpoint after 0.6 s; what you found and opened stays, crates not on their plate go home, crumbled tiles come back and timed gates shut (`softReset`). On your own the clock stops while paused or while the keypad is open. **Online**: each player writes only their own node `rooms/er-/players/`: `n, c, x, z, h, ts` as the shared rules require, plus `y`, `a` (animation), `j` (join time), `rr` (the round you're playing), `f` (your finish, `round:ms:server time`) and, from the room's leader only, `lr`/`ll`/`lt` (round number, level, start time). The leader is the live player who joined first (`Net.leader`); everyone else follows the leader's round, loading that level with a seed made from the round (so codes and recipes match for everyone) and running moving parts from `lt`, so all players see the same moving platforms. Late arrivals' own clocks start when they arrive. When everyone in the room is out (6 s later), or two minutes after the first escape, the leader starts the next level; the leader can also pick a level from the pause menu. If the leader leaves, the next one carries on with the same round. Other players are drawn with `../netsmooth.js` and only while they're in your round. Every value read from another node is checked (`onNode`). Each node also has `v`, its page's `CORE_VER`. The leader can pick any level in the worlds and levels it has opened itself (pause menu, Pick the room's level); everyone else loads that level's world file when they see the round (the round starts 4.5 s later, and a late loader's clock starts when it arrives), and a page that doesn't know the level shows the update notice. Pages from before worlds came (no `v`) only know levels 1–8 and simply don't follow a later level: the room list says they need to reload and the leader's feed names them. Keys are rebindable through `keybinds.js` (`keybinds:escapade`, actions `forward`, `back`, `left`, `right`, `jump`, `use`, `shiftLock`, `view`, `zoomIn`, `zoomOut`, `reset`). Touch: stick, JUMP, USE (green when something can be used), drag to look, pinch to zoom; shown only on touch screens. Other saved settings: `escapade:` `name`, `color`, `room`, `sens`, `invY`, `vol`, `mus`, `gfx`, `view`, `zoom`, `slock`. Leaderboards hooks: `BackRoomStats.add('escapes', 1)`, `max('cleared', n)` (levels escaped, up to 48), `max('stars', n)` (up to 144), `min('total', seconds)` (World 1's best total: the sum of its eight best times once they all have one, as before worlds came, so totals already on the board still compare; the menu calls it "World 1 total") and `min('total-w', seconds)` for each later world (`total-w2` … `total-w6` are in `stats.js`'s `LOWER`; the board has a row for each world). Ads follow the `AD_SLOT` pattern (empty). A test hook (`window.__er`, with `advance`, `frames`, `autopilot`, `depth`, `ensureWorld`) exists only when `navigator.webdriver` is set. **When changing a level**, keep the route in its `build` working and re-run the bot on it at several start times, and check that every puzzle door is still needed: with one door kept shut and all the others open, running, jumping and running jumps from everywhere reachable must not reach the exit (the checks used for this branch ran exactly that on all eight levels; levels 9–13 were checked the same way, with the search keeping the whole player state so rides on moving ladders count, and with each portal taken away in turn: the manor's right mirror and its last mirror are needed; World 2's last three too, with levers as part of the search: the theatre can't be crossed with its levers left either way, and its stage door, the lighthouse's beacon and the museum's vault and exit doors are all needed). Worlds 3–6 were checked the same way: the bot from the spawn and from every checkpoint at several seeds and start times, the search with each gate shut in turn (extended to swim, ride carts, carry keys and turn the turning rooms), random runners for clipping, draw calls, phones and an online room; the merged page still plays Worlds 1 and 2 exactly as before (same parts, codes and bot runs). The checking bot has route steps for the new things: `ladder` (a plan saying wait, grab, hang or climb), `dial`, `tp`, `kick` (a sliding crate) and `steps` (stepping stones, by way of a hub platform). **Spanish:** it loads `../lang.js` and its own words for the page and all six worlds in `escapade/es.js` (a new level's signs and messages need their Spanish added there, or they show in English); level and world names and the EXIT sign stay English. Every canvas made by `cvs()` passes its text through `TX()` while the language is Spanish, so the world files need no changes, and compass dials show N E S O. The puzzles are codes, colours, clocks and pictures, not English words, so none is English-only. EN | ES switch next to Controls. - `e63334287a3deaa3/odd-one-out/`: Odd One Out (Back Room), Props vs Hunters (prop hunt) for up to 16 players (Three.js, Firebase Realtime Database rooms under `rooms/ph-…`, same project and rules as Rumble Karts; Quick match uses `rooms/ph-pub-1` to `ph-pub-4`; invite links go through the home page as `#ph-`). Props aim at an object and turn into an exact copy of it; hunters wait in a closed room during the hide time, then hunt with a hitscan rifle, and a shot that hits a real object is free by default (the host can switch a 3 or 5 HP penalty on in the lobby: `pen` in the settings; a penalty saved by an older page is ignored unless the host picked it again, `oddone-hostpen`). Props move by size, the smaller the slower: from 3.0 m a second for a cup through about 3.7 for a cardboard box and 3.9 for a bench to 4.3 for a sofa (`speed` where each object type is defined: 3.9 + 0.55 × log10(volume / 0.3), kept between 3.0 and 4.4; it used to be the other way round; the hunter runs at 5.2), so the hard-to-spot small ones can't also outrun anyone; health also goes by size (40 to 200) unless the host sets All 100. A match is 3 to 10 rounds and the hunters are picked so everyone takes turns (`newRound`, by how often each player has hunted, `hn`). Every object you can turn into is a type in `buildProps` (`defProp(id, name, parts)`, where parts are plain Three.js shapes merged into one geometry per material, with the origin in the middle of the base and the front facing +z); a map draws its copies of a type as instanced meshes (`buildInstances`) and a disguised player draws the very same geometries and materials (`propModel`), so the two can't be told apart, and both use the type's own box for collisions and shots. Health scales with the type's size (40 to 200) unless the host picks All 100. To add a type, add a `defProp` line (and `{elig: false}` for things players shouldn't turn into); to add a map, write a `build…` function with the `Builder` helpers (`box` for walls and fixed furniture, `at` for turned furniture, `place(id, x, z, yaw, y)` for turnable objects, `kit` for walls with doors, floors, ceilings and lights, `hunterRoom` for the waiting room outside the map) and add it to `MAPS`; keep every placed object where a player can walk up to it. Like Chromaflage, everything travels through each player's own node at `rooms/ph-/players/`, because the shared rules expect `n, c, x, z, h, ts` there and refuse other paths for new prefixes: position and look (`y`, `p` aim pitch, `d` the type you've turned into), the last shot (`sh`, for tracers), running hit totals for the round (`hd`: `round|uid:hits,…|hits on real objects|session`, where the session is when that browser joined, so a reload starts the totals again) and, from the host, the round state as JSON in `rs` with host number `he`. The host (newest host number, else whoever has been in the room longest, and only once the room's players have loaded) runs the phases (`lobby`, `hide`, `hunt`, `end`, `over`) and works out health from the hit totals, checking them loosely (the shooter must be a living hunter, the target a living prop within 90 m, and no more hits than the rifle could fire); if it leaves, the next player carries on from the last round state it saw and counts the totals it can already see as done. Each browser reports its own hits, so it isn't cheat-proof. Anything read from another player's node is untrusted: a round state is rebuilt by `sanitizeRS` (only the fields the page uses, numbers clamped, player and prop ids checked; match settings kept in range by `cleanSet`), so a new field in the round state has to be added there too, and anything from a node that goes into the page as HTML must be escaped (`esc`) or turned into a number first. The round state goes out whole every time it changes (1-2 KB with 16 players) and during a hunt it changes with every hit, so the host coalesces hit-driven changes (health `hf`, eliminations `el`, finds `k`) to at most 4 publishes a second (`Net.rsDue`; a new phase or round goes straight away); the shape of `rs` is unchanged, so old and new hosts and guests mix freely. A tab in the background keeps its node fresh (and, if it's the host, the round moving) with a one-second timer; a player whose page stops altogether stops counting after 12 s but stays drawn where it was for up to a minute. Sounds a hiding prop makes go through `propSfx`, which keeps them from hunters in the waiting room. Pings are worked out on every screen from the hunt's start time (every 10–30 s, every 10 s in the last minute) and play from each prop's position. Points: 100 per prop found, 10 per 15 s survived, 150 for surviving the round and 50 to everyone on the winning team. Late joiners watch the hunters until the next round; players who are out watch their own team (← →, or tap Next). Practice: Hunt practice against prop bots that copy an object standing in a group and park beside its twins, and Hide practice against hunter bots that notice movement, things out of place and pings (and now and then shoot a real object). Settings, name and keys are saved only in the browser (`oddone-…` and `keybinds:odd-one-out`). Parties can launch it (its row in `GAMES` in `party.js`). On touch screens the page adds `touch` to `body`; the `body.touch` rules near the end of the stylesheet place the HUD for phones upright or sideways (the touch buttons keep their places in their grid by hiding with `visibility`, see `updateTouch`). A test hook (`window.__ph`, with `advance(seconds)` to run the game without drawing) exists only when `navigator.webdriver` is set. **Where players may stand:** the `kit` helpers tag what they build (`kind`: `floor`, `wall`, `fence`, `ceil`; everything else from `box` is furniture, `fix`), and `standRules` (run by `Builder.finish`) turns that into rules every map gets for free: each ceiling is an indoor area whose height limit is the top of its tallest furniture or object base plus 0.12 m (outdoors: 0.3 m under the lowest roof); tops of walls, fences and ceilings, anything above its area's limit, and other players are caps (`b.cap`): `groundAt` never stands you on one and `pushOut` slides you off it, as if it were a wall. You also can't stand where your head would be in the ceiling, ceilings only stop heads (they never push sideways), a long form can't straddle a thin wall (`spineHit`), movement is split into steps shorter than your radius (so a small prop on a slow laptop can't pass through a wall), and a form change (`tfCheck`, used by you and the bots) is refused ("No room to become that here") if it would move you through anything, up onto something higher, or out of bounds. **Out of bounds** (`oobAt`: off the map's floor, under it, on a cap, inside a wall, or more than 0.4 m above the height limit (`high`: a jump from the highest allowed spot is there for under half a second, so your own warning waits 0.6 s and other screens 1 s); the hunters' waiting room only counts for hunters while the props hide): on your own screen a one-line warning counts down from 3 and then puts you back where you last stood; everyone else draws (and can shoot) a player whose drawn position is out of bounds at the nearest walkable floor (`nearestAllowed`); and the host takes out anyone out of bounds for 5 s of a hunt, recording it in the round state's `ob` (kept by `sanitizeRS`) so the feed says "was out of bounds". Older pages ignore `ob` and show such an elimination as "Someone found …"; they don't warn their own player, but are drawn and timed out by newer pages like anyone else. Before these rules players got onto the Willow Lane roofs (up the shed's shelves, or onto a tall disguised player beside the house) and, as a small prop on high furniture next to an outside wall, up past the wall onto the roof (Willow Lane and Brightside Office). For whoever adds the next map, the reachability search used to check this asserts: from every spawn, walking, jumping (running, standing, straight up then over), jumping onto every object, fixture and other player (a tall helper with a low one beside it, on the floor and on furniture), changing form on the spot, beside walls and at the top of a jump, and walking into thin walls at 20 frames a second, no form reaches a wall, fence or ceiling top, a top above the height limit, anywhere off the floor, or another player's head; every raised spot a prop can stand on can be seen from somewhere a hunter can walk to; and 200 practice rounds with bots give no out-of-bounds warning. Landing also counts everything passed on the way down in a frame, so a fast fall at a low frame rate can't skip the floor, and a tab in the background sends its position once a second (so a hunter with a hidden tab isn't left "in the waiting room" when the hunt starts). **Graphics:** a custom tone curve (`CustomToneMapping`, patched into three's shader chunk: colours stay as painted and only the brightest part of each channel is eased off; a filmic curve was tried and greyed the cream walls and the sky) with a key light, fill and exposure per map, a sky dome with sun and clouds, light distance haze, glowing ceiling lights, skirting boards, door trims, soft darkening where walls meet floors and ceilings and under furniture, and a soft contact shadow under every object. The contact shadow is part of the object type (`t.blob`): real objects draw theirs in one instanced mesh per map and disguised players in another (`playerBlobs`, filled just before each render from where each player is drawn), with the same quad, material and matrix maths, so the two still can't be told apart (checked by rendering each type both ways at every quality level and comparing the pixels: like the objects themselves, which are drawn instanced for real ones and as plain meshes for players, they differ only by rounding, at most a few dozen edge pixels per type). Quality (`oddone-gfx`): Low (`fast`, as the old Fast: no shadow maps, sharpness up to 1.1, and none of the tone curve, sky dome, haze, light glow, darkening decals or contact shadows, `applyExtras`), Medium (`med`, everything with a 1024 shadow map, up to 1.35) and High (`high`, a soft 2048 shadow map, up to 1.75, as the old Pretty). Whatever is left out is left out for real objects and disguised players alike. With nothing saved, touch screens start on Low and computers on High, stepping down a level by themselves if the first 4 s of play run slower than about 30 frames a second. **The hunter** (`HG`, `hunterModel`) is a toy figure built in code from rounded boxes (`rbox`), spheres and cylinders: navy jumpsuit, hi-vis vest with two pale bands, pack with an aerial, helmet with an orange band, dark goggles, and a rifle with an orange tip. Its shapes are joined into one geometry per material (`joinGeos`), so a hunter is 16 meshes and about 2,900 triangles; the legs, the arms and the rifle are still separate parts because they swing, aim and kick back. It stands on the floor (the old figure hung 36 cm above it) and is still 1.87 m to the top of the helmet, with the muzzle where it was, so the camera, tracers and aim are unchanged; hunters are never shot at, so there is no hit box to keep in step. On Medium and High it has its own soft contact shadow (a child of the model, not in `playerBlobs`, which is only for disguised players). Nothing about the hunter touches the objects or the players disguised as them. **Shots:** on Medium and High the tracer has a soft glow, the muzzle a short cone of flame and a halo, and every shot leaves a quick pale ring where it lands; the ring is the same colour whatever was hit, so it tells nobody anything new (the sparks were already yellow on a disguised player and still are). Low keeps the plain line and dot. **Menu backdrop:** the camera looks slowly from side to side from a spot inside the chosen map (`menu` in `MAPS`: x, y, z, the way it faces and how far it turns) instead of circling above the roof; a new map needs a `menu` entry, or it falls back to the old circling view. **Turkey Week** (`../events.js`, November 15 to 26, 2026): five object types are drawn as Thanksgiving things, on the maps and as disguises alike (`TK_PROPS` in `tkProps`, used by `defProp`): beach ball as a pumpkin, the gift boxes as a pumpkin pie and a basket of apples, the wooden crate as a hay bale, the garden gnome as a turkey in a pilgrim hat. Each type's box, health and speed are still worked out from its usual parts, so players with the look on and off agree on everything but the picture. Object types are built once at page load, which is also when the game reads the one Turkey Week switch on the Back Room page (see `events.js` below); it has no button of its own. **Wardrobe (November 2026, captains only for now):** hunter outfits, hunter tools, prop taunts and catch poofs, all drawn and played in code by `wardrobe.js` beside the page. Nobody else can see it yet: `ODD_PUBLIC = false` and `wardOn()` asks `../captains.js` (`may(false, 'wardrobe', 'oddone-wardrobe')`), so it opens for the site's captains, or with `?wardrobe=1` on localhost or in an automated browser; to open it to everyone, change `ODD_PUBLIC` to `true`. For everyone else `wardrobe.js` is never fetched (the page asks for it only when `wardOn()` is true or another player arrives wearing something), `WD` stays `null` and the menu, saved data, node fields and draw calls are exactly as before. Captains get a Wardrobe button under their name on the menu and on the pause screen; every item is free and nothing is bought (the shop stays off). There are 14 outfits (Police Officer, Sheriff, Mall Cop, Security Guard, Detective, Store Manager, Janitor, Park Ranger, Exterminator, Construction Worker, Cowboy, Pirate, and the usual hunter with a Top Hat or a Traffic Cone in place of the helmet), 6 tools held in place of the rifle (Flashlight, Price Scanner, Flyswatter, Butterfly Net, Broom, Rubber Chicken), 8 taunts (Bike Horn, Squeaky Duck, Slide Whistle, Boing, Cuckoo, Kazoo, Doorbell, Party Blower) and 5 poofs (Cloud, Feather, Bubble, Star, Price Tag); their names and numbers are in `../cosmetics.js` under `odd-one-out`, and `wardrobe.js` keeps one list per slot in number order (never reorder: add at the end). What a captain wears is saved as `oddone-wear` (`[outfit, tool, taunt, poof]`) and travels in their own node as one short field, `cz`: `'outfit.tool.taunt.poof.count'`, checked strictly by `parse` (anything else is ignored, and a number this page doesn't know draws the usual hunter, rifle or burst); older pages ignore it. **Fairness:** outfits and tools are drawn only on hunters (`hunterModel(color, wear)`; a prop is still `propModel` and looks exactly like the real object whatever its player wears), they change no hit box, height, speed, camera, aim or reach (shots still come from the camera and tracers from the rifle's muzzle point), hats stay within 0.28 m of the head's centre line and tools within the rifle's own space below the line of sight (checked with rays through the crosshair at every pitch, aimed and not, on a laptop and an upright phone: none touches the hunter), every outfit keeps an orange hunter band on both arms and is no darker overall than the usual hunter, and the flashlight has a lit lens but no real light. An outfit hunter is 7 meshes (one vertex-coloured geometry each for the legs, body and arms, sharing one material, plus the tool, its accent and the contact shadow) instead of 16. **Taunts** didn't exist before, so they are strictly opt-in: nothing plays unless a captain prop with a taunt chosen presses T (only while T is bound to nothing else; the hint line shows it) or taps the Taunt button that appears beside Menu and Scores on a touch screen. It plays from the prop's position for everyone in range, like a ping, so it gives the prop away on purpose; hunters in the waiting room don't hear it (like every prop sound), and in Hide practice the hunter bots go after it as after a ping once the hunt is on. One every 10 s (`TAUNT_CD`), and other pages ignore a player's taunts closer together than 8 s (`TAUNT_GAP`); a taunt is the count in `cz` going up by one. **Poofs** play only when a prop is caught (`onElim`, in place of the usual confetti burst), chosen by the hunter who caught it, using the same small effect meshes as the burst. Pictures in the Wardrobe are rendered once with the game's own renderer into a small render target (no second WebGL context). A test hook: `__ph.WD` (the hooks, the item lists and `figShot`/`toolShot` for contact sheets) and `__ph.wdSync`. It has Spanish: its words, prop names and Wardrobe items are in `odd-one-out/es.js` (lang.js; map names and the signs inside the maps stay in English), with a Language switch in Settings and the pause menu; prop names are translated on each page when shown, never sent. -- `e63334287a3deaa3/tumble-trials/`: Tumble Trials (Back Room), a knockout party show for up to 16 players (Three.js, Firebase Realtime Database rooms under `rooms/ko-…`, same project and rules as Rumble Karts; Quick match uses `rooms/ko-pub-1` to `ko-pub-4`; invite links go through the home page as `#ko-`). Every show, online or solo, starts with at least 16 contestants (`FIELD`): bots take the places players leave, so a room of 3 plays with 13 bots and a solo show is you and 15 bots; the host's Players setting only caps how many people play. A show is two to four rounds and a final: races (the first few across the line qualify; falling in the slime puts you back at the last checkpoint), survivals (no respawns; whoever is still up when the clock runs out or when only the qualifying number are left goes through) and a final for the crown. Two rounds come before the final in a Short show, three in a Normal one, four in a Long one (one fewer below 10 contestants, which can no longer happen at the start). `planShow` makes the plan from the show's seed so that shows differ: the order of races and survivals (never three of a kind running, never all one kind, so a show can open with a survival), how sharply each round cuts the field (each round gets a random weight, so one show goes 16→13→8→5 and another 16→9→6→4), whether 4, 5 or 6 reach the final, and which rounds are used; rounds the show before used come last in the draw, so a show only repeats one when it has run out of fresh ones. A round always sends on the number it promised: if fewer made it (a race that ran out of time, or several falling in the same moment of a survival), the places left go to whoever got furthest in a race or was knocked out last in a survival, and never fewer than two go on. `nextRound` follows who actually came through; if players leaving means no more are left than the final was planned for, the show goes straight to the final rather than play a round that could knock nobody out. A show can only start with one contestant in practice. Levels are built in code by the `build` functions in `LEVELS` with the `B` helpers (boxes, cylinders and spheres that are both the mesh and the collider; the meshes are the hitboxes, so what you see is what hits you): 23 rounds, only ever added at the end so the number the host sends for a round never changes: Whirligig Way, Teeter Tide, Gatecrash Gauntlet, Springboard Skyway, Swingset Straits, Piston Parade, Roly-Poly Rise, Log Jam Lane, Sink or Skip, Belt Bedlam, Blowhard Bridge, Going Up (lifts up a tower, with blocks at the side as the quick way for a good jumper), Barrel Roll Row (bridges that are turning barrels) and Ferry Frenzy (ferries that shuttle between docks, and two that meet mid-river) are races; Whirlwind Dish, Gap Rush, Colour Call, Bowled Over and Roller Rink (a roller chases everyone round a ring, faster all the time; the view turns with you, `L.orbit`) are survivals; Honeycomb Havoc, Last Spin, High Tide Hill and Crown Dash are finals. Crown Dash is a final marked `dash`: it is played like a race (`mechOf`: checkpoints, respawns) and the first bean to touch the crown as it dips wins, or whoever got furthest if the clock runs out; on Whirlwind Dish and Last Spin the low beam (0.08 to 0.58 m up) has to be jumped, and the high beam's underside (`HIGH_BEAM_Y`, 1.95 m) is well above a standing bean (1.6 m), so you can stand, run or dive under it but not jump into it; the Warm-up Yard is the lobby and menu backdrop and the Crown Stage the podium. Every moving obstacle's position is a function of the round clock (seconds since GO, from the server time offset) and the round's seed, so all players see the same hammers and walls without sending them: a level calls `vary(seed)` to shift the clock of every moving piece it builds (`Lvl.to`), or adds its own shift where bots read the timing too (stones, fans, lifts, ferries), and the sweepers take a seeded start angle and direction, so a round is not the same twice. Who stands where on the start grid is shuffled from the same seed; the seesaws react to weight, so the host runs them and sends their angles. Each player writes only their own node `rooms/ko-/players/`, because the shared rules expect `n, c, x, z, h, ts` there and refuse other paths for new prefixes: position and motion (`y`, `m`), look (`lk`: face, pattern, pattern colour), `rd` ready, `k` the round the position belongs to, `fin`/`out` ("show:round:ms" when you cross the line or drop out), `tt` the honeycomb tiles you touched, `gr`/`fr` grabbing and breaking free. The host (newest host number `he`, else whoever has been in the room longest, chosen only after the room has loaded) publishes the show as JSON in its own `rs` (phase, plan, roster, who qualified and who is out, in order; it goes out whole every time, so changes within a round are coalesced to at most 4 publishes a second, `Net.pubRS`/`flushRS`, while a new phase or round goes straight away; the shape of `rs` is unchanged), its bots in `bt`, seesaw angles in `sw`, and every touched tile in its `tt`; a tile vanishes a fixed delay after the earliest touch anyone reported. Guests treat the host's `rs` as untrusted: `sanitizeRS` rebuilds it field by field (known phases and levels, finite clamped numbers, ids of a safe shape, lists capped at 32, at most 24,000 characters) and drops it if anything doesn't fit, and names and colours from other players are escaped or validated before they reach the page. Guests also run the show on the host's clock (they measure the gap from the `ts` the host writes), and every browser rewrites its `ts` once a second even from a background tab, so a host who switches tabs isn't taken for gone. The host's browser runs the bots and decides qualification from the reports, so it isn't cheat-proof; if the host leaves, the next player carries on from the last show state and takes over the bots from where they were last seen (same traits, speed and checkpoint); a host that goes quiet without leaving is passed over after 4 s (`HOST_QUIET_MS`). `set.bots` is still sent (always 1) because pages from before the bots became permanent read it. A private room starts when everyone in it is ready (one player alone counts) or the host presses Start show; a public lobby starts 20 s after a second player arrives, or after 30 s with one. The physics is the game's own: a fixed 60 Hz step, a capsule of three spheres pushed out of boxes, cylinders and spheres, platforms that carry you, and knockback from the speed of whatever hit you. Bots follow each race's `path` of nodes and wait at `safe` nodes until the obstacles ahead will miss them; the same brain is the test autopilot. Node options a level can use: `w` width, `alt` side-by-side lanes a bot picks between, `xs` bounce pads (the node only counts once the pad has thrown the bot up), `safe` with `len` (how much of the way ahead has to be clear), `wait` (a test of the clock), `on` with `board` (a spot on a lift or ferry, walked to only while it can be boarded), `comp` (lean against a belt or a turning barrel), `near` (must be reached, not just passed). A bot that stops getting nearer its node hops, tries another line, backs off up the course and across, then goes back a node (`unstick`), and one whose jump will land short dives. No two bots are alike: skill comes with the roster, and nerve (how tight a gap it runs, how long it waits), pace and lane choice come from the show id and the bot's id, with a good or bad round from the round number (`botTraits`), so whoever takes the bots over works out the same ones. Keys are rebindable through `keybinds.js` (saved as `keybinds:tumble-trials`). On computers, clicking the game captures the mouse (Pointer Lock) and moving it turns the camera with no button held; a "Click to look" hint shows while it isn't captured, and the click that captures it doesn't also grab. Esc, the pause menu, the main menu, results and podium cards and the Controls panel let go of it (Esc in the online lobby only frees the mouse for the lobby panel; a second Esc opens the menu). A refused capture (Chrome refuses one within about a second of Esc) is only counted: after three in a row the hint goes and drag-to-look carries on, but every click still tries again. A two-finger trackpad scroll (or mouse wheel) also turns and tilts the camera; a pinch is swallowed so the page doesn't zoom. Sensitivity (Settings and the pause menu) scales mouse, scroll and touch look and is saved as `tumble-sens`, clamped to 0.2–3 (anything unreadable loads as 1). The camera comes in at once when a wall is between it and the bean and eases back out; static walls are found with a ray, and moving ones only if marked `camBlock` (Gap Rush's walls). In a race the count pill also says where you are running (`myPlace`), the intro card lists the show's running order, and being knocked out says where you finished. On touch screens the page adds `touch` to `body`: a stick, Jump, Dive and Grab buttons and drag-to-look, hidden while you watch or read a results card (`noctl`, `cardup`). Name, look, settings, best practice times and stats (shows, crowns, rounds qualified) are saved in the browser under `tumble-…`; nothing is stored online between shows. Parties can launch it (its row in `GAMES` in `party.js`). A test hook (`window.__ko`, with `advance(seconds)`) exists only when `navigator.webdriver` is set. **Closet (November 2026, hidden: captains only for now):** extra looks worn on top of the look everyone already has: 10 colours, 6 premium colours (gold, chrome, glow in the dark, see-through jelly, a slow rainbow shift, bubblegum with sprinkles), 9 patterns, 9 pairs of underpants (painted over the lower body as a clean, silly joke; the last pair is worn on the head instead), 14 hats, 6 face extras, 12 costumes, 6 victory dances (danced instead of the cheer when you qualify from a race or win the crown), 6 fall screams made with Web Audio (heard as a bean drops towards the slime, quieter far away) and 5 knockout splashes (as well as the slime splash). `CLOSET_PUBLIC = false` and `closetOn()` near the top of the script (which asks `../captains.js`, with `?closet=1` as the test switch) decide whether a Closet button shows under the look on the menu card; for everyone else the menu, saved data, node fields and draw calls are as before. Everything is drawn by `closet.js` beside the page, fetched only when this player may open the Closet or a player in the room wears a kit; until then `CL` is null and every hook does what it always did. A kit is ten item numbers (the `no` of Tumble Trials' items in `../cosmetics.js`: colour, premium colour, pattern, underpants, hat, face, costume, dance, scream, splash), saved as `tumble-kit` and sent in the player's own node as `ck` (`'3.0.5.0.12.0.0.2.1.0'`, written only while one is worn; `kitOf` checks it strictly, a number `closet.js` doesn't know draws nothing, and older pages ignore the field); bots never wear one. Looks only: colours, patterns, underpants, face extras and a costume's paint go on the bean's existing skin canvas; a hat, the head undies or a costume's shape is one merged mesh per item shared by every bean (one more draw call, and it hides the Turkey Week hat, so none more while that is on; the propeller beanie, the fishbowl and the astronaut's bubble add one more); a premium colour gives the bean its own material, and the rainbow repaints its skin five times a second. The collider, size, speed and name tag are untouched: a costume is drawn around the same body and the face always shows. The Closet hides the menu and stands your bean in the yard beside its panel (below it when the screen is upright); drag to turn it, and choosing a dance, scream or splash plays it. The test hook adds `CL`, `closetOn`, `closetLoad`, `kitOf`, `kitStr` and `myKitNow`. **Turkey Week** (`../events.js`, November 15 to 26, 2026): every bean wears a pilgrim hat (hidden under the winner's crown): one shared hat geometry and material from `events.js` (`tkHat`), one extra draw call each. The game reads the one Turkey Week switch on the Back Room page (see `events.js` below) once, when it loads (off means no hats are made); it has no button of its own. **Spanish:** it loads `../lang.js` and its own words (and the Closet's) in `tumble-trials/es.js`; round and bot names stay English, the show's calls, round descriptions, lobby and results are translated. Text drawn or built in code uses `TRN()` (`TX` is the textures here); the results stamp shows `data-stamp-label` (the stamp's translation) while `data-stamp` keeps the English value the CSS keys on. Nothing translated is sent to the room. EN | ES switch in Settings and the pause card. +- `e63334287a3deaa3/tumble-trials/`: Tumble Trials (Back Room), a knockout party show for up to 16 players (Three.js, Firebase Realtime Database rooms under `rooms/ko-…`, same project and rules as Rumble Karts; Quick match uses `rooms/ko-pub-1` to `ko-pub-4`; invite links go through the home page as `#ko-`). Every show, online or solo, starts with at least 16 contestants (`FIELD`): bots take the places players leave, so a room of 3 plays with 13 bots and a solo show is you and 15 bots; the host's Players setting only caps how many people play. A show is two to four rounds and a final: races (the first few across the line qualify; falling in the slime puts you back at the last checkpoint), survivals (no respawns; whoever is still up when the clock runs out or when only the qualifying number are left goes through) and a final for the crown. Two rounds come before the final in a Short show, three in a Normal one, four in a Long one (one fewer below 10 contestants, which can no longer happen at the start). `planShow` makes the plan from the show's seed so that shows differ: the order of races and survivals (never three of a kind running, never all one kind, so a show can open with a survival), how sharply each round cuts the field (each round gets a random weight, so one show goes 16→13→8→5 and another 16→9→6→4), whether 4, 5 or 6 reach the final, and which rounds are used; rounds the show before used come last in the draw, so a show only repeats one when it has run out of fresh ones. A round always sends on the number it promised: if fewer made it (a race that ran out of time, or several falling in the same moment of a survival), the places left go to whoever got furthest in a race or was knocked out last in a survival, and never fewer than two go on. `nextRound` follows who actually came through; if players leaving means no more are left than the final was planned for, the show goes straight to the final rather than play a round that could knock nobody out. A show can only start with one contestant in practice. Levels are built in code by the `build` functions in `LEVELS` with the `B` helpers (boxes, cylinders and spheres that are both the mesh and the collider; the meshes are the hitboxes, so what you see is what hits you): 23 rounds, only ever added at the end so the number the host sends for a round never changes: Whirligig Way, Teeter Tide, Gatecrash Gauntlet, Springboard Skyway, Swingset Straits, Piston Parade, Roly-Poly Rise, Log Jam Lane, Sink or Skip, Belt Bedlam, Blowhard Bridge, Going Up (lifts up a tower, with blocks at the side as the quick way for a good jumper), Barrel Roll Row (bridges that are turning barrels) and Ferry Frenzy (ferries that shuttle between docks, and two that meet mid-river) are races; Whirlwind Dish, Gap Rush, Colour Call, Bowled Over and Roller Rink (a roller chases everyone round a ring, faster all the time; the view turns with you, `L.orbit`) are survivals; Honeycomb Havoc, Last Spin, High Tide Hill and Crown Dash are finals. Crown Dash is a final marked `dash`: it is played like a race (`mechOf`: checkpoints, respawns) and the first bean to touch the crown as it dips wins, or whoever got furthest if the clock runs out; on Whirlwind Dish and Last Spin the low beam (0.08 to 0.58 m up) has to be jumped, and the high beam's underside (`HIGH_BEAM_Y`, 1.95 m) is well above a standing bean (1.6 m), so you can stand, run or dive under it but not jump into it; the Warm-up Yard is the lobby and menu backdrop and the Crown Stage the podium. Every moving obstacle's position is a function of the round clock (seconds since GO, from the server time offset) and the round's seed, so all players see the same hammers and walls without sending them: a level calls `vary(seed)` to shift the clock of every moving piece it builds (`Lvl.to`), or adds its own shift where bots read the timing too (stones, fans, lifts, ferries), and the sweepers take a seeded start angle and direction, so a round is not the same twice. Who stands where on the start grid is shuffled from the same seed; the seesaws react to weight, so the host runs them and sends their angles. Each player writes only their own node `rooms/ko-/players/`, because the shared rules expect `n, c, x, z, h, ts` there and refuse other paths for new prefixes: position and motion (`y`, `m`), look (`lk`: face, pattern, pattern colour), `rd` ready, `k` the round the position belongs to, `fin`/`out` ("show:round:ms" when you cross the line or drop out), `tt` the honeycomb tiles you touched, `gr`/`fr` grabbing and breaking free. The host (newest host number `he`, else whoever has been in the room longest, chosen only after the room has loaded) publishes the show as JSON in its own `rs` (phase, plan, roster, who qualified and who is out, in order; it goes out whole every time, so changes within a round are coalesced to at most 4 publishes a second, `Net.pubRS`/`flushRS`, while a new phase or round goes straight away; the shape of `rs` is unchanged), its bots in `bt`, seesaw angles in `sw`, and every touched tile in its `tt`; a tile vanishes a fixed delay after the earliest touch anyone reported. Guests treat the host's `rs` as untrusted: `sanitizeRS` rebuilds it field by field (known phases and levels, finite clamped numbers, ids of a safe shape, lists capped at 32, at most 24,000 characters) and drops it if anything doesn't fit, and names and colours from other players are escaped or validated before they reach the page. Guests also run the show on the host's clock (they measure the gap from the `ts` the host writes), and every browser rewrites its `ts` once a second even from a background tab, so a host who switches tabs isn't taken for gone. The host's browser runs the bots and decides qualification from the reports, so it isn't cheat-proof; if the host leaves, the next player carries on from the last show state and takes over the bots from where they were last seen (same traits, speed and checkpoint); a host that goes quiet without leaving is passed over after 4 s (`HOST_QUIET_MS`). `set.bots` is still sent (always 1) because pages from before the bots became permanent read it. A private room starts when everyone in it is ready (one player alone counts) or the host presses Start show; a public lobby starts 20 s after a second player arrives, or after 30 s with one. The physics is the game's own: a fixed 60 Hz step, a capsule of three spheres pushed out of boxes, cylinders and spheres, platforms that carry you, and knockback from the speed of whatever hit you. Bots follow each race's `path` of nodes and wait at `safe` nodes until the obstacles ahead will miss them; the same brain is the test autopilot. Node options a level can use: `w` width, `alt` side-by-side lanes a bot picks between, `xs` bounce pads (the node only counts once the pad has thrown the bot up), `safe` with `len` (how much of the way ahead has to be clear), `wait` (a test of the clock), `on` with `board` (a spot on a lift or ferry, walked to only while it can be boarded), `comp` (lean against a belt or a turning barrel), `near` (must be reached, not just passed). A bot that stops getting nearer its node hops, tries another line, backs off up the course and across, then goes back a node (`unstick`), and one whose jump will land short dives. No two bots are alike: skill comes with the roster, and nerve (how tight a gap it runs, how long it waits), pace and lane choice come from the show id and the bot's id, with a good or bad round from the round number (`botTraits`), so whoever takes the bots over works out the same ones. Keys are rebindable through `keybinds.js` (saved as `keybinds:tumble-trials`). On computers, clicking the game captures the mouse (Pointer Lock) and moving it turns the camera with no button held; a "Click to look" hint shows while it isn't captured, and the click that captures it doesn't also grab. Esc, the pause menu, the main menu, results and podium cards and the Controls panel let go of it (Esc in the online lobby only frees the mouse for the lobby panel; a second Esc opens the menu). A refused capture (Chrome refuses one within about a second of Esc) is only counted: after three in a row the hint goes and drag-to-look carries on, but every click still tries again. A two-finger trackpad scroll (or mouse wheel) also turns and tilts the camera; a pinch is swallowed so the page doesn't zoom. Sensitivity (Settings and the pause menu) scales mouse, scroll and touch look and is saved as `tumble-sens`, clamped to 0.2–3 (anything unreadable loads as 1). The camera comes in at once when a wall is between it and the bean and eases back out; static walls are found with a ray, and moving ones only if marked `camBlock` (Gap Rush's walls). In a race the count pill also says where you are running (`myPlace`), the intro card lists the show's running order, and being knocked out says where you finished. On touch screens the page adds `touch` to `body`: a stick, Jump, Dive and Grab buttons and drag-to-look, hidden while you watch or read a results card (`noctl`, `cardup`). Name, look, settings, best practice times and stats (shows, crowns, rounds qualified) are saved in the browser under `tumble-…`; nothing is stored online between shows. Parties can launch it (its row in `GAMES` in `party.js`). A test hook (`window.__ko`, with `advance(seconds)`) exists only when `navigator.webdriver` is set. **Closet (November 2026, hidden: captains only for now):** extra looks worn on top of the look everyone already has: 10 colours, 6 premium colours (gold, chrome, glow in the dark, see-through jelly, a slow rainbow shift, bubblegum with sprinkles), 9 patterns, 9 pairs of underpants (painted over the lower body as a clean, silly joke; the last pair is worn on the head instead), 19 hats, 9 face extras (an eye patch, dark shades and sports eye black among them), 43 costumes (the November 2026 wave added sports kits, pirates with eye patches, suits and mob-boss costume-party looks, robots, a wizard and a firefighter; a costume may be paint only, so a hat can be worn with it, and may paint over the face), 10 victory dances (danced instead of the cheer when you qualify from a race or win the crown), 6 fall screams made with Web Audio (heard as a bean drops towards the slime, quieter far away) and 5 knockout splashes (as well as the slime splash). `CLOSET_PUBLIC = false` and `closetOn()` near the top of the script (which asks `../captains.js`, with `?closet=1` as the test switch) decide whether a Closet button shows under the look on the menu card; for everyone else the menu, saved data, node fields and draw calls are as before. Everything is drawn by `closet.js` beside the page, fetched only when this player may open the Closet or a player in the room wears a kit; until then `CL` is null and every hook does what it always did. A kit is ten item numbers (the `no` of Tumble Trials' items in `../cosmetics.js`: colour, premium colour, pattern, underpants, hat, face, costume, dance, scream, splash), saved as `tumble-kit` and sent in the player's own node as `ck` (`'3.0.5.0.12.0.0.2.1.0'`, written only while one is worn; `kitOf` checks it strictly, a number `closet.js` doesn't know draws nothing, and older pages ignore the field); bots never wear one. Looks only: colours, patterns, underpants, face extras and a costume's paint go on the bean's existing skin canvas; a hat, the head undies or a costume's shape is one merged mesh per item shared by every bean (one more draw call, and it hides the Turkey Week hat, so none more while that is on; the propeller beanie, the fishbowl and the astronaut's bubble add one more); a premium colour gives the bean its own material, and the rainbow repaints its skin five times a second. The collider, size, speed and name tag are untouched: a costume is drawn around the same body and the face always shows. The Closet hides the menu and stands your bean in the yard beside its panel (below it when the screen is upright); drag to turn it, and choosing a dance, scream or splash plays it. The test hook adds `CL`, `closetOn`, `closetLoad`, `kitOf`, `kitStr` and `myKitNow`. **Turkey Week** (`../events.js`, November 15 to 26, 2026): every bean wears a pilgrim hat (hidden under the winner's crown): one shared hat geometry and material from `events.js` (`tkHat`), one extra draw call each. The game reads the one Turkey Week switch on the Back Room page (see `events.js` below) once, when it loads (off means no hats are made); it has no button of its own. **Spanish:** it loads `../lang.js` and its own words (and the Closet's) in `tumble-trials/es.js`; round and bot names stay English, the show's calls, round descriptions, lobby and results are translated. Text drawn or built in code uses `TRN()` (`TX` is the textures here); the results stamp shows `data-stamp-label` (the stamp's translation) while `data-stamp` keeps the English value the CSS keys on. Nothing translated is sent to the room. EN | ES switch in Settings and the pause card. - `e63334287a3deaa3/deepword/`: Deepword (Back Room), a daily "rarest answer" word game with a multiplayer mode, Blowfish Brawl (one canvas for the ocean, no libraries; Firebase Realtime Database, same project and rules as Rumble Karts, prefix `dw`; invite links go through the home page as `#dw-`; Quick match uses `rooms/dw-pub-1` to `dw-pub-4`; in the Parties list as `{ k: 'dw', … max: 12 }`, since `party.js` lists its own games). **Prompt bank:** `prompts.js` sets `window.DW_BANK`: `lists` (named answer lists, one string each: answers separated by `;`, spellings of one answer by `|`, and a commonness weight 1–5 after `:`, 5 being what most people say), `prompts` (`[category, question, list name or an inline list, optional filter]`, 866 of them, each with 20 or more hand-written answers; categories `geo`, `animals`, `food`, `words`, `pop`, `science`, `sports`, `life`), `words` (about 39,800 plain English words in five commonness tiers, built from the public-domain 12dicts and ENABLE word lists and ranked by how often each word appears in books and Wikipedia; the credits are in the comment at the top of the file, the list behind `'@words'` letter prompts), `labels` (lists the Brawl may turn into "

function nameOf(uid){if(uid===Net.uid)return myName||'You';const o=Net.others.get(uid);return o?o.n:'Climber'} function onNode(uid,v){ if(!v||typeof v!=='object')return; - const o={n:cleanName(v.n)||'Climber',c:/^#[0-9a-f]{6}$/i.test(v.c)?v.c:'#ff5e6c',j:+v.j||+v.ts||0,ts:Math.min(+v.ts||0,Net.now()+5000),rs:typeof v.rs==='string'?v.rs:'',he:Math.min(Math.max(+v.he||0,0),1e9),f:typeof v.f==='string'?v.f:'',r:+v.r||0,k:HAT_SET.has(v.k)?v.k:''}; + const o={n:cleanName(v.n)||'Climber',c:/^#[0-9a-f]{6}$/i.test(v.c)?v.c:'#ff5e6c',j:+v.j||+v.ts||0,ts:Math.min(+v.ts||0,Net.now()+5000),rs:typeof v.rs==='string'?v.rs:'',he:Math.min(Math.max(+v.he||0,0),1e9),f:typeof v.f==='string'?v.f:'',r:+v.r||0,k:HAT_SET.has(v.k)?v.k:'',wk:typeof v.wk==='string'&&/^\d{1,3}(\.\d{1,3}){0,3}$/.test(v.wk)?v.wk:''}; const was=Net.others.get(uid);Net.others.set(uid,o); if(o.rs&&o.he>G.maxHe)G.maxHe=o.he; let e=ents.get(uid); @@ -2629,6 +2630,7 @@

You made it!

e.seen=performance.now(); if(e.name!==o.n||e.color!==o.c){e.name=o.n;e.color=o.c;e.av.setColor(o.c)} if(e.hat!==o.k){e.hat=o.k;e.av.setHat(o.k)} + if(e.wk!==o.wk){e.wk=o.wk;if(o.wk&&!WR)wrLoad();else wrDressEnt(e)} // a Wardrobe kit (wardrobe.js): fetched only when someone wears one if(isFinite(+v.x)&&isFinite(+v.z))e.tpos.set(clamp(+v.x,-400,400),clamp(+v.y||0,-50,2000),clamp(+v.z,-2000,400)); e.tyaw=+v.h||0;e.a=clamp(v.a|0,0,5);e.r=o.r; // keep a short history to draw them from (netsmooth.js); a jump of more than 6 m is a respawn or checkpoint, so start afresh there. @@ -2694,7 +2696,7 @@

You made it!

} // others reaching the top if(G.finSeenRound!==rs.id){G.finSeenRound=rs.id;G.finSeen=rs.fin.length} - for(let k=G.finSeen;k'+esc(f[2]||'Someone')+' reached the top · '+(k+1)+ordinal(k+1));sfx('cp');const e=ents.get(f[0]);if(e)confetti(e.pos.x,e.pos.y+1.5,e.pos.z,90)}if(k===0&&f[0]!==Net.uid)banner('Clock at double speed!',(f[2]||'Someone')+' made it to the top',2.2)} + for(let k=G.finSeen;k'+esc(f[2]||'Someone')+' reached the top · '+(k+1)+ordinal(k+1));sfx('cp');const e=ents.get(f[0]);if(e)cheerFx(e.pos.x,e.pos.y+1.5,e.pos.z,90,WR&&WR.kitOf(e.wk),e.color)}if(k===0&&f[0]!==Net.uid)banner('Clock at double speed!',(f[2]||'Someone')+' made it to the top',2.2)} G.finSeen=rs.fin.length; if(rs.ph==='inter'&&G.shownInter!==rs.id){G.shownInter=rs.id;showOnlineResults()} const i=rs.fin.findIndex(f=>f[0]===Net.uid); @@ -3204,16 +3206,53 @@

You made it!

if(inv){$('room').value=inv[1];showRoom(true);setMsg('You were invited to room tw-'+inv[1]+'. Press Join.');$('joinRoom').classList.remove('alt');$('joinRoom').classList.add('coral')} if(touchUI)setTouchUI(true); +// ---------- the Wardrobe (captains only for now; README, "Spire") ---------- +// Outfits (drawn by ../outfits.js, shared with Turbo Trail and Escapade) and celebrations, in wardrobe.js beside this +// page. wardrobeOn() says whether this player may open it: WARDROBE_PUBLIC (the one line that opens it to everyone), one +// of the site's captains (../captains.js), or ?wardrobe=1 on localhost or in an automated browser (remembered for the +// tab; ?wardrobe=0 forgets it). The files are fetched only when it is true, or when a climber in the room wears a kit +// (then only outfits.js and wardrobe.js, to draw them); until then WR is null and every climber looks as before. +// Saved as spire:wardrobe; online as `wk` in this player's node, only while worn. +const WARDROBE_PUBLIC=false; +const CAPTAINS=window.BackRoomCaptains||null; +const wardrobeOn=()=>WARDROBE_PUBLIC||!!(CAPTAINS&&CAPTAINS.may(false,'wardrobe','spire-wardrobe')); +let WR=null,wrAsked=false; +const myKit=()=>WR&&wardrobeOn()?WR.mine():null; +function myKitStr(){return WR?WR.kitStr(myKit()):''} +function wrDressMe(){if(WR&&G.av)WR.dress(G.av,myKit(),myColor)} +function wrDressEnt(e){if(WR&&e.av)WR.dress(e.av,WR.kitOf(e.wk),e.color)} +function cheerFx(x,y,z,n,kit,col){if(!(WR&&kit&&WR.cheer(kit,x,y,z,n,col)))confetti(x,y,z,n)} +function wrApi(){return{THREE,store,emit,FXS,FXG,hiQ,glowBurst,get color(){return myColor},get me(){return me}, + changed(){wrDressMe();wrSend()}}} +function wrSend(){if(!WR||!Net.refs)return;const s=myKitStr();if(s||Net.wkSent){Net.wkSent=!!s;Net.upd({wk:s||null})}} +let cosAsked=false; +const wrAdd=src=>new Promise((res,rej)=>{const e=document.createElement('script');e.src=src;e.onload=res;e.onerror=rej;document.head.appendChild(e)}); +function wrLoad(){ + // the names (../cosmetics.js) only for a player who may open the Wardrobe + if(wardrobeOn()&&!window.BackRoomCosmetics&&!cosAsked){cosAsked=true;wrAdd('../cosmetics.js').then(wrSync).catch(e=>{cosAsked=false;console.error(e)})} + if(wrAsked)return;wrAsked=true; + (window.BlockFits?Promise.resolve():wrAdd('../outfits.js')).then(()=>wrAdd('wardrobe.js')).then(()=>{ + if(!window.SpireWardrobe||!window.BlockFits)throw new Error('wardrobe did not load'); + WR=window.SpireWardrobe(wrApi());wrSync(); + }).catch(e=>{wrAsked=false;console.error(e)}); +} +function wrSync(){ + if(wardrobeOn())wrLoad(); + if(!WR)return; + WR.menu(wardrobeOn());wrDressMe();ents.forEach(wrDressEnt);wrSend(); +} +if(CAPTAINS)CAPTAINS.onChange(wrSync); + // Test hook (automated browsers only): step the simulation without waiting for frames, check modules, drive the climber. if(navigator.webdriver)window.__tw={G,PHYS,MODS,WORLDS,OBBY_STAGES,get me(){return me},ents,Net,onNode,KB,keys,tAct,tMove, advance(s){G.noRender=true;try{const n=Math.round(s/PHYS.DT);for(let i=0;i=G.respawnAt)respawnMe(true)}if(G.mode!=='online')G.tBase=performance.now()/1000-G.t}finally{G.noRender=false}}, respawnNow(){if(G.respawnAt)respawnMe()}, verifyModule,runBot,buildTower,wearHat,renderHats,get coins(){return coins},buildObby,buildSingle,towerPlan,makeBot,startSolo,startObby,startPractice,toMenu,goOnline,setRS,newRound,hostTick,remaining,showPause,resume, - setView,toggleView,fpOn,startSpectate,aimOn,guideMesh, + setView,toggleView,fpOn,startSpectate,aimOn,guideMesh,get WR(){return WR},wardrobeOn,wrSync,wrLoad, autopilot(on,from){G.auto=on?makeBot(G.W.route):null;if(G.auto&&from)G.auto.i=from}, get camDist(){return camera.position.distanceTo(camT)}, // stand-in climbers for screenshots: [{x,y,z,yaw,c,n,a}] - decoys(list){(G.decoys||[]).forEach(d=>{d.av.dispose();d.tag.remove()});G.decoys=list.map(q=>{const av=makeAvatar(q.c,q.k);av.root.position.set(q.x,q.y,q.z);av.root.rotation.y=q.yaw||0;for(let i=0;i<30;i++)animate(av,q.a||0,q.a===1?7:0,1/30);placeBlob(av,q.x,q.y,q.z,G.t);const tag=document.createElement('div');tag.innerHTML=''+esc(q.n);$('tags').appendChild(tag);return{av,tag,q}})},camRay,renderer,scene,camera,render(){renderer.render(scene,camera)}, + decoys(list){(G.decoys||[]).forEach(d=>{d.av.dispose();d.tag.remove()});G.decoys=list.map(q=>{const av=makeAvatar(q.c,q.k);if(WR&&q.wk)WR.dress(av,WR.kitOf(q.wk),q.c);av.root.position.set(q.x,q.y,q.z);av.root.rotation.y=q.yaw||0;for(let i=0;i<30;i++)animate(av,q.a||0,q.a===1?7:0,1/30);placeBlob(av,q.x,q.y,q.z,G.t);const tag=document.createElement('div');tag.innerHTML=''+esc(q.n);$('tags').appendChild(tag);return{av,tag,q}})},camRay,renderer,scene,camera,render(){renderer.render(scene,camera)}, // settle the camera and render once, without moving the simulation on frame(n){G.freeze=true;try{n=n||1;for(let i=0;iYou made it!

renderSwatches();renderHats();renderCpSeg();renderProfile();renderGfx();renderGuide();renderView();applyQuality(); // signs are drawn with the display font: redraw the menu tower once it has loaded try{document.fonts.ready.then(()=>{if(G.mode==='menu'&&G.W)loadWorld(G.W)})}catch(e){} -setupAttract();showAd('adMenu'); +setupAttract();showAd('adMenu');wrSync(); requestAnimationFrame(t=>{last=t;frame(t)}); })(); diff --git a/e63334287a3deaa3/spire/wardrobe.js b/e63334287a3deaa3/spire/wardrobe.js new file mode 100644 index 00000000..0c5dccd1 --- /dev/null +++ b/e63334287a3deaa3/spire/wardrobe.js @@ -0,0 +1,129 @@ +/* + * Spire: the Wardrobe (captains only for now; README, "Spire"). + * + * index.html fetches this file (with ../outfits.js, which draws the outfits) only when it is needed: this player may + * open the Wardrobe (WARDROBE_PUBLIC, one of the site's captains, or ?wardrobe=1 on localhost or in an automated + * browser), or a climber in the room wears something from it. ../cosmetics.js (the names) is fetched only for a player + * who may open it. The page calls window.SpireWardrobe(X) once with what it lends (wrApi() in index.html) and gets back + * the hooks it calls: dress() when a climber is made or changes, cheer() for the confetti, menu() to show or hide the + * Wardrobe button, and kitOf()/kitStr() for the room. + * + * A kit is two item numbers, the `no` of Spire's items in ../cosmetics.js: an outfit (1 to 33, drawn by ../outfits.js + * in the climber's own colour) and a celebration (1 to 4: the confetti at checkpoint landings and at the top). 0 is + * none. Saved in this browser as spire:wardrobe {o, c}. Online it is one optional field in the player's own node, + * `wk`: "o.c" (e.g. "21.3"), sent only while this player may open the Wardrobe and wears something; older pages ignore + * it, and a number this page doesn't know draws the plain climber or the usual confetti. An outfit with its own headgear + * hides your hat while it is worn (the hat is still yours, and still sent as `k`). Looks only: the climber's collision + * is the physics' upright cylinder and never looks at the body. + */ +(function () { +'use strict'; +const TX = window.BackRoomLang ? BackRoomLang.t : s => s; +window.SpireWardrobe = function (X) { +const { THREE, store, emit, FXS, FXG, hiQ, glowBurst } = X; +const BF = window.BlockFits(THREE); +const cos = () => window.BackRoomCosmetics || null; // the names: fetched only for a player who may open the Wardrobe +const GAME = 'spire', TAU = Math.PI * 2; +const items = slot => cos() ? cos().gameItems(GAME, slot) : []; +const CHEERS = 4; +const okO = n => Number.isInteger(n) && n > 0 && BF.has(n), okC = n => Number.isInteger(n) && n > 0 && n <= CHEERS; + +// ---------------------------------------------------------------- the kit +function kitOf(s) { + if (typeof s !== 'string' || !/^\d{1,3}(\.\d{1,3}){0,3}$/.test(s)) return null; + const p = s.split('.').map(Number), k = { o: okO(p[0]) ? p[0] : 0, c: okC(p[1]) ? p[1] : 0 }; + return k.o || k.c ? k : null; +} +const kitStr = k => k && (k.o || k.c) ? k.o + '.' + k.c : ''; +let look = (() => { const v = store.get('wardrobe', null); return v && typeof v === 'object' ? { o: okO(v.o) ? v.o : 0, c: okC(v.c) ? v.c : 0 } : { o: 0, c: 0 }; })(); +const save = () => store.set('wardrobe', { o: look.o, c: look.c }); + +// ---------------------------------------------------------------- dressing a climber +// Puts the outfit on (or takes it off) and hides the hat under an outfit with its own headgear. The page's setColor +// and setHat are wrapped once, so a new colour re-dresses the kit and a new hat stays hidden under headgear. +function hatVis(av) { if (av.hat) av.hat.visible = !(av.__wr && av.__wr.o && BF.hidesHat(av.__wr.o)); } +function dress(av, kit, color) { + if (!av) return; + const o = kit && okO(kit.o) ? kit.o : 0; + av.__wr = { o, c: kit && okC(kit.c) ? kit.c : 0 }; + if (!av.__wrWrapped) { + av.__wrWrapped = true; + const sc = av.setColor, sh = av.setHat; + av.setColor = function (c) { sc.call(av, c); if (av.__wr && av.__wr.o) BF.dress(av, av.__wr.o, c); }; + av.setHat = function (id, f) { sh.call(av, id, f); hatVis(av); }; + } + BF.dress(av, o, color || av.color, { layer: av.layer }); + hatVis(av); +} + +// ---------------------------------------------------------------- celebrations (the page's own particles) +const _c = new THREE.Color(); +function mix(a, b, t) { return '#' + new THREE.Color(a).lerp(new THREE.Color(b), t).getHexString(); } +function conf(x, y, z, n, pal) { + if (!hiQ()) n = Math.ceil(n * .6); + for (let i = 0; i < n; i++) { const a = Math.random() * TAU, s = 1.5 + Math.random() * 4.5; _c.set(pal[i % pal.length]); emit(FXS, x, y, z, Math.cos(a) * s, 6 + Math.random() * 7, Math.sin(a) * s, 2.4 + Math.random() * 1.4, .3, .3, _c, 1, 9, 1.5, 1); } +} +function ring(x, y, z, col, n, spd, rise) { _c.set(col); for (let i = 0; i < n; i++) { const a = i / n * TAU; emit(FXG, x + Math.cos(a) * .4, y, z + Math.sin(a) * .4, Math.cos(a) * spd, rise || 0, Math.sin(a) * spd, .7, .36, .06, _c, .95, 0, 2.6, 0); } } +// cheer(kit, x, y, z, n, colour): this kit's celebration instead of the usual confetti; false when it has none +function cheer(kit, x, y, z, n, color) { + const c = kit && okC(kit.c) ? kit.c : 0; if (!c) return false; + const big = Math.min(1.6, n / 100 + .4); + if (c === 1) { const T = color || '#ff5e6c'; conf(x, y, z, n, [T, mix(T, '#ffffff', .55), mix(T, '#000000', .35), '#ffffff']); glowBurst(x, y, z, T, 20, 7, 3); } + else if (c === 2) { conf(x, y, z, n, ['#ffd23f', '#ffe98a', '#e8343c', '#2fd39a', '#ffd23f', '#4c8dff']); glowBurst(x, y, z, '#ffd23f', Math.round(36 * big), 8, 4); } + else if (c === 3) { for (let k = 0; k < 3; k++) ring(x, y - .6 + k * .7, z, k % 2 ? '#b6ff5c' : '#5ce1ff', Math.round(26 * big), 5 + k * 1.5, k * .8); glowBurst(x, y, z, '#5ce1ff', Math.round(20 * big), 6, 3); } + else { + const cols = ['#ff5e6c', '#4c8dff', '#ffd23f']; + cols.forEach((col, k) => setTimeout(() => { const h = y + 5 + k * 1.6, dx = (k - 1) * 2.2; glowBurst(x + dx, h, z, col, Math.round(46 * big), 7, 1); glowBurst(x + dx, h, z, '#ffffff', 10, 2.5, .5); }, k * 260)); + conf(x, y, z, Math.round(n * .4), ['#ff5e6c', '#4c8dff', '#ffd23f', '#ffffff']); + } + return true; +} + +// ---------------------------------------------------------------- the Wardrobe screen +function cheerIcon(no, cv) { + cv.width = 96; cv.height = 120; const g = cv.getContext('2d'); g.clearRect(0, 0, 96, 120); + const T = X.color || '#ff5e6c'; + const pals = { 0: ['#ff5e6c', '#ffcf3d', '#2fd39a', '#4c8dff', '#7c5cff', '#f15bb5'], 1: [T, mix(T, '#ffffff', .55), mix(T, '#000000', .35), '#ffffff'], 2: ['#ffd23f', '#ffe98a', '#e8343c', '#2fd39a', '#4c8dff'], 3: ['#5ce1ff', '#b6ff5c'], 4: ['#ff5e6c', '#4c8dff', '#ffd23f'] }; + const pal = pals[no] || pals[0]; + if (no === 3) { pal.forEach((col, k) => { g.strokeStyle = col; g.lineWidth = 5; g.setLineDash([4, 6]); g.beginPath(); g.ellipse(48, 70 - k * 22, 40 - k * 6, 13 - k * 2, 0, 0, TAU); g.stroke(); }); g.setLineDash([]); return cv; } + if (no === 4) { pal.forEach((col, k) => { const x = 22 + k * 26, y = 34 + (k % 2) * 18; g.strokeStyle = col; g.lineWidth = 3.5; for (let i = 0; i < 10; i++) { const a = i / 10 * TAU; g.beginPath(); g.moveTo(x + Math.cos(a) * 5, y + Math.sin(a) * 5); g.lineTo(x + Math.cos(a) * 15, y + Math.sin(a) * 15); g.stroke(); } }); } + let s = no * 97 + 13; const r = () => (s = (s * 9301 + 49297) % 233280) / 233280; + for (let i = 0; i < (no === 4 ? 10 : 26); i++) { g.save(); g.translate(8 + r() * 80, (no === 4 ? 70 : 10) + r() * (no === 4 ? 44 : 104)); g.rotate(r() * 3); g.fillStyle = pal[i % pal.length]; g.fillRect(-5, -3.5, 10, 7); g.strokeStyle = 'rgba(24,22,58,.35)'; g.lineWidth = 1; g.strokeRect(-5, -3.5, 10, 7); g.restore(); } + return cv; +} +let panel = null; +function openPanel() { + const C = cos(); if (!C) return; + const RC = {}; C.RARITY.forEach(r => { RC[r.id] = r.color; }); + panel = panel || window.BlockFits.panel({ + title: TX('Wardrobe'), note: TX('Captains only'), rarity: RC, + slots: [ + { id: 'o', name: TX('Outfits'), items: items('outfit'), back: true, drawNone: true, noneName: TX('Your climber'), noneDesc: TX('Your own colour and hat.'), draw: (no, cv, back) => BF.icon(no, X.color, back, 96, cv) }, + { id: 'c', name: TX('Celebrations'), items: items('cheer'), drawNone: true, noneName: TX('Usual confetti'), noneDesc: TX('The confetti everyone gets.'), draw: (no, cv) => cheerIcon(no, cv) } + ], + worn: slot => look[slot], + pick(slot, no) { + look[slot] = no; save(); X.changed(); + if (slot === 'c' && no) { const m = X.me; if (m) cheer(look, m.x, m.y + 1.5, m.z, 70, X.color); } + }, + close() { X.closed && X.closed(); } + }); + panel.open(); +} +// the Wardrobe button, on the Climber tab of More (under the hats) +function menu(on) { + let b = document.getElementById('wrBtn'); + if (!on) { if (b) b.parentNode.remove(); if (panel) panel.close(); return; } + if (b) return; + const row = document.createElement('div'); row.className = 'wrrow'; + row.innerHTML = ''; + row.querySelector('#wrBtn').textContent = TX('Wardrobe'); row.querySelector('.wrcap').textContent = TX('Captains only'); + const st = document.createElement('style'); st.textContent = '.wrrow{display:flex;align-items:center;gap:8px;margin-top:10px}.wrrow .wrcap{font-size:11px;font-weight:900;background:#ffcf3d;border:2px solid var(--ink,#18163a);border-radius:999px;padding:1px 7px}'; + row.appendChild(st); + const at = document.getElementById('hatMsg') || document.getElementById('hats'); + at.parentNode.insertBefore(row, at.nextSibling); + row.querySelector('#wrBtn').onclick = openPanel; +} +return { kitOf, kitStr, mine: () => (look.o || look.c ? { o: look.o, c: look.c } : null), dress, cheer, menu, open: openPanel, get look() { return look; }, BF }; +}; +})(); From e582860468ba2cab4dbf4b30e188c0200f56e072 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 06:33:02 +0000 Subject: [PATCH 31/63] Turbo Trail: a hidden Wardrobe for captains, with the 33 outfits and 4 celebrations Same outfits as Spire (outfits.js), worn in the runner's own colour and its glow; other runners stay see-through ghosts in them. Optional wk field in the runner's own node, only while worn. The Garage's speeds and trails are untouched. Also: the shared panel sits above the Leaderboard pill, and the celebration picture moved into outfits.js. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn --- README.md | 4 +- e63334287a3deaa3/cosmetics.js | 41 +++++++++ e63334287a3deaa3/outfits.js | 20 ++++- e63334287a3deaa3/spire/wardrobe.js | 13 +-- e63334287a3deaa3/turbo-trail/es.js | 73 ++++++++++++++++ e63334287a3deaa3/turbo-trail/index.html | 55 ++++++++++-- e63334287a3deaa3/turbo-trail/wardrobe.js | 106 +++++++++++++++++++++++ 7 files changed, 287 insertions(+), 25 deletions(-) create mode 100644 e63334287a3deaa3/turbo-trail/wardrobe.js diff --git a/README.md b/README.md index 7f4a181a..a3b20df7 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Personal site hosted with GitHub Pages at **https://ascoding11.github.io**, the - `e63334287a3deaa3/blockstorm/`: Blockstorm (Back Room), a blocky first-person shooter by GitHub user **dessyc9** (the original is at dessyc9.github.io/blockstorm), ported here with their permission. The fight is on the roofs of five sky towers above an endless city in rain and lightning, joined by eight glass maze bridges; a shove (F) can push someone off the edge. Free-for-all (most kills when the clock runs out) or capture the flag (Blue vs Red, two flags each, first to 3 captures). Everyone starts a match with the same Common guns and kills unlock the next rarity (`TIER_KILLS`: Rare at 5, Epic 10, Legendary 20, Mythic 30); a storm core on the middle tower gives a full shield and +30% damage for 15 s. The Shop (all free, new guns every day from a seeded generator) and Loadouts are the original game's and are saved in this browser only (`blockstorm_profile`); they don't change the guns used in matches. **What changed in the port:** the original's online play went through public MQTT relays (HiveMQ and EMQX, with mqtt.js from jsdelivr), a lobby hub and an "online now" list on those relays, and an owner account (a password-derived signing key, a crown, a kick button and top-tier guns for the owner). All of that is gone: online play uses the site's Firebase rooms, names come from the game's own name box (`blockstorm:name`, filled by party.js; it starts from `ol:name` or `party:name` if there is none), and the Back Room's Online, Party and Playing now panels do what the hub did. three.js is the original's r160 ES module, now from cdnjs (`three.module.min.js`): a small module puts it on `window.THREE` as a plain object, then `../autores.js` (deferred, so it runs after that module and before the game's module) wraps `THREE.WebGLRenderer` as in the other 3D games; moving the game to r128 would have meant retuning all its lighting and colours. **Online:** rooms under `rooms/bs-` in the Firebase Realtime Database (same project and rules as the other games), up to 12 people (`MAX_PLAYERS`), invite links `#bs-`. Quick match uses the public lobbies `bs-pub-1` to `4` (free-for-all) and `bs-ctf-pub-1` and `2` (capture the flag), which start by themselves with 9 medium bots, run 5 minutes and start the next match 12 s after one ends; any other code is a private room where the host picks the mode and bots (none, medium, hard, extreme) in the lobby and presses Start. The shared rules only let a browser write its own node and expect `n, c, x, z, h, ts`, so everything is in `players/`: `n` name, `c` shirt colour, `x y z h p` position, yaw and pitch, `w` gun slot, `sc` shots fired, `lf` life number, `a` alive, `m` match, `lk` look seed, `j` join time, `v` format (1), and `ev/e0`…`ev/e31`, a ring of events with a number `i` that only goes up (`h` a hit you landed, added up per target per update, `sv` a shove, `pj` a launcher shot; from the host `kl` a kill, `hu` you were hurt, `hm` your hit killed, `kn` knockback, `bo` storm core, `ct`/`nt` feed lines). The host is the live player with the smallest `j` (a tab that was frozen for 5 s goes to the back of the line); its browser runs the match exactly as the original's host did (bots, damage, kills, clock, flags, storm core, gun tiers) and also writes `rs` (the match: `id`, `st` lobby / play / end, `md` mode, `bl` bot level, `nb` bots, `t0` start and `len` length rather than an end time, `et` when it ended), `ch` (one row per fighter: id, alive, health, shield, kills, deaths, spawn shield, best streak, team, tier, storm core, life, and where it last spawned, which is how a client is placed), `bm` (bots' names and looks), `bt` (bots' positions and shot counts), `cf` (flags and score) and `k` (storm core ready). Players send their own position about 12 times a second and the host its bots at the same rate; every fighter is drawn from those time-stamped updates with `netsmooth.js`, and others' shots are drawn from the `sc` counts. Each browser is trusted for its own position and hits, so it isn't cheat-proof. If the host leaves, the next in line takes over the match from the last state it heard, and its bots become that browser's to run; people who join mid-match take a bot's place. **Leaderboards:** play time through `stats.js`, and `kills`, `kdkills`, `deaths`, `mkills` (most in a match) and `wins` (online only, with at least one other real player in the match); the boards are in `leaderboard.js`. **Touch:** on touch screens a move stick, drag to look, Fire, Jump, Aim, Reload, Swap, Shove, pause and scoreboard buttons, and the gun slots at the top are tap targets; the health, gun and clock readouts move to the top so nothing sits under a thumb upright or sideways. The keyboard and mouse controls are the original's. A webdriver-only test hook is `window.__bs`. **Spanish** (lang.js): its words are in `blockstorm/es.js` (the menus are rebuilt as HTML and translated by lang.js as they appear); the flag and Storm Core lines the host sends to the room stay English on the wire and each page shows them in its own language, and gun, set, bot and loadout names stay as they are. - `e63334287a3deaa3/sky-duel/`: Sky Duel (Back Room), an original arcade dogfighting game for up to 8 planes (three.js r128 with `../autores.js`; one self-contained `index.html`, everything drawn and synthesised in code). **Modes:** Duel (1v1), free-for-all and 2v2 (Blue vs Orange), first to the kill target (5 to 20) or most kills when the clock runs out; solo against bots, or online. **The map** is one height function (`terrainRaw`, whole-number hash noise so every browser builds the same land) sampled on a 150 × 150 grid over 6 km: green hills, lakes and sharp peaks in the west, a red-rock plateau cut by canyons in the east (`CANYONS` are the centre lines), a ring of mountains round it, and clouds you can fly through (the screen whites out inside one). `terrainH` reads the same two triangles per grid square that the mesh draws, so what you see is what you hit. Past `ARENA_R` a pilot gets 8 seconds to turn back. **Flight** (`stepPlane`) is deliberately simple: a plane is a heading, a pitch (kept within ±75°, so no loops) and a bank; it steers toward an aim direction at a turn rate that falls as speed rises, climbing costs speed, hard turns cost a little, and under `STALL` the nose drops until it has picked speed back up. Above `CEIL` the engine fades. Boost drains a meter; a barrel roll (0.8 s, 2.4 s cooldown) slides the plane sideways, makes half the bullets miss and usually shakes off a missile that is about to arrive. The ground, the water and the canyon walls are always fatal. All four planes (`PLANE_GEO`: Puffin, Swift, Heron, Dart) fly the same. **Weapons:** machine guns that overheat (`HEAT_UP` per shot, jammed until they cool to 35%), homing missiles that need the target held within `LOCK_CONE` of the nose for `LOCK_T` seconds (two to start, four at most, one back every 22 s), flares (a 70% chance to pull away each missile within `FLARE_R`), and rings to fly through (`PICKS`: green repairs 45 hull, orange two missiles, white two flares; back after 20 s). **HUD:** the ring is the aim, the amber cross is where the guns point, the diamond is the lead marker (where to shoot so the bullets meet the target); boxes with names, distance and hull on other planes, arrows for the ones off screen, a lock ring, a radar that turns with the plane, a kill feed and warnings (missile, stall, pull up, turn back, overheated). **Bots** (`botThink`, levels in `DIFF`: Rookie, Veteran, Ace) fly the same plane through the same controls: each frame a bot only chooses where to aim, the throttle and which buttons to press; `avoidGround` looks up to 2.6 s ahead and pulls up or turns toward lower ground. **Controls:** the mouse aims and the plane follows (pointer lock), with rebindable keys through `keybinds.js` (saved as `keybinds:sky-duel`; the arrow keys and A/D steer without a mouse); on touch screens a stick, a throttle slider and Roll, Flare, Missile, Boost and Fire buttons, with the radar, feed and score moved so nothing overlaps upright or sideways. **Online:** rooms under `rooms/vq-` in the Firebase Realtime Database (same project and rules as the other games), up to 8 people (`MAX_ROOM`), invite links `#vq-`. Quick match uses the public rooms `vq-pub-1` to `4`, which run free-for-alls by themselves (to 15 kills or 5 minutes, Veteran bots filling to 6, the next match 12 s after one ends); any other code is a private room with a briefing room where the host picks the mode, kill target, time, bots and bot level and presses Take off. A duel is for two pilots and 2v2 for four: with more people in the room the host's choice becomes a free-for-all, and someone who joins a full duel or 2v2 watches until the next match. The shared rules only let a browser write its own node and expect `n, c, x, z, h, ts`, so everything is in `players/`: `n` name, `c` colour, `fr` plane, `x y z` position, `h p r` heading, pitch and bank, `s` speed, `f` flags (1 firing, 2 boosting, 4 rolling, 8 alive, 16 spawn shield, 32 sitting out), `hp`, `k` kills, `d` deaths, `j` join time, `v` format (1), and `ev/e0`…`ev/e31`, a ring of events with a number `i` that only goes up (`h` hits one of your planes landed, added up per target every 0.1 s; `k` one of your planes died, and who gets the credit; `m` a missile launched, `c` it lost its target, `x` it blew up; `f` a flare; `p` a ring taken). The host is the live player with the smallest `j` (a tab that is hidden while hosting moves itself to the back of the line); its node also carries `rs` (the match: `id`, `st` 0 briefing / 1 flying / 2 over, `md` mode, `kl`, `tl`, `lvl`, `fill`, `t0` start time, `sky`, `tm` who is on which team, `bl` which bot seats are in use, `rev`, `et`, `win`) and `bt` (each bot's position, flags, hull and score). Nodes are sent 10 times a second and every other plane is drawn from those time-stamped updates with `netsmooth.js`. Each browser decides the hits of its own bullets and missiles against where it sees the other planes, the browser that owns the plane hit takes the damage and announces the kill, and the killer's own browser adds the kill to its score, so nobody writes anyone else's data (and it isn't cheat-proof). If the host leaves, the next in line carries on from the last `rs` it heard and flies the bots from where they were; a newcomer takes a bot's seat and a bot takes the seat of someone who left (`fixRoster`). Solo and the dogfight behind the menu run the same code with this browser as the host. **Saved in this browser:** `skyduel-name`, `-color`, `-frame`, settings and the last room. **Leaderboards:** play time through `stats.js`, and `kills`, `kdkills`, `deaths` (solo and online), `mkills` (most in a match) and `wins` (online only, with at least one other person flying); the boards are in `leaderboard.js`. Graphics has Pretty and Fast (sharpness and particle counts at once, trees and clouds on the next load); phones start on Fast. `AD_SLOT` is empty. A webdriver-only test hook is `window.__skd`. **Spanish** (lang.js): its words are in `sky-duel/es.js`, banners, warnings, the lock ring and the scores go through `TX()` (those HUD parts are `data-noi18n`), and plane names and bot callsigns stay as they are. - `e63334287a3deaa3/spire/`: Spire (Back Room), an obby-style parkour race up a tower stacked from random sections (Three.js, Firebase Realtime Database rooms under `rooms/tw-…`, same project and rules as Rumble Karts; Quick match uses `rooms/tw-pub-1` to `tw-pub-4`; invite links go through the home page as `#tw-`; rooms hold up to 12). Everything that isn't drawing lives between the `// ==CORE==` and `// ==/CORE==` markers in the page: movement (`PHYS`, `simStep`), parts (upright boxes and cylinders, each optionally moving by `line`, `spin` or `orbit`, timed, crumbling, lethal, bouncy, a conveyor, a climbable truss, `ice` (on the ground you speed up at `ICE_ACC` and slow at `ICE_DEC`, so you slide), a launch pad (`boost`: landing or stepping on it sets your velocity to that vector, and the take-off speed that caps air control is measured again from it) or a wind zone (`zone: 'wind'` with a `wind` vector, usually timed: while it's on it carries you like a conveyor, in the air too)), the section library (`MODS`), towers (`buildTower`), the obby (`buildObby`, `WORLDS`) and the checking bot; it has no DOM or Three.js in it, so a test can run it on its own. Physics is a fixed 120 Hz step with the player as an upright cylinder; moving parts are placed by time alone, so every player who shares the round clock sees the same tower. A jump reaches 3.37 (3.67 counting the pop onto a ledge just above your feet) and you run at 7.5. In the air the stick only nudges you (`airControl`): measured against the way you're flying, it speeds you up (`AIR_ACC`, but never past your take-off speed, or the walk speed if that was slower), turns you (`AIR_TURN`) and slows you (`AIR_BRAKE`), so holding back stops a running jump instead of turning you round, and holding sideways for a whole jump moves you about 2.3; from a standing jump the stick gets the full `AIR_ACC`. Sections keep the step from one route part to the one after next above 3.67 (a big jump can't skip a part), keep beams longer than a running jump, and make hazards too tall or too fast to simply hop. When changing a section, also try running jumps (with the real `simStep`) from each part of its route to every later one, to make sure none can be skipped. A section can offer a second way through: Fork in the Road has a slow lift and a gold shortcut (a narrow beam through a laser, a truss and two pillars, with a SHORTCUT sign, from a part's `sign`); its `build` takes a fourth argument `alt` that routes the bot through the shortcut, and `verifyModule(id, d, mir, t0, seed, alt)` checks that way too. Each section in `MODS` is built in its own frame: it starts on the 4 × 4 pad centred at (0, 0, 8) and must end with `B.exit(H)`, its exit pad at (0, H, -8), staying inside radius 12.5 and above y = 0. Towers are versioned so everyone in a room builds the same one: `towerPlan(seed, n, easy, v)` with `v` 1 is the original 19 sections in the original order (kept exactly, for a host on an older copy of the page), and `v` 2 (`TOWER_V`) adds Gust Gaps, Ice Steps, Launch Pads and Fork in the Road (marked `v: 2` in `MODS`) and climbs steadily: each slot takes the unused section whose difficulty is nearest a target rising from 1.4 to 4 (with a little chance mixed in), and the tightness `d` rises from about 0.12 to 0.72. Towers turn every other section 180° and may mirror any, and between sections there is a porch, a truss and a landing 5.5 higher (`RISE`), more than a jump plus a body (5.37), so nothing you can stand on in one section lets you reach the next one's low parts. Every section also lists a route for the bot (`B.j`, `B.w`, `B.jon`): before each jump the bot simulates it with the real `simStep` and only jumps when it lands (in the air it asks for just the speed that brings it down over the target, `aimAir`, as a player who commits to a jump would), and it waits or hops past hazards, so a route that completes proves the section can be beaten with the real movement numbers. Each landing between sections is also checkpoint `k` (`cp` on the part, its spot in `W.cps[k]`). Towers can have checkpoints (on your own, the Checkpoints switch on the menu, saved as `spire:cpOn`, on by default; online, the host's Checkpoints option, `cp` in the round): then reaching a landing saves your place (a mint landing, a fanfare and a mint mark on the height bar), anything lethal or R puts you back on it, and dropping more than 4 below it counts as a fall and does the same. Without checkpoints, red sends you to the bottom and a fall just lands you lower, as before. Either way the first time you reach each landing the feed shows your split time, and the fastest-tower best counts both (a clean run is just as quick either way). Coins float over two spots on each section's route (the same ones for everyone in a room, picked from the tower's seed): each one you pass through is one coin, picked up in the physics step. When adding or changing a section, run the bot over it at several difficulties, mirrored and not, and at several start times, and over whole towers (`verifyModule`, `runBot`; the page exposes them as `window.__tw` in automated browsers). Online, like Chromaflage, everything travels through each player's own node at `rooms/tw-/players/`, which must always hold `n, c, x, z, h, ts`: position and animation (`y`, `a`), the round the player is in (`r`) and a finish claim (`f`, `round:milliseconds`). The host (newest host number `he`, else whoever has been in the room longest, chosen only once the room's players have loaded) publishes the round as JSON in its own `rs`: `{id, seed, ph, t0, dur, n, ez, ff, rf, fin, ne, cp, v}`, where `seed` builds the tower (with tower version `v`; a round without `v` is version 1 and one without `cp` has no checkpoints, so a host on an older page still works), `t0` is the server time it starts, `ff`/`rf` mark the first finish (from then the clock runs at double speed) and `fin` is the finish order. Other players check the round before using it (`cleanRS`: finite times within a day of now, a finish list of `[uid, ms, name]`, names cleaned), so a broken host can't freeze their page. The host takes finish claims at their word, so it isn't cheat-proof. If the host leaves, the next player carries on from the last round it saw. A tab in the background gets no animation frames, so a 1 s timer keeps its node's `ts` fresh and, for the host, keeps the round ticking. Nothing about a round is kept online after it ends. Saved only in the browser, under `spire:` keys: name, colour, hat (`spire:hat`), checkpoints on your own (`spire:cpOn`), settings, the host's round options (now with `cp`), and a profile (`spire:profile`: coins, XP, towers climbed, best times, falls, the furthest obby stage, best practice times and the hats bought with coins, `hats`), `spire:awarded` (the last online round that paid out, so rejoining it doesn't pay twice) and `spire:climbed` (set after the first truss climb; until then a tip shows at the foot of a truss). Hats (`HATS`): a cap, party hat, beanie, top hat, crown and traffic cone unlock with your level, and a halo, Viking helmet, propeller cap and wizard hat cost 100 to 500 coins (the menu's Hat row; a locked one says what it needs, or offers to buy it). Your hat travels online as `k` on your node. In a tower the sky runs on toward sunset as the camera climbs (`skyAt`); online a place pill beside the clock shows where you are (finishers in order, then everyone else by height), and the height bar has a strip in each section's colour and a gold ring on the leader. Climbers squash and stretch as they jump and land, and flying fast (a launch pad, a long fall) brings in speed lines and widens the view a little. Keys use `keybinds.js` (`keybinds:spire`). V (the `view` action) switches between the camera behind you and first person, as does scrolling all the way in or out; in first person your body moves to layer 1, which only the sun's shadow camera sees, so it's hidden but still casts its shadow, and spectating always uses the camera behind the climber you watch. The choice is saved as `spire:view`. On computers the mouse aims: clicking the game while playing captures it (Pointer Lock), so moving it turns the camera with no button held (0.0026 radians per pixel times Sensitivity, pitch kept to the same limits as before), and a crosshair replaces the cursor (a dot in first person). While aiming in third person the camera sits over your right shoulder and you turn to face where you aim as you move; Shift lock also keeps you facing it standing still. Esc, the pause menu, results, the Controls panel, the menus and spectating all let go of the mouse (only Esc and losing it some other way bring up the pause menu), and a small "Click to aim" shows while it's free during play; you can still move then. If the browser refuses the lock three times running (Chrome refuses a request within about a second of Esc), the hint goes and the old drag-to-look carries on, but every click still tries again. Settings and the pause menu have Sensitivity (`spire:sens`, shared with touch) and Invert Y (`spire:invY`, also for touch, off by default). On touch screens the page adds `touch` to `body` for a move stick, a Jump button, an eye button for first person, drag to look and pinch to zoom, with the Controls buttons hidden. Drawing: parts that never change are merged into one mesh per look and per four sections (vertex colours; the bevelled edges and side shading come from a per-face `fe` attribute that `boxGeo`/`cylGeo` add), while moving, blinking and crumbling parts and checkpoints keep their own meshes; lethal parts are unlit neon with a glow. Scenery (hills, trees, mountains, clouds, the obby's islands) is one mesh each, the sky is one shader, and dust, sparkles and confetti are two point buffers. Graphics Pretty (`spire:gfx` `high`, the default on computers) adds soft sun shadows that follow you, a second cloud layer and more particles; Fast (`low`) is the default on phones. Parties can launch it (its row in `GAMES` in `party.js`, `{ k: 'tw', n: 'Spire', d: 'spire', max: 12, nk: 'spire:name' }`), the Online panel offers room invites to it, and it's in the feedback box's game list. It was archived for a while (October 2026) and brought back with checkpoints, the new sections, coins and hats. **Spanish:** it loads `../lang.js` and its own words in `spire/es.js` (sections, worlds, hats and the made-up tower names, which es.js builds from the two word lists, so keep it in step if those lists change); canvas signs use `T()`, and there is an EN | ES switch next to Controls in Settings and the pause card. **Wardrobe (captains only for now):** `spire/wardrobe.js`, fetched together with `../outfits.js` (the blocky outfits shared with Turbo Trail and Escapade) only when `wardrobeOn()` is true (`WARDROBE_PUBLIC = false` is the one line that opens it to everyone; until then a captain through `../captains.js`, or `?wardrobe=1` on localhost or in an automated browser) or when a climber in the room wears a kit (then only those two files, to draw them), adds a Wardrobe button under the hats on the Climber tab: 33 outfits (17 sports kits made in the climber's own colour, 3 robots, 4 pirates with eye patches, 6 suits and bosses, a wizard, an astronaut and a knight) and 4 celebrations (what bursts out at checkpoint landings and at the top instead of the usual confetti). They are Spire's `outfit` and `cheer` items in `cosmetics.js` (game `spire`, prefix `sp`; in no pack, free for captains to wear). Saved as `spire:wardrobe` (`{o, c}`, item numbers, 0 for none); online it is one optional field in the player's own node, `wk` (`"o.c"`, e.g. `"21.3"`), sent only while something is worn; older pages ignore it, and a page that doesn't know a number draws the plain climber and the usual confetti. An outfit is five vertex-coloured meshes on the climber's own pivots (fewer draw calls than the plain climber's eleven) with pictures from one shared atlas texture, so the hit box, speed and jump are the game's own; an outfit with its own headgear hides your hat while it is worn. Everyone else's page only adds `captains.js`, as every hidden wardrobe does. -- `e63334287a3deaa3/turbo-trail/`: Turbo Trail (Back Room), a speedrun obby: 25 short levels (about 6 to 12 seconds each at gold pace) in five worlds of five, Candy Coast, Neon City, Lava Forge, Frost Peaks and Star Drift, each with its own sky, sea, palette and scenery (Three.js, Firebase Realtime Database race rooms under `rooms/sr-…`, same project and rules as Rumble Karts; Quick match uses `rooms/sr-pub-1` to `sr-pub-4`; invite links go through the home page as `#sr-`; rooms hold up to 12). Everything that isn't drawing lives between the `// ==CORE==` and `// ==/CORE==` markers in the page, with no DOM or Three.js in it, so a Node script can run it on its own: movement (`PHYS`, `simStep`), parts (upright boxes and cylinders, optionally moving by `line`, `spin` or `orbit`, blinking (`timed`), crumbling, lethal, a jump pad (`bounce`), a climbing wall (`wj`), ice, or a zone: `speed` pads, `lowg` low gravity and the `portal`), the level builder (`Course`), the levels (`WORLDS`, `LEVELS`, `buildLevel`) and the checking bot. Physics is a fixed 120 Hz step with the runner as an upright cylinder (radius 0.42, height 2), so it plays the same at any frame rate (a slow frame runs several steps; nothing moves more than 0.5 in one step, and the thinnest solid or lethal part is 0.25), and parts are found through an x/z grid of 10 × 10 cells. Running speed is 12.5 with snappy acceleration, a jump rises 3.24 and carries about 9 at full speed, with 0.12 s of coyote time and a 0.14 s jump buffer; in the air the stick speeds you up, turns you and brakes you (`airControl`) but never past your take-off speed. Speed pads push you to 27 along their arrows (the extra speed fades on the ground in about a second and stays in the air), jump pads throw you 7.8 up, and touching a striped climbing wall in the air lets you jump again off it (up 16.5, 8 away from the wall, keeping your speed along it; you also slide down it slowly). Levels are written with the `Course` cursor (`start`, `run`, `gap`, `stones`, `blocks`, `pad`, `bounce`, `bars`, `stairs`, `movers`, `pistons`, `spinner`, `lasers`, `wallrun`, `chimney`, `crumble`, `blinks`, `slalom`, `lowg`, `orbit`, `drop`, `turn`, `portal`); each piece also adds the checking bot's route. The bot plays with the real `simStep`: before each jump it simulates the jump and only takes it if it lands, it hops or waits for hazards, and it pushes off climbing walls; when changing a level, run the bot over it at several start times (moving parts depend on the clock) and at the top upgrade speed (`runBot(buildLevel(i), t0, 90, run)`). The medal times in `MEDALS` ([gold, silver, bronze] per level) come from the bot: gold is its median time over several start times plus 4% and 0.25 s, rounded up to a quarter second, silver is 1.3 × gold and bronze 1.75 × gold, so they need re-working out if a level changes. A level's clock starts with your first move and a fall, a lethal part or R puts you back at the level's start with the clock reset; in a Full run (all 25 on one clock, starting with your first move on 1-1) the clock keeps running through falls and T starts the run over. After each portal the split (your full-run time there against your best run's, or the level time against your best) shows green when ahead and red when behind. Stars: 1, 2 or 3 for a bronze, silver or gold best; they unlock speed upgrades (`SPEEDS`: +4%, +8%, +12% at 12, 30 and 50 stars, chosen in the Garage and used online too) and trails (`TRAILS`, at 3 to 75 stars; a camera-facing ribbon of the last 0.45 s, one draw call). Saved only in the browser under `turbotrail:` keys: `name` (a plain string, which party.js puts back after a party launch), `color`, settings (`sens`, `invY`, `follow`, `ghost`, `vol`, `mus`, `gfx`, `zoom`, `slock`, `hostC`, `room`), `prog` (`{reached, best: [25 times], run: {t, sp: [25 splits]}, speed, trail, clears, falls, runs}`), `ghost:` (your best run on that level, 20 samples a second as comma-separated whole tenths of x, y, z and hundredths of the facing, replayed as a see-through runner when Best ghost is on) and `awarded` (the last race win counted). Online, like Spire, everything travels through each runner's own node `rooms/sr-/players/`, which must always hold `n, c, x, z, h, ts`: also `y`, `a` (animation, 5 while respawning), `l` (which level of the course you're on), `r` (the race the position belongs to), `tr` (trail), `j` (join time) and `f` (a finish claim, `race:milliseconds`). The host (newest host number `he`, else whoever has been in the room longest, chosen once the room has loaded) publishes the race as JSON in its own `rs`: `{id, ph: 'race' | 'inter', t0, cs, nm, fin, ff, ne}`, where `cs` is the course (a random world's five levels, five from all over, or all 25: the host's Course option in the pause menu, saved as `turbotrail:hostC`), `t0` the server time it starts (a 5 s countdown), `fin` the finish order `[uid, ms, name]` and `ff` the first finish; the race ends when everyone live has finished, 30 s after the first finish, or after 45 s a level plus 20 s, then results show for 9 s and the next race starts. Guests clean the host's race before using it (`cleanRS`), so a broken host can't freeze them. The race clock is the simulation clock, so every runner sees the moving parts in the same places; other runners are see-through ghosts (with their trails) drawn from a short history of their updates with `../netsmooth.js`, only while they're on the same level as you, and a list on the right shows everyone's progress. The host takes finish claims at their word, so it isn't cheat-proof. A background tab keeps its node fresh (and, for the host, the race moving) with a 1 s timer. Camera: behind you, pulled in so it never ends up inside a wall, easing round to the way you're running while you hold forward (not while strafing, and not for 0.7 s after you turn it yourself; Settings → Camera: Free turns that off), and a little wider at high speed. On computers clicking the game captures the mouse (Pointer Lock) to look around; Esc frees it. Keys are rebindable with `keybinds.js` (`keybinds:turbo-trail`). On touch screens the page adds `touch` to `body`: a run stick, Jump, a restart button, and drag anywhere else to look; Fast graphics by default. Drawing: parts that never change are merged into one mesh per look (bevelled edges from a per-face `fe` attribute, as in Spire), moving, blinking and crumbling parts keep their own meshes, scenery is one mesh per level, the sky one shader and particles one point buffer, so a level is about 20 to 30 draw calls; Pretty graphics adds sun shadows. Leaderboards hooks: `BackRoomStats.min('obby', seconds)` for a finished full run (`obby` is already in stats.js's `LOWER` list; stats are kept per game folder, so it doesn't mix with Spire's), `max('stars', total)`, `add('levels', 1)` at every portal and `add('wins', 1)` for winning a race against at least one other runner. Ads follow the `AD_SLOT` pattern (empty). A test hook (`window.__sr`, with `advance(seconds)`, `autopilot(on)` and `buildLevel`/`runBot`) exists only when `navigator.webdriver` is set. **Spanish:** it loads `../lang.js` and its own words in `turbo-trail/es.js` (level names stay English; signs drawn on canvases use `T()` and follow the language when the level is built), with an EN | ES switch next to Controls in the menu and pause card. +- `e63334287a3deaa3/turbo-trail/`: Turbo Trail (Back Room), a speedrun obby: 25 short levels (about 6 to 12 seconds each at gold pace) in five worlds of five, Candy Coast, Neon City, Lava Forge, Frost Peaks and Star Drift, each with its own sky, sea, palette and scenery (Three.js, Firebase Realtime Database race rooms under `rooms/sr-…`, same project and rules as Rumble Karts; Quick match uses `rooms/sr-pub-1` to `sr-pub-4`; invite links go through the home page as `#sr-`; rooms hold up to 12). Everything that isn't drawing lives between the `// ==CORE==` and `// ==/CORE==` markers in the page, with no DOM or Three.js in it, so a Node script can run it on its own: movement (`PHYS`, `simStep`), parts (upright boxes and cylinders, optionally moving by `line`, `spin` or `orbit`, blinking (`timed`), crumbling, lethal, a jump pad (`bounce`), a climbing wall (`wj`), ice, or a zone: `speed` pads, `lowg` low gravity and the `portal`), the level builder (`Course`), the levels (`WORLDS`, `LEVELS`, `buildLevel`) and the checking bot. Physics is a fixed 120 Hz step with the runner as an upright cylinder (radius 0.42, height 2), so it plays the same at any frame rate (a slow frame runs several steps; nothing moves more than 0.5 in one step, and the thinnest solid or lethal part is 0.25), and parts are found through an x/z grid of 10 × 10 cells. Running speed is 12.5 with snappy acceleration, a jump rises 3.24 and carries about 9 at full speed, with 0.12 s of coyote time and a 0.14 s jump buffer; in the air the stick speeds you up, turns you and brakes you (`airControl`) but never past your take-off speed. Speed pads push you to 27 along their arrows (the extra speed fades on the ground in about a second and stays in the air), jump pads throw you 7.8 up, and touching a striped climbing wall in the air lets you jump again off it (up 16.5, 8 away from the wall, keeping your speed along it; you also slide down it slowly). Levels are written with the `Course` cursor (`start`, `run`, `gap`, `stones`, `blocks`, `pad`, `bounce`, `bars`, `stairs`, `movers`, `pistons`, `spinner`, `lasers`, `wallrun`, `chimney`, `crumble`, `blinks`, `slalom`, `lowg`, `orbit`, `drop`, `turn`, `portal`); each piece also adds the checking bot's route. The bot plays with the real `simStep`: before each jump it simulates the jump and only takes it if it lands, it hops or waits for hazards, and it pushes off climbing walls; when changing a level, run the bot over it at several start times (moving parts depend on the clock) and at the top upgrade speed (`runBot(buildLevel(i), t0, 90, run)`). The medal times in `MEDALS` ([gold, silver, bronze] per level) come from the bot: gold is its median time over several start times plus 4% and 0.25 s, rounded up to a quarter second, silver is 1.3 × gold and bronze 1.75 × gold, so they need re-working out if a level changes. A level's clock starts with your first move and a fall, a lethal part or R puts you back at the level's start with the clock reset; in a Full run (all 25 on one clock, starting with your first move on 1-1) the clock keeps running through falls and T starts the run over. After each portal the split (your full-run time there against your best run's, or the level time against your best) shows green when ahead and red when behind. Stars: 1, 2 or 3 for a bronze, silver or gold best; they unlock speed upgrades (`SPEEDS`: +4%, +8%, +12% at 12, 30 and 50 stars, chosen in the Garage and used online too) and trails (`TRAILS`, at 3 to 75 stars; a camera-facing ribbon of the last 0.45 s, one draw call). Saved only in the browser under `turbotrail:` keys: `name` (a plain string, which party.js puts back after a party launch), `color`, settings (`sens`, `invY`, `follow`, `ghost`, `vol`, `mus`, `gfx`, `zoom`, `slock`, `hostC`, `room`), `prog` (`{reached, best: [25 times], run: {t, sp: [25 splits]}, speed, trail, clears, falls, runs}`), `ghost:` (your best run on that level, 20 samples a second as comma-separated whole tenths of x, y, z and hundredths of the facing, replayed as a see-through runner when Best ghost is on) and `awarded` (the last race win counted). Online, like Spire, everything travels through each runner's own node `rooms/sr-/players/`, which must always hold `n, c, x, z, h, ts`: also `y`, `a` (animation, 5 while respawning), `l` (which level of the course you're on), `r` (the race the position belongs to), `tr` (trail), `j` (join time) and `f` (a finish claim, `race:milliseconds`). The host (newest host number `he`, else whoever has been in the room longest, chosen once the room has loaded) publishes the race as JSON in its own `rs`: `{id, ph: 'race' | 'inter', t0, cs, nm, fin, ff, ne}`, where `cs` is the course (a random world's five levels, five from all over, or all 25: the host's Course option in the pause menu, saved as `turbotrail:hostC`), `t0` the server time it starts (a 5 s countdown), `fin` the finish order `[uid, ms, name]` and `ff` the first finish; the race ends when everyone live has finished, 30 s after the first finish, or after 45 s a level plus 20 s, then results show for 9 s and the next race starts. Guests clean the host's race before using it (`cleanRS`), so a broken host can't freeze them. The race clock is the simulation clock, so every runner sees the moving parts in the same places; other runners are see-through ghosts (with their trails) drawn from a short history of their updates with `../netsmooth.js`, only while they're on the same level as you, and a list on the right shows everyone's progress. The host takes finish claims at their word, so it isn't cheat-proof. A background tab keeps its node fresh (and, for the host, the race moving) with a 1 s timer. Camera: behind you, pulled in so it never ends up inside a wall, easing round to the way you're running while you hold forward (not while strafing, and not for 0.7 s after you turn it yourself; Settings → Camera: Free turns that off), and a little wider at high speed. On computers clicking the game captures the mouse (Pointer Lock) to look around; Esc frees it. Keys are rebindable with `keybinds.js` (`keybinds:turbo-trail`). On touch screens the page adds `touch` to `body`: a run stick, Jump, a restart button, and drag anywhere else to look; Fast graphics by default. Drawing: parts that never change are merged into one mesh per look (bevelled edges from a per-face `fe` attribute, as in Spire), moving, blinking and crumbling parts keep their own meshes, scenery is one mesh per level, the sky one shader and particles one point buffer, so a level is about 20 to 30 draw calls; Pretty graphics adds sun shadows. Leaderboards hooks: `BackRoomStats.min('obby', seconds)` for a finished full run (`obby` is already in stats.js's `LOWER` list; stats are kept per game folder, so it doesn't mix with Spire's), `max('stars', total)`, `add('levels', 1)` at every portal and `add('wins', 1)` for winning a race against at least one other runner. Ads follow the `AD_SLOT` pattern (empty). A test hook (`window.__sr`, with `advance(seconds)`, `autopilot(on)` and `buildLevel`/`runBot`) exists only when `navigator.webdriver` is set. **Spanish:** it loads `../lang.js` and its own words in `turbo-trail/es.js` (level names stay English; signs drawn on canvases use `T()` and follow the language when the level is built), with an EN | ES switch next to Controls in the menu and pause card. **Wardrobe (captains only for now):** `turbo-trail/wardrobe.js`, fetched together with `../outfits.js` (the blocky outfits shared with Spire and Escapade) only when `wardrobeOn()` is true (`WARDROBE_PUBLIC = false` is the one line that opens it to everyone; until then a captain through `../captains.js`, or `?wardrobe=1` on localhost or in an automated browser) or when a runner in the race wears a kit (then only those two files, to draw them), adds a Wardrobe button in the Garage under the trails: the same 33 outfits as Spire, made in the runner's own colour (an outfit replaces the runner's cap, goggles, backpack and scarf), and 4 celebrations (what bursts out when you finish a race, a full run or the last level, instead of the usual confetti). They are Turbo Trail's `outfit` and `cheer` items in `cosmetics.js` (game `turbo-trail`, prefix `tr`; in no pack, free for captains to wear). The Garage's speeds and trails are not touched. Saved as `turbotrail:wardrobe` (`{o, c}`, item numbers, 0 for none); online it is one optional field in the runner's own node, `wk` (`"o.c"`), sent only while something is worn; older pages ignore it, and a page that doesn't know a number draws the plain runner. Other runners stay see-through ghosts in their outfits (each dressed ghost has its own see-through material, as the plain ones share the page's). An outfit is five vertex-coloured meshes on the runner's own pivots (one draw call fewer than the plain runner), keeping the runner's own glow, so the hit box, speed and jump are unchanged. Everyone else's page only adds `captains.js`, as every hidden wardrobe does. - `e63334287a3deaa3/escapade/`: Escapade (Back Room), a 3D escape-room obby (Three.js, Firebase Realtime Database rooms under `rooms/er-…`, same project and rules as Rumble Karts; Quick match uses `rooms/er-pub-1` to `er-pub-4`; invite links go through the home page as `#er-`; rooms hold up to 12). **Worlds:** six worlds of eight levels (48), each level a themed set of rooms with one way out, harder world by world. World 1, Breakout (Detention, Lab Rats, Hot Kitchen, Toy Box, Down the Drain, The Vault, Orbit Station, The Warden), is built into `index.html`, unchanged. World 2, Lost and Found (Overdue (a library), Clockwork (a clock tower), Cold Feet (an ice cave), Lost Temple, Mirror Manor (a haunted house), Stage Fright (a theatre), Gale Point (a lighthouse in a storm) and After Hours (a museum, the world's finale)), is `escapade/worlds/w2.js`; its first five were levels 9–13 before worlds came, with the same ids. World 3, Deep Down (Cave-In (an old mine), Deep End (a flooded cave), Off the Rails (an underground railway), High Water (a pump station), Fish Tank (an aquarium), Crystal Clear (a crystal cavern), Hull Breach (a sunken ship) and Hot Core (a volcano, the world's finale)), is `escapade/worlds/w3.js`; it added water you swim in (jump strokes up; an Air bar while your head is under), minecarts on rails (`rail`), water and lava that rise (`rise`, started by a flag or a trigger zone) and dark rooms you need the lantern for (`B.dark`, item `lamp`). World 4, Full Power (Assembly Line (a toy factory), Sorting Day (a recycling plant), Spin Cycle (a power station), Growing Pains (a greenhouse), Hot Swap (a data centre), Night Shift (an observatory), Spare Parts (a robot lab) and Meltdown (a power plant, the finale)), is `escapade/worlds/w4.js`; it added belts and fans a lever turns round (`rev`), pressure plates you stand on (`B.hold`), presses and piston walls that crush (`B.crusher`, `B.press`) and red, green and yellow keycards with their doors (`B.cardDoor`). World 5, Sky High (Hot Air (a balloon festival), Big Top (a flying circus), Thunderclap (a skyscraper in a storm), Sky Deck (a revolving restaurant), Zeppelin (an airship), Cloud Keep (a castle in the clouds), Orbiter (a satellite) and Eye of the Storm (a weather station in a hurricane, the finale)), is `escapade/worlds/w5.js`; it added updrafts (`B.lift`), cannons you fire yourself from (`B.cannon`, a `{w5: 'cannon'}` button), lightning on a timer with rods that power gates (`B.bolt`), groups of parts that turn a step at a press (`B.turning`, `B.turnBtn`, `B.align`) and the `clouds` scenery. World 6, The Last Door (One Way Home (a labyrinth with one-way flaps), Sun and Sand (a pyramid), Siege Works (a fortress), Dragon's Wake (a dragon's keep), Borrowed Time (a vault of clocks), Upside Dream (a dream), Long Climb (a climb over a molten sea) and The Last Door (the Keeper, a three-phase boss, and the end of the game)), is `escapade/worlds/w6.js`; it added one-way flaps (`oneway: [nx, nz]`, `B.oneway`), rings of fire you jump (shape `ring`, move `pulse`, `B.ring`) and the shadow (`B.shadow` zones: a chaser that walks your own path a few seconds behind you); escaping its last level shows "You beat Escapade!". Each of Worlds 3–6 keeps its shared code in its own marked blocks in `index.html` (`// ---- World core additions ----` inside the CORE, `// ---- World drawing additions ----` outside it) with one-line hooks ending `// W hook`; each does nothing unless a level uses it, and `worlds/README.md` section 13 lists every helper. Worlds 3–6 are `needs: 3` (`CORE_VER` 3). Each world after the first is its own file, `worlds/w.js`, loaded only when it's needed (picked in the menus, the level an online room is playing, or the next world when you reach a world's last level), so the page stays small; a world file only describes levels (`Escapade.world({n, needs, levels})`), and every shared helper, puzzle part and the bot live in `index.html`. **`escapade/worlds/README.md` is the guide for building a world**: the API, every helper and puzzle with its parameters, seeds, checkpoints, stars, the bot route, the tests a level must pass, a performance budget, a difficulty guide and the mechanics already used. The `WORLDS` list in `index.html` (one line per world: name, colour, blurb and its eight level ids) is what the menus show before a file loads and what progress counts by. `CORE_VER` goes up when the page gains something world files can use; a file says which one it needs, and a page too old for it (or one that can't load it) shows an "Update needed, reload" notice instead of breaking. Everything that isn't drawing lives between the `// ==CORE==` and `// ==/CORE==` markers: movement (`PHYS`, `simStep`, Spire's numbers: jump 3.37, 3.67 with the ledge pop, run 7.5, fixed 120 Hz step, so the frame rate never changes the physics), parts (upright boxes and cylinders, filed in a 6 × 6 xz grid for collision; moving by `line`, `spin` or `orbit`; timed, crumbling, lethal, bouncy, conveyors, ladders, low-gravity zones; and for levels 9–13: `ice` (slippery: you speed up and stop slowly, `PHYS.ICE_ACC`/`ICE_DEC`), the move types `swing` (a pendulum: platforms and blades that stay level, hanging `len` below a pivot) and `roll` (one way at a steady speed, then round again: the temple's boulder), ladders (trusses) that move and carry you while you hang on (stick off = hang, stick into it = climb), `tp` portals (`[x, y, z, yaw]`: where they send you; put the arrival point a little above the floor), zones `cold` (you freeze after `PHYS.COLD` seconds in it, shown as a Warmth bar) and `warm` (a fire thaws you), and `slide` crates (one shove and they slide until something stops them); and for World 2's last three: zones `wind` (`wind: [vx, vz]`, blows you along on the ground and in the air, in gusts when `timed`; white streaks show it, fainter just before a gust; the bot leans into it), the lever button `{toggle}` (flips a flag on and off, for scenery that swaps with `onIf`/`offIf`) and `B.all(flags, set)` (a flag that comes on once all of its flags are: the museum's vault), plus level options `sea` (a molten sea to the horizon instead of the lawn) and `msgs`/`unlock` (a level's own feed messages and Unlocked! banners)), the puzzle parts and `logicStep`/`useBtn`/`tryCode`, the level library (`LEVELS`, each with a `par` target time and a `build` that also writes the checking bot's route) and the bot; it has no DOM or Three.js in it, so a Node test can run it on its own. **Puzzles are flags** in the level's state `W.st.f`: a part with `door: 'flag'` is solid until the flag is on (a number means "on until that time": timed gates); `onIf`/`offIf` make a part exist only while a flag is on/off (the space bridge, the Warden's arms); `lock: 'item'` opens a door when you come near carrying the item; `item` parts are pickups (`key`, `card`, `fuse`, `gem`); `btn` parts are used with E / the USE button: `{set}` (a button), `{timed, dur}` (a valve), `{seq, sym}` (recipe buttons, pressed in the order `W.seqs[g].order`), `{pad}` (a keypad; the code is `W.codes[k]`, four digits from the level's seed), `{need, then}` (a fuse box), `{dial, key, n}` (turns one hand of the clock: `W.dials[g]` holds the target time, from the seed; all of a group's dials on target sets its flag), `{mirror}` (turns a mirror a quarter; `beamTrace` follows the moonbeam in `W.beams[g]` across the floor, and the beam reaching its target sets the flag); `plate` parts latch a pushed crate (`push`, kept inside `lim`, pushed along one axis at a time) and set their flag; `step` parts (`{seq, sym}`, the temple's stones) count when you land on them, in the order `W.seqs[g].order` (the mural shows it). The library's code is `W.codes.lib`, its digits shown on four coloured books in the order `W.books.lib`; the manor's right mirror is the colour `W.rose` (from the seed, like every other clue). Walls are 10 tall (22 in the low-gravity bay) so nothing standable gets you over them. Each level keeps the puzzle in its own copy for every player: there are no shared doors, so nobody can open or block anything for anyone else. **Stars**, saved in this browser under `escapade:prof` (`{best: {levelId: seconds}, st: {levelId: bits}, esc, deaths}`; bits 1 escaped, 2 beat `par`, 4 found the gem; the gem counts once found in any escaped run), by level id as always, so saves from before worlds came load as they were (8 escaped shows World 1 done and World 2 open; 13 shows World 2's first five done). The menus: Play carries on from the first level you haven't escaped; Worlds shows a card per world (name, stars of 24, how many escaped, locked or coming soon), then that world's eight levels. A level opens when you escape the one before it in its world; a world opens when you escape the last level of the one before it (or any of its own levels, say online). The menu counts escapes of 48 and stars of 144. Death (touching anything red and glowing, or falling) respawns you at your last checkpoint after 0.6 s; what you found and opened stays, crates not on their plate go home, crumbled tiles come back and timed gates shut (`softReset`). On your own the clock stops while paused or while the keypad is open. **Online**: each player writes only their own node `rooms/er-/players/`: `n, c, x, z, h, ts` as the shared rules require, plus `y`, `a` (animation), `j` (join time), `rr` (the round you're playing), `f` (your finish, `round:ms:server time`) and, from the room's leader only, `lr`/`ll`/`lt` (round number, level, start time). The leader is the live player who joined first (`Net.leader`); everyone else follows the leader's round, loading that level with a seed made from the round (so codes and recipes match for everyone) and running moving parts from `lt`, so all players see the same moving platforms. Late arrivals' own clocks start when they arrive. When everyone in the room is out (6 s later), or two minutes after the first escape, the leader starts the next level; the leader can also pick a level from the pause menu. If the leader leaves, the next one carries on with the same round. Other players are drawn with `../netsmooth.js` and only while they're in your round. Every value read from another node is checked (`onNode`). Each node also has `v`, its page's `CORE_VER`. The leader can pick any level in the worlds and levels it has opened itself (pause menu, Pick the room's level); everyone else loads that level's world file when they see the round (the round starts 4.5 s later, and a late loader's clock starts when it arrives), and a page that doesn't know the level shows the update notice. Pages from before worlds came (no `v`) only know levels 1–8 and simply don't follow a later level: the room list says they need to reload and the leader's feed names them. Keys are rebindable through `keybinds.js` (`keybinds:escapade`, actions `forward`, `back`, `left`, `right`, `jump`, `use`, `shiftLock`, `view`, `zoomIn`, `zoomOut`, `reset`). Touch: stick, JUMP, USE (green when something can be used), drag to look, pinch to zoom; shown only on touch screens. Other saved settings: `escapade:` `name`, `color`, `room`, `sens`, `invY`, `vol`, `mus`, `gfx`, `view`, `zoom`, `slock`. Leaderboards hooks: `BackRoomStats.add('escapes', 1)`, `max('cleared', n)` (levels escaped, up to 48), `max('stars', n)` (up to 144), `min('total', seconds)` (World 1's best total: the sum of its eight best times once they all have one, as before worlds came, so totals already on the board still compare; the menu calls it "World 1 total") and `min('total-w', seconds)` for each later world (`total-w2` … `total-w6` are in `stats.js`'s `LOWER`; the board has a row for each world). Ads follow the `AD_SLOT` pattern (empty). A test hook (`window.__er`, with `advance`, `frames`, `autopilot`, `depth`, `ensureWorld`) exists only when `navigator.webdriver` is set. **When changing a level**, keep the route in its `build` working and re-run the bot on it at several start times, and check that every puzzle door is still needed: with one door kept shut and all the others open, running, jumping and running jumps from everywhere reachable must not reach the exit (the checks used for this branch ran exactly that on all eight levels; levels 9–13 were checked the same way, with the search keeping the whole player state so rides on moving ladders count, and with each portal taken away in turn: the manor's right mirror and its last mirror are needed; World 2's last three too, with levers as part of the search: the theatre can't be crossed with its levers left either way, and its stage door, the lighthouse's beacon and the museum's vault and exit doors are all needed). Worlds 3–6 were checked the same way: the bot from the spawn and from every checkpoint at several seeds and start times, the search with each gate shut in turn (extended to swim, ride carts, carry keys and turn the turning rooms), random runners for clipping, draw calls, phones and an online room; the merged page still plays Worlds 1 and 2 exactly as before (same parts, codes and bot runs). The checking bot has route steps for the new things: `ladder` (a plan saying wait, grab, hang or climb), `dial`, `tp`, `kick` (a sliding crate) and `steps` (stepping stones, by way of a hub platform). **Spanish:** it loads `../lang.js` and its own words for the page and all six worlds in `escapade/es.js` (a new level's signs and messages need their Spanish added there, or they show in English); level and world names and the EXIT sign stay English. Every canvas made by `cvs()` passes its text through `TX()` while the language is Spanish, so the world files need no changes, and compass dials show N E S O. The puzzles are codes, colours, clocks and pictures, not English words, so none is English-only. EN | ES switch next to Controls. - `e63334287a3deaa3/odd-one-out/`: Odd One Out (Back Room), Props vs Hunters (prop hunt) for up to 16 players (Three.js, Firebase Realtime Database rooms under `rooms/ph-…`, same project and rules as Rumble Karts; Quick match uses `rooms/ph-pub-1` to `ph-pub-4`; invite links go through the home page as `#ph-`). Props aim at an object and turn into an exact copy of it; hunters wait in a closed room during the hide time, then hunt with a hitscan rifle, and a shot that hits a real object is free by default (the host can switch a 3 or 5 HP penalty on in the lobby: `pen` in the settings; a penalty saved by an older page is ignored unless the host picked it again, `oddone-hostpen`). Props move by size, the smaller the slower: from 3.0 m a second for a cup through about 3.7 for a cardboard box and 3.9 for a bench to 4.3 for a sofa (`speed` where each object type is defined: 3.9 + 0.55 × log10(volume / 0.3), kept between 3.0 and 4.4; it used to be the other way round; the hunter runs at 5.2), so the hard-to-spot small ones can't also outrun anyone; health also goes by size (40 to 200) unless the host sets All 100. A match is 3 to 10 rounds and the hunters are picked so everyone takes turns (`newRound`, by how often each player has hunted, `hn`). Every object you can turn into is a type in `buildProps` (`defProp(id, name, parts)`, where parts are plain Three.js shapes merged into one geometry per material, with the origin in the middle of the base and the front facing +z); a map draws its copies of a type as instanced meshes (`buildInstances`) and a disguised player draws the very same geometries and materials (`propModel`), so the two can't be told apart, and both use the type's own box for collisions and shots. Health scales with the type's size (40 to 200) unless the host picks All 100. To add a type, add a `defProp` line (and `{elig: false}` for things players shouldn't turn into); to add a map, write a `build…` function with the `Builder` helpers (`box` for walls and fixed furniture, `at` for turned furniture, `place(id, x, z, yaw, y)` for turnable objects, `kit` for walls with doors, floors, ceilings and lights, `hunterRoom` for the waiting room outside the map) and add it to `MAPS`; keep every placed object where a player can walk up to it. Like Chromaflage, everything travels through each player's own node at `rooms/ph-/players/`, because the shared rules expect `n, c, x, z, h, ts` there and refuse other paths for new prefixes: position and look (`y`, `p` aim pitch, `d` the type you've turned into), the last shot (`sh`, for tracers), running hit totals for the round (`hd`: `round|uid:hits,…|hits on real objects|session`, where the session is when that browser joined, so a reload starts the totals again) and, from the host, the round state as JSON in `rs` with host number `he`. The host (newest host number, else whoever has been in the room longest, and only once the room's players have loaded) runs the phases (`lobby`, `hide`, `hunt`, `end`, `over`) and works out health from the hit totals, checking them loosely (the shooter must be a living hunter, the target a living prop within 90 m, and no more hits than the rifle could fire); if it leaves, the next player carries on from the last round state it saw and counts the totals it can already see as done. Each browser reports its own hits, so it isn't cheat-proof. Anything read from another player's node is untrusted: a round state is rebuilt by `sanitizeRS` (only the fields the page uses, numbers clamped, player and prop ids checked; match settings kept in range by `cleanSet`), so a new field in the round state has to be added there too, and anything from a node that goes into the page as HTML must be escaped (`esc`) or turned into a number first. The round state goes out whole every time it changes (1-2 KB with 16 players) and during a hunt it changes with every hit, so the host coalesces hit-driven changes (health `hf`, eliminations `el`, finds `k`) to at most 4 publishes a second (`Net.rsDue`; a new phase or round goes straight away); the shape of `rs` is unchanged, so old and new hosts and guests mix freely. A tab in the background keeps its node fresh (and, if it's the host, the round moving) with a one-second timer; a player whose page stops altogether stops counting after 12 s but stays drawn where it was for up to a minute. Sounds a hiding prop makes go through `propSfx`, which keeps them from hunters in the waiting room. Pings are worked out on every screen from the hunt's start time (every 10–30 s, every 10 s in the last minute) and play from each prop's position. Points: 100 per prop found, 10 per 15 s survived, 150 for surviving the round and 50 to everyone on the winning team. Late joiners watch the hunters until the next round; players who are out watch their own team (← →, or tap Next). Practice: Hunt practice against prop bots that copy an object standing in a group and park beside its twins, and Hide practice against hunter bots that notice movement, things out of place and pings (and now and then shoot a real object). Settings, name and keys are saved only in the browser (`oddone-…` and `keybinds:odd-one-out`). Parties can launch it (its row in `GAMES` in `party.js`). On touch screens the page adds `touch` to `body`; the `body.touch` rules near the end of the stylesheet place the HUD for phones upright or sideways (the touch buttons keep their places in their grid by hiding with `visibility`, see `updateTouch`). A test hook (`window.__ph`, with `advance(seconds)` to run the game without drawing) exists only when `navigator.webdriver` is set. **Where players may stand:** the `kit` helpers tag what they build (`kind`: `floor`, `wall`, `fence`, `ceil`; everything else from `box` is furniture, `fix`), and `standRules` (run by `Builder.finish`) turns that into rules every map gets for free: each ceiling is an indoor area whose height limit is the top of its tallest furniture or object base plus 0.12 m (outdoors: 0.3 m under the lowest roof); tops of walls, fences and ceilings, anything above its area's limit, and other players are caps (`b.cap`): `groundAt` never stands you on one and `pushOut` slides you off it, as if it were a wall. You also can't stand where your head would be in the ceiling, ceilings only stop heads (they never push sideways), a long form can't straddle a thin wall (`spineHit`), movement is split into steps shorter than your radius (so a small prop on a slow laptop can't pass through a wall), and a form change (`tfCheck`, used by you and the bots) is refused ("No room to become that here") if it would move you through anything, up onto something higher, or out of bounds. **Out of bounds** (`oobAt`: off the map's floor, under it, on a cap, inside a wall, or more than 0.4 m above the height limit (`high`: a jump from the highest allowed spot is there for under half a second, so your own warning waits 0.6 s and other screens 1 s); the hunters' waiting room only counts for hunters while the props hide): on your own screen a one-line warning counts down from 3 and then puts you back where you last stood; everyone else draws (and can shoot) a player whose drawn position is out of bounds at the nearest walkable floor (`nearestAllowed`); and the host takes out anyone out of bounds for 5 s of a hunt, recording it in the round state's `ob` (kept by `sanitizeRS`) so the feed says "was out of bounds". Older pages ignore `ob` and show such an elimination as "Someone found …"; they don't warn their own player, but are drawn and timed out by newer pages like anyone else. Before these rules players got onto the Willow Lane roofs (up the shed's shelves, or onto a tall disguised player beside the house) and, as a small prop on high furniture next to an outside wall, up past the wall onto the roof (Willow Lane and Brightside Office). For whoever adds the next map, the reachability search used to check this asserts: from every spawn, walking, jumping (running, standing, straight up then over), jumping onto every object, fixture and other player (a tall helper with a low one beside it, on the floor and on furniture), changing form on the spot, beside walls and at the top of a jump, and walking into thin walls at 20 frames a second, no form reaches a wall, fence or ceiling top, a top above the height limit, anywhere off the floor, or another player's head; every raised spot a prop can stand on can be seen from somewhere a hunter can walk to; and 200 practice rounds with bots give no out-of-bounds warning. Landing also counts everything passed on the way down in a frame, so a fast fall at a low frame rate can't skip the floor, and a tab in the background sends its position once a second (so a hunter with a hidden tab isn't left "in the waiting room" when the hunt starts). **Graphics:** a custom tone curve (`CustomToneMapping`, patched into three's shader chunk: colours stay as painted and only the brightest part of each channel is eased off; a filmic curve was tried and greyed the cream walls and the sky) with a key light, fill and exposure per map, a sky dome with sun and clouds, light distance haze, glowing ceiling lights, skirting boards, door trims, soft darkening where walls meet floors and ceilings and under furniture, and a soft contact shadow under every object. The contact shadow is part of the object type (`t.blob`): real objects draw theirs in one instanced mesh per map and disguised players in another (`playerBlobs`, filled just before each render from where each player is drawn), with the same quad, material and matrix maths, so the two still can't be told apart (checked by rendering each type both ways at every quality level and comparing the pixels: like the objects themselves, which are drawn instanced for real ones and as plain meshes for players, they differ only by rounding, at most a few dozen edge pixels per type). Quality (`oddone-gfx`): Low (`fast`, as the old Fast: no shadow maps, sharpness up to 1.1, and none of the tone curve, sky dome, haze, light glow, darkening decals or contact shadows, `applyExtras`), Medium (`med`, everything with a 1024 shadow map, up to 1.35) and High (`high`, a soft 2048 shadow map, up to 1.75, as the old Pretty). Whatever is left out is left out for real objects and disguised players alike. With nothing saved, touch screens start on Low and computers on High, stepping down a level by themselves if the first 4 s of play run slower than about 30 frames a second. **The hunter** (`HG`, `hunterModel`) is a toy figure built in code from rounded boxes (`rbox`), spheres and cylinders: navy jumpsuit, hi-vis vest with two pale bands, pack with an aerial, helmet with an orange band, dark goggles, and a rifle with an orange tip. Its shapes are joined into one geometry per material (`joinGeos`), so a hunter is 16 meshes and about 2,900 triangles; the legs, the arms and the rifle are still separate parts because they swing, aim and kick back. It stands on the floor (the old figure hung 36 cm above it) and is still 1.87 m to the top of the helmet, with the muzzle where it was, so the camera, tracers and aim are unchanged; hunters are never shot at, so there is no hit box to keep in step. On Medium and High it has its own soft contact shadow (a child of the model, not in `playerBlobs`, which is only for disguised players). Nothing about the hunter touches the objects or the players disguised as them. **Shots:** on Medium and High the tracer has a soft glow, the muzzle a short cone of flame and a halo, and every shot leaves a quick pale ring where it lands; the ring is the same colour whatever was hit, so it tells nobody anything new (the sparks were already yellow on a disguised player and still are). Low keeps the plain line and dot. **Menu backdrop:** the camera looks slowly from side to side from a spot inside the chosen map (`menu` in `MAPS`: x, y, z, the way it faces and how far it turns) instead of circling above the roof; a new map needs a `menu` entry, or it falls back to the old circling view. **Turkey Week** (`../events.js`, November 15 to 26, 2026): five object types are drawn as Thanksgiving things, on the maps and as disguises alike (`TK_PROPS` in `tkProps`, used by `defProp`): beach ball as a pumpkin, the gift boxes as a pumpkin pie and a basket of apples, the wooden crate as a hay bale, the garden gnome as a turkey in a pilgrim hat. Each type's box, health and speed are still worked out from its usual parts, so players with the look on and off agree on everything but the picture. Object types are built once at page load, which is also when the game reads the one Turkey Week switch on the Back Room page (see `events.js` below); it has no button of its own. **Wardrobe (November 2026, captains only for now):** hunter outfits, hunter tools, prop taunts and catch poofs, all drawn and played in code by `wardrobe.js` beside the page. Nobody else can see it yet: `ODD_PUBLIC = false` and `wardOn()` asks `../captains.js` (`may(false, 'wardrobe', 'oddone-wardrobe')`), so it opens for the site's captains, or with `?wardrobe=1` on localhost or in an automated browser; to open it to everyone, change `ODD_PUBLIC` to `true`. For everyone else `wardrobe.js` is never fetched (the page asks for it only when `wardOn()` is true or another player arrives wearing something), `WD` stays `null` and the menu, saved data, node fields and draw calls are exactly as before. Captains get a Wardrobe button under their name on the menu and on the pause screen; every item is free and nothing is bought (the shop stays off). There are 14 outfits (Police Officer, Sheriff, Mall Cop, Security Guard, Detective, Store Manager, Janitor, Park Ranger, Exterminator, Construction Worker, Cowboy, Pirate, and the usual hunter with a Top Hat or a Traffic Cone in place of the helmet), 6 tools held in place of the rifle (Flashlight, Price Scanner, Flyswatter, Butterfly Net, Broom, Rubber Chicken), 8 taunts (Bike Horn, Squeaky Duck, Slide Whistle, Boing, Cuckoo, Kazoo, Doorbell, Party Blower) and 5 poofs (Cloud, Feather, Bubble, Star, Price Tag); their names and numbers are in `../cosmetics.js` under `odd-one-out`, and `wardrobe.js` keeps one list per slot in number order (never reorder: add at the end). What a captain wears is saved as `oddone-wear` (`[outfit, tool, taunt, poof]`) and travels in their own node as one short field, `cz`: `'outfit.tool.taunt.poof.count'`, checked strictly by `parse` (anything else is ignored, and a number this page doesn't know draws the usual hunter, rifle or burst); older pages ignore it. **Fairness:** outfits and tools are drawn only on hunters (`hunterModel(color, wear)`; a prop is still `propModel` and looks exactly like the real object whatever its player wears), they change no hit box, height, speed, camera, aim or reach (shots still come from the camera and tracers from the rifle's muzzle point), hats stay within 0.28 m of the head's centre line and tools within the rifle's own space below the line of sight (checked with rays through the crosshair at every pitch, aimed and not, on a laptop and an upright phone: none touches the hunter), every outfit keeps an orange hunter band on both arms and is no darker overall than the usual hunter, and the flashlight has a lit lens but no real light. An outfit hunter is 7 meshes (one vertex-coloured geometry each for the legs, body and arms, sharing one material, plus the tool, its accent and the contact shadow) instead of 16. **Taunts** didn't exist before, so they are strictly opt-in: nothing plays unless a captain prop with a taunt chosen presses T (only while T is bound to nothing else; the hint line shows it) or taps the Taunt button that appears beside Menu and Scores on a touch screen. It plays from the prop's position for everyone in range, like a ping, so it gives the prop away on purpose; hunters in the waiting room don't hear it (like every prop sound), and in Hide practice the hunter bots go after it as after a ping once the hunt is on. One every 10 s (`TAUNT_CD`), and other pages ignore a player's taunts closer together than 8 s (`TAUNT_GAP`); a taunt is the count in `cz` going up by one. **Poofs** play only when a prop is caught (`onElim`, in place of the usual confetti burst), chosen by the hunter who caught it, using the same small effect meshes as the burst. Pictures in the Wardrobe are rendered once with the game's own renderer into a small render target (no second WebGL context). A test hook: `__ph.WD` (the hooks, the item lists and `figShot`/`toolShot` for contact sheets) and `__ph.wdSync`. It has Spanish: its words, prop names and Wardrobe items are in `odd-one-out/es.js` (lang.js; map names and the signs inside the maps stay in English), with a Language switch in Settings and the pause menu; prop names are translated on each page when shown, never sent. - `e63334287a3deaa3/tumble-trials/`: Tumble Trials (Back Room), a knockout party show for up to 16 players (Three.js, Firebase Realtime Database rooms under `rooms/ko-…`, same project and rules as Rumble Karts; Quick match uses `rooms/ko-pub-1` to `ko-pub-4`; invite links go through the home page as `#ko-`). Every show, online or solo, starts with at least 16 contestants (`FIELD`): bots take the places players leave, so a room of 3 plays with 13 bots and a solo show is you and 15 bots; the host's Players setting only caps how many people play. A show is two to four rounds and a final: races (the first few across the line qualify; falling in the slime puts you back at the last checkpoint), survivals (no respawns; whoever is still up when the clock runs out or when only the qualifying number are left goes through) and a final for the crown. Two rounds come before the final in a Short show, three in a Normal one, four in a Long one (one fewer below 10 contestants, which can no longer happen at the start). `planShow` makes the plan from the show's seed so that shows differ: the order of races and survivals (never three of a kind running, never all one kind, so a show can open with a survival), how sharply each round cuts the field (each round gets a random weight, so one show goes 16→13→8→5 and another 16→9→6→4), whether 4, 5 or 6 reach the final, and which rounds are used; rounds the show before used come last in the draw, so a show only repeats one when it has run out of fresh ones. A round always sends on the number it promised: if fewer made it (a race that ran out of time, or several falling in the same moment of a survival), the places left go to whoever got furthest in a race or was knocked out last in a survival, and never fewer than two go on. `nextRound` follows who actually came through; if players leaving means no more are left than the final was planned for, the show goes straight to the final rather than play a round that could knock nobody out. A show can only start with one contestant in practice. Levels are built in code by the `build` functions in `LEVELS` with the `B` helpers (boxes, cylinders and spheres that are both the mesh and the collider; the meshes are the hitboxes, so what you see is what hits you): 23 rounds, only ever added at the end so the number the host sends for a round never changes: Whirligig Way, Teeter Tide, Gatecrash Gauntlet, Springboard Skyway, Swingset Straits, Piston Parade, Roly-Poly Rise, Log Jam Lane, Sink or Skip, Belt Bedlam, Blowhard Bridge, Going Up (lifts up a tower, with blocks at the side as the quick way for a good jumper), Barrel Roll Row (bridges that are turning barrels) and Ferry Frenzy (ferries that shuttle between docks, and two that meet mid-river) are races; Whirlwind Dish, Gap Rush, Colour Call, Bowled Over and Roller Rink (a roller chases everyone round a ring, faster all the time; the view turns with you, `L.orbit`) are survivals; Honeycomb Havoc, Last Spin, High Tide Hill and Crown Dash are finals. Crown Dash is a final marked `dash`: it is played like a race (`mechOf`: checkpoints, respawns) and the first bean to touch the crown as it dips wins, or whoever got furthest if the clock runs out; on Whirlwind Dish and Last Spin the low beam (0.08 to 0.58 m up) has to be jumped, and the high beam's underside (`HIGH_BEAM_Y`, 1.95 m) is well above a standing bean (1.6 m), so you can stand, run or dive under it but not jump into it; the Warm-up Yard is the lobby and menu backdrop and the Crown Stage the podium. Every moving obstacle's position is a function of the round clock (seconds since GO, from the server time offset) and the round's seed, so all players see the same hammers and walls without sending them: a level calls `vary(seed)` to shift the clock of every moving piece it builds (`Lvl.to`), or adds its own shift where bots read the timing too (stones, fans, lifts, ferries), and the sweepers take a seeded start angle and direction, so a round is not the same twice. Who stands where on the start grid is shuffled from the same seed; the seesaws react to weight, so the host runs them and sends their angles. Each player writes only their own node `rooms/ko-/players/`, because the shared rules expect `n, c, x, z, h, ts` there and refuse other paths for new prefixes: position and motion (`y`, `m`), look (`lk`: face, pattern, pattern colour), `rd` ready, `k` the round the position belongs to, `fin`/`out` ("show:round:ms" when you cross the line or drop out), `tt` the honeycomb tiles you touched, `gr`/`fr` grabbing and breaking free. The host (newest host number `he`, else whoever has been in the room longest, chosen only after the room has loaded) publishes the show as JSON in its own `rs` (phase, plan, roster, who qualified and who is out, in order; it goes out whole every time, so changes within a round are coalesced to at most 4 publishes a second, `Net.pubRS`/`flushRS`, while a new phase or round goes straight away; the shape of `rs` is unchanged), its bots in `bt`, seesaw angles in `sw`, and every touched tile in its `tt`; a tile vanishes a fixed delay after the earliest touch anyone reported. Guests treat the host's `rs` as untrusted: `sanitizeRS` rebuilds it field by field (known phases and levels, finite clamped numbers, ids of a safe shape, lists capped at 32, at most 24,000 characters) and drops it if anything doesn't fit, and names and colours from other players are escaped or validated before they reach the page. Guests also run the show on the host's clock (they measure the gap from the `ts` the host writes), and every browser rewrites its `ts` once a second even from a background tab, so a host who switches tabs isn't taken for gone. The host's browser runs the bots and decides qualification from the reports, so it isn't cheat-proof; if the host leaves, the next player carries on from the last show state and takes over the bots from where they were last seen (same traits, speed and checkpoint); a host that goes quiet without leaving is passed over after 4 s (`HOST_QUIET_MS`). `set.bots` is still sent (always 1) because pages from before the bots became permanent read it. A private room starts when everyone in it is ready (one player alone counts) or the host presses Start show; a public lobby starts 20 s after a second player arrives, or after 30 s with one. The physics is the game's own: a fixed 60 Hz step, a capsule of three spheres pushed out of boxes, cylinders and spheres, platforms that carry you, and knockback from the speed of whatever hit you. Bots follow each race's `path` of nodes and wait at `safe` nodes until the obstacles ahead will miss them; the same brain is the test autopilot. Node options a level can use: `w` width, `alt` side-by-side lanes a bot picks between, `xs` bounce pads (the node only counts once the pad has thrown the bot up), `safe` with `len` (how much of the way ahead has to be clear), `wait` (a test of the clock), `on` with `board` (a spot on a lift or ferry, walked to only while it can be boarded), `comp` (lean against a belt or a turning barrel), `near` (must be reached, not just passed). A bot that stops getting nearer its node hops, tries another line, backs off up the course and across, then goes back a node (`unstick`), and one whose jump will land short dives. No two bots are alike: skill comes with the roster, and nerve (how tight a gap it runs, how long it waits), pace and lane choice come from the show id and the bot's id, with a good or bad round from the round number (`botTraits`), so whoever takes the bots over works out the same ones. Keys are rebindable through `keybinds.js` (saved as `keybinds:tumble-trials`). On computers, clicking the game captures the mouse (Pointer Lock) and moving it turns the camera with no button held; a "Click to look" hint shows while it isn't captured, and the click that captures it doesn't also grab. Esc, the pause menu, the main menu, results and podium cards and the Controls panel let go of it (Esc in the online lobby only frees the mouse for the lobby panel; a second Esc opens the menu). A refused capture (Chrome refuses one within about a second of Esc) is only counted: after three in a row the hint goes and drag-to-look carries on, but every click still tries again. A two-finger trackpad scroll (or mouse wheel) also turns and tilts the camera; a pinch is swallowed so the page doesn't zoom. Sensitivity (Settings and the pause menu) scales mouse, scroll and touch look and is saved as `tumble-sens`, clamped to 0.2–3 (anything unreadable loads as 1). The camera comes in at once when a wall is between it and the bean and eases back out; static walls are found with a ray, and moving ones only if marked `camBlock` (Gap Rush's walls). In a race the count pill also says where you are running (`myPlace`), the intro card lists the show's running order, and being knocked out says where you finished. On touch screens the page adds `touch` to `body`: a stick, Jump, Dive and Grab buttons and drag-to-look, hidden while you watch or read a results card (`noctl`, `cardup`). Name, look, settings, best practice times and stats (shows, crowns, rounds qualified) are saved in the browser under `tumble-…`; nothing is stored online between shows. Parties can launch it (its row in `GAMES` in `party.js`). A test hook (`window.__ko`, with `advance(seconds)`) exists only when `navigator.webdriver` is set. **Closet (November 2026, hidden: captains only for now):** extra looks worn on top of the look everyone already has: 10 colours, 6 premium colours (gold, chrome, glow in the dark, see-through jelly, a slow rainbow shift, bubblegum with sprinkles), 9 patterns, 9 pairs of underpants (painted over the lower body as a clean, silly joke; the last pair is worn on the head instead), 14 hats, 6 face extras, 12 costumes, 6 victory dances (danced instead of the cheer when you qualify from a race or win the crown), 6 fall screams made with Web Audio (heard as a bean drops towards the slime, quieter far away) and 5 knockout splashes (as well as the slime splash). `CLOSET_PUBLIC = false` and `closetOn()` near the top of the script (which asks `../captains.js`, with `?closet=1` as the test switch) decide whether a Closet button shows under the look on the menu card; for everyone else the menu, saved data, node fields and draw calls are as before. Everything is drawn by `closet.js` beside the page, fetched only when this player may open the Closet or a player in the room wears a kit; until then `CL` is null and every hook does what it always did. A kit is ten item numbers (the `no` of Tumble Trials' items in `../cosmetics.js`: colour, premium colour, pattern, underpants, hat, face, costume, dance, scream, splash), saved as `tumble-kit` and sent in the player's own node as `ck` (`'3.0.5.0.12.0.0.2.1.0'`, written only while one is worn; `kitOf` checks it strictly, a number `closet.js` doesn't know draws nothing, and older pages ignore the field); bots never wear one. Looks only: colours, patterns, underpants, face extras and a costume's paint go on the bean's existing skin canvas; a hat, the head undies or a costume's shape is one merged mesh per item shared by every bean (one more draw call, and it hides the Turkey Week hat, so none more while that is on; the propeller beanie, the fishbowl and the astronaut's bubble add one more); a premium colour gives the bean its own material, and the rainbow repaints its skin five times a second. The collider, size, speed and name tag are untouched: a costume is drawn around the same body and the face always shows. The Closet hides the menu and stands your bean in the yard beside its panel (below it when the screen is upright); drag to turn it, and choosing a dance, scream or splash plays it. The test hook adds `CL`, `closetOn`, `closetLoad`, `kitOf`, `kitStr` and `myKitNow`. **Turkey Week** (`../events.js`, November 15 to 26, 2026): every bean wears a pilgrim hat (hidden under the winner's crown): one shared hat geometry and material from `events.js` (`tkHat`), one extra draw call each. The game reads the one Turkey Week switch on the Back Room page (see `events.js` below) once, when it loads (off means no hats are made); it has no button of its own. **Spanish:** it loads `../lang.js` and its own words (and the Closet's) in `tumble-trials/es.js`; round and bot names stay English, the show's calls, round descriptions, lobby and results are translated. Text drawn or built in code uses `TRN()` (`TX` is the textures here); the results stamp shows `data-stamp-label` (the stamp's translation) while `data-stamp` keeps the English value the CSS keys on. Nothing translated is sent to the room. EN | ES switch in Settings and the pause card. @@ -100,7 +100,7 @@ Personal site hosted with GitHub Pages at **https://ascoding11.github.io**, the - **Earning: off on purpose (19 Nov 2026).** Coins come from real money only: `PLAY_PAYS = false` and `WELCOME = 0` in `wallet.js`, so playing pays nothing and there is no welcome gift (the shop's Wallet tab says so). What follows is how earning works if `PLAY_PAYS` is ever set back to true. Play pays mangos through stats.js's existing hooks. `wallet.js` wraps `BackRoomStats.add/max/min` in the page and in a hub page's game frames, and pays from `EARN`: mangos per unit for counts, per call for bests, and a daily cap per game by the browser's date. Every change is logged in `wallet:log` (the last 200). There's a one-time 20-emerald welcome gift when the shop first opens. - **Rarities and prices.** Five rarities, priced the same for skins, accessories and every game item (`PRICE` in `cosmetics.js`, whole mangos): common 60 ($0.50), uncommon 119 (7 emeralds, $0.99), rare 420 (24 emeralds 12 mangos, $3.49), epic 600 (35 emeralds 5 mangos, $4.99) and legendary 1,200 (70 emeralds 10 mangos, $9.99). Every item can be bought on its own from the shop's Locker (`buy('item:')`), including the game items described above as "in no pack"; only items with `give` (handed over by their game) are not sold. Uncommon was added on 19 Nov 2026 by one rule, so the owners can move items later: common, epic and legendary items stayed as they were; of the items that were rare, within each group in file order (skins by theme, accessories by slot, game items by game and slot) the first half, rounded up, became uncommon and the rest stayed rare. For skins that left only one rare (Winter Frost), so every rare chest roll would give the same skin; four were put back to rare by hand (Circuit Scout, Red Fox, Autumn Ember, Magma Walker). Skins are now 12 common, 4 uncommon, 5 rare, 6 epic, 3 legendary; accessories 8, 6, 3, 5, 1; game items 265, 141, 115, 168, 33. Every rarity must keep at least one skin, or a chest roll of that rarity can't be paid out. - **Catalogue.** `SKINS` has 30 skins in the five rarities above. Each has an avatar look and a 3D colour set `colors {body, accent, trim, emissive, pattern}`, and `texture(id, size)` paints the pattern on a canvas. `ACCESSORIES` has 23, one per slot `hat, glasses, cape, trail, aura, pet` worn with any skin; each has a `three` description (`attach, shape, color, color2, size`) for 3D games. All of them are drawn in code. Item `no` numbers are permanent. - - **Game items.** `GAME_ITEMS` holds looks worn inside one game instead of on the avatar; today they are Boostball's 99 (31 decals, 27 boost trails, 21 goal explosions, 6 antenna toppers, 6 roof hats, 4 sets of wheels, 4 engine sounds; see Boostball's Kit above) and Slipstream's 76 (the next point). One entry per game in `GAMES` gives its name, id prefix and slots. Each has its game, one of that game's slots (`GAMES`), a number `no` that is permanent within its game and slot (the game sends it to other players and draws by it, so add new ones at the end and never renumber), a rarity that sets its price (`PRICE`, above) and two colours for the small picture `itemSvg()` draws. They are sold in packs of kind `items` (19 Boostball packs and 8 Slipstream packs, each priced at the sum of its items; shown under "Boostball packs" and "Slipstream packs" in the shop), worn with `equip(id)` and taken off with `unequip('boostball:decal')`, shown in the shop's Locker under their own chips, and read by the game with `gameEquipped('boostball')`. They are not mirrored into the Google account yet (`w.a` holds at most 128 item numbers, and a new field in `w` needs the rules checked with a signed-in account), so they stay in the browser that bought them. Driftfall's 89 (16 outfits, 8 backpacks, 24 gliders, 6 glider trails, 19 gun skins, 6 build skins, 6 emotes, 4 victory poses; game `drop-zone`, prefix `dz`) are worn from the game's own Locker by captains only and are in no pack: see Driftfall's Locker extras above. Spire's 37 (33 outfits and 4 celebrations; game `spire`, prefix `sp`) are worn from the game's own Wardrobe by captains only and are in no pack; the outfits are drawn by `outfits.js` (see Spire above). + - **Game items.** `GAME_ITEMS` holds looks worn inside one game instead of on the avatar; today they are Boostball's 99 (31 decals, 27 boost trails, 21 goal explosions, 6 antenna toppers, 6 roof hats, 4 sets of wheels, 4 engine sounds; see Boostball's Kit above) and Slipstream's 76 (the next point). One entry per game in `GAMES` gives its name, id prefix and slots. Each has its game, one of that game's slots (`GAMES`), a number `no` that is permanent within its game and slot (the game sends it to other players and draws by it, so add new ones at the end and never renumber), a rarity that sets its price (`PRICE`, above) and two colours for the small picture `itemSvg()` draws. They are sold in packs of kind `items` (19 Boostball packs and 8 Slipstream packs, each priced at the sum of its items; shown under "Boostball packs" and "Slipstream packs" in the shop), worn with `equip(id)` and taken off with `unequip('boostball:decal')`, shown in the shop's Locker under their own chips, and read by the game with `gameEquipped('boostball')`. They are not mirrored into the Google account yet (`w.a` holds at most 128 item numbers, and a new field in `w` needs the rules checked with a signed-in account), so they stay in the browser that bought them. Driftfall's 89 (16 outfits, 8 backpacks, 24 gliders, 6 glider trails, 19 gun skins, 6 build skins, 6 emotes, 4 victory poses; game `drop-zone`, prefix `dz`) are worn from the game's own Locker by captains only and are in no pack: see Driftfall's Locker extras above. Spire's 37 and Turbo Trail's 37 (each 33 outfits and 4 celebrations; games `spire` and `turbo-trail`, prefixes `sp` and `tr`) are worn from each game's own Wardrobe by captains only and are in no pack; the outfits, the same in both, are drawn by `outfits.js` (see Spire and Turbo Trail above). - **Game items: Slipstream.** Slipstream's 76 are 15 sponsors, 23 liveries (8 patterns and the 15 sponsors' own), 23 helmets, 8 boost effects, 5 tyre smoke colours and 2 podium celebrations. The 38 that are sold come in the eight Slipstream packs (the Garage in the game buys the same packs). The other 38 are in no pack and carry `give`: `'free'` (the sponsors and the eight plain helmets: anyone may wear them, and the game puts one in the locker the first time it is worn) or `'earned'` (a sponsor's livery, handed over when its challenges are finished); `grant(id)` adds one of these and refuses anything that is sold. Worn with `equip(id)`, taken off with `unequip('slipstream:livery')`, read by the game with `gameEquipped('slipstream')`; the game draws them (`slipstream/garage.js`), and its page loads `cosmetics.js` and `wallet.js` itself so its Garage can buy. Kept in `cosmetics:v1` (`g`, `ge`) and not mirrored into the account yet (this browser only). - **Chests** (called draws inside the code: pack ids `draw-1/5/10`, kind `draws`, `draw()`). A chest costs 7 emeralds (119 mangos; 5 chests 35 emeralds, 10 chests 70, no discount), is bought with emeralds only, and gives one random skin. Odds are weights out of 10,000, shown in the shop next to the chest: common 6,000 (60%), uncommon 2,000 (20%), rare 1,250 (12.5%), epic 500 (5%), legendary 250 (2.5%). They are picked with an unbiased whole-number roll: `crypto.getRandomValues` in play, `seeded(n)` in tests. A duplicate gives back 48 mangos (40% of a chest, rounded). - **Packs.** `PACKS` holds what is bought with emeralds, with prices in whole mangos: chests (1, 5 and 10), themed skin packs, accessory packs and game item packs. Every pack of items costs the sum of its items' prices. `buy(id)` (a pack id, or `item:` for one item) checks the wallet, takes the mangos, fills the locker and refunds duplicates; something already fully owned is refused, and an emerald pack id is refused with reason `money`. diff --git a/e63334287a3deaa3/cosmetics.js b/e63334287a3deaa3/cosmetics.js index 8671f59e..ad98e492 100644 --- a/e63334287a3deaa3/cosmetics.js +++ b/e63334287a3deaa3/cosmetics.js @@ -255,6 +255,7 @@ 'odd-one-out': { name: 'Odd One Out', prefix: 'oo', slots: [['outfit', 'Hunter outfits'], ['tool', 'Hunter tools'], ['taunt', 'Prop taunts'], ['poof', 'Catch poofs']] }, 'drop-zone': { name: 'Driftfall', prefix: 'dz', slots: [['outfit', 'Outfits'], ['pack', 'Backpacks'], ['glider', 'Gliders'], ['trail', 'Glider trails'], ['wrap', 'Gun skins'], ['build', 'Build skins'], ['emote', 'Emotes'], ['victory', 'Victory poses']] }, spire: { name: 'Spire', prefix: 'sp', slots: [['outfit', 'Outfits'], ['cheer', 'Celebrations']] }, + 'turbo-trail': { name: 'Turbo Trail', prefix: 'tr', slots: [['outfit', 'Outfits'], ['cheer', 'Celebrations']] }, }; var GAME_ITEMS = [], ITEM_BY_ID = {}; function I(game, slot, no, name, rarity, c1, c2, desc) { @@ -1053,6 +1054,46 @@ I('spire', 'cheer', 2, 'Treasure', 'uncommon', '#FFD23F', '#E8343C', 'Gold, ruby and emerald confetti and a shower of gold sparks.'); I('spire', 'cheer', 3, 'Circuit Sparks', 'rare', '#5CE1FF', '#B6FF5C', 'Rings of cyan and green sparks instead of confetti.'); I('spire', 'cheer', 4, 'Fireworks', 'epic', '#FF5E6C', '#4C8DFF', 'Three bursts high overhead, one after another.'); + // ---- Turbo Trail items ---- + // Turbo Trail: 33 outfits for the blocky runners (the same outfits, with the same numbers, as the other two parkour games; + // drawn by ../outfits.js) and 4 celebrations, worn from the game's Wardrobe by captains only (in no pack; see turbo-trail/wardrobe.js). + I('turbo-trail', 'outfit', 1, 'Striker', 'common', '#FF5E6C', '#FFFFFF', 'A football kit in your colour: V-neck, number 9 on the back, white shorts.'); + I('turbo-trail', 'outfit', 2, 'Hoops', 'common', '#3B82F6', '#FFFFFF', 'A sleeveless basketball jersey, long shorts, a headband and high socks.'); + I('turbo-trail', 'outfit', 3, 'Gridiron', 'uncommon', '#22C55E', '#FFFFFF', 'Helmet with a face mask, big shoulder pads and a number 7.'); + I('turbo-trail', 'outfit', 4, 'Slugger', 'common', '#F7F5EE', '#F59E0B', 'A pinstriped baseball jersey, a cap, grey trousers and a glove.'); + I('turbo-trail', 'outfit', 5, 'Puck Hound', 'uncommon', '#A855F7', '#20222C', 'A thick striped hockey jersey, a caged helmet and skates.'); + I('turbo-trail', 'outfit', 6, 'Ace', 'common', '#FBFBFD', '#14B8A6', 'A white tennis polo with a coloured collar, headband and wristbands.'); + I('turbo-trail', 'outfit', 7, 'Champ', 'uncommon', '#D6262E', '#F4F4F6', 'Big red boxing gloves, a headguard and shiny shorts.'); + I('turbo-trail', 'outfit', 8, 'Sprinter', 'common', '#FF5E6C', '#FFFFFF', 'A running vest with a race number pinned on, and bright spikes.'); + I('turbo-trail', 'outfit', 9, 'Lap Swimmer', 'common', '#3B82F6', '#4FD0FF', 'A swim cap, goggles and a swimsuit in your colour.'); + I('turbo-trail', 'outfit', 10, 'Fairway', 'uncommon', '#22C55E', '#E9E2CF', 'A flat cap, an argyle jumper, checked trousers and one white glove.'); + I('turbo-trail', 'outfit', 11, 'Kickflip', 'common', '#F59E0B', '#20222C', 'A hoodie, a cap on backwards, baggy jeans and pads for the falls.'); + I('turbo-trail', 'outfit', 12, 'Wave Rider', 'rare', '#20222C', '#14B8A6', 'A wetsuit with a coloured flash and a surfboard on your back.'); + I('turbo-trail', 'outfit', 13, 'Slope Star', 'uncommon', '#FF5E6C', '#F4F4F6', 'A puffy ski jacket with a race bib, a helmet and orange goggles.'); + I('turbo-trail', 'outfit', 14, 'Pole Position', 'rare', '#3B82F6', '#FFFFFF', 'A striped race suit and a full helmet with a dark visor.'); + I('turbo-trail', 'outfit', 15, 'Referee', 'common', '#F7F7F9', '#16161C', 'Black and white stripes, a cap and a whistle on a cord.'); + I('turbo-trail', 'outfit', 16, 'Team Mascot', 'epic', '#B07A4A', '#F59E0B', 'A big friendly bear head on a team jersey. Fuzzy all over.'); + I('turbo-trail', 'outfit', 17, 'Black Belt', 'common', '#FBFBFD', '#16161C', 'A white karate suit, a black belt and a headband in your colour.'); + I('turbo-trail', 'outfit', 18, 'Tin Bot', 'common', '#A7B2BF', '#FFD54A', 'A tin-can robot with lamp eyes, an antenna and claw hands.'); + I('turbo-trail', 'outfit', 19, 'Android', 'epic', '#EEF2F8', '#5CE1FF', 'A sleek white android with glowing blue lines and a visor.'); + I('turbo-trail', 'outfit', 20, 'Mech Pilot', 'rare', '#5F6E52', '#FFB43A', 'A flight suit, a harness and a helmet with a radio aerial.'); + I('turbo-trail', 'outfit', 21, 'Pirate Captain', 'legendary', '#A3202A', '#E2B23A', 'A tricorn hat, a long red coat, an eye patch and a parrot.'); + I('turbo-trail', 'outfit', 22, 'Deckhand', 'common', '#1F3C78', '#D6262E', 'A striped shirt, a spotted bandana, an eye patch and bare feet.'); + I('turbo-trail', 'outfit', 23, 'First Mate', 'uncommon', '#4A2E1E', '#E8EDF4', 'A leather vest, a bandana, an eye patch and a shiny hook.'); + I('turbo-trail', 'outfit', 24, 'Ghost Pirate', 'epic', '#8FE3C0', '#D9FFF0', 'A pale, glowing pirate with an eye patch. Mostly harmless.'); + I('turbo-trail', 'outfit', 25, 'Roaring Twenties', 'rare', '#3A3D48', '#B8202C', 'A pinstripe suit, a fedora and two-tone shoes.'); + I('turbo-trail', 'outfit', 26, 'The Boss', 'legendary', '#20222C', '#5A4636', 'A long dark coat with a fur collar, a tall fur hat and gloves.'); + I('turbo-trail', 'outfit', 27, 'Tracksuit Tough', 'uncommon', '#22C55E', '#F2C230', 'A tracksuit with stripes, a flat cap and a big gold chain.'); + I('turbo-trail', 'outfit', 28, 'Bodyguard', 'uncommon', '#16161C', '#E8E8EE', 'A black suit, dark glasses and an earpiece.'); + I('turbo-trail', 'outfit', 29, 'Tuxedo', 'rare', '#16161C', '#FFFFFF', 'A black jacket, a white shirt front and a bow tie.'); + I('turbo-trail', 'outfit', 30, 'Business Suit', 'common', '#22325A', '#FF5E6C', 'A navy suit with a tie in your colour and a pocket square.'); + I('turbo-trail', 'outfit', 31, 'Star Wizard', 'epic', '#3B2F9E', '#FFD54A', 'A starry robe, a tall pointed hat and a long white beard.'); + I('turbo-trail', 'outfit', 32, 'Astronaut', 'rare', '#EEF0F4', '#FFB43A', 'A white space suit with a gold visor and a life-support pack.'); + I('turbo-trail', 'outfit', 33, 'Knight', 'legendary', '#B7C0CC', '#22C55E', 'Costume armour, a helm with a plume and a tabard in your colour.'); + I('turbo-trail', 'cheer', 1, 'Team Colours', 'common', '#FF5E6C', '#FFFFFF', 'Confetti in your own colour, lighter and darker, with white.'); + I('turbo-trail', 'cheer', 2, 'Treasure', 'uncommon', '#FFD23F', '#E8343C', 'Gold, ruby and emerald confetti and a shower of gold sparks.'); + I('turbo-trail', 'cheer', 3, 'Circuit Sparks', 'rare', '#5CE1FF', '#B6FF5C', 'Rings of cyan and green sparks instead of confetti.'); + I('turbo-trail', 'cheer', 4, 'Fireworks', 'epic', '#FF5E6C', '#4C8DFF', 'Three bursts high overhead, one after another.'); // Items a game hands over itself are in no pack: give is 'free' (anyone may wear it; the game grants it the first time it // is worn) or 'earned' (the game grants it when it is won). grant(id), below, only adds these. GAME_ITEMS.forEach(function (it) { if (it.game !== 'slipstream') return; if (it.slot === 'sponsor' || (it.slot === 'helmet' && it.no <= 8)) it.give = 'free'; else if (it.slot === 'livery' && it.no > 8) it.give = 'earned'; }); diff --git a/e63334287a3deaa3/outfits.js b/e63334287a3deaa3/outfits.js index 51ca7a88..f0c6d110 100644 --- a/e63334287a3deaa3/outfits.js +++ b/e63334287a3deaa3/outfits.js @@ -556,6 +556,7 @@ window.BlockFits = function (THREE) { if (av.__bf && av.__bf.no === no && av.__bf.T === T && !!av.__bf.ghost === !!opts.ghost) return no > 0; undress(av); if (!no) return false; + if (!av.__bfDispose) { const d = av.dispose; av.__bfDispose = true; if (d) av.dispose = function () { undress(av); return d.apply(av, arguments); }; } // the page's dispose() takes the outfit off first const def = OUTFITS[no], glow = Math.max(opts.glow || 0, def.glow || 0); const mat = opts.ghost ? material(glow, opts.ghost) : material(glow); const w = { no, T, ghost: opts.ghost, meshes: [], hidden: [], ghostMat: opts.ghost ? mat : null }; @@ -627,7 +628,7 @@ window.BlockFits = function (THREE) { function panel(opts) { if (!document.getElementById('bf-css')) { const st = document.createElement('style'); st.id = 'bf-css'; - st.textContent = '#bfWr{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));background:rgba(16,14,40,.55);font-family:inherit;color:#18163a}' + + st.textContent = '#bfWr{position:fixed;inset:0;z-index:2147481500;display:flex;align-items:center;justify-content:center;padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));background:rgba(16,14,40,.55);font-family:inherit;color:#18163a}' + '#bfWr[hidden]{display:none}#bfWr .bf-card{background:#fffaf2;border:3px solid #18163a;border-radius:20px;box-shadow:0 6px 0 #18163a;width:min(860px,100%);max-height:100%;display:flex;flex-direction:column;overflow:hidden}' + '#bfWr .bf-head{display:flex;align-items:center;gap:10px;padding:12px 14px 8px}#bfWr h2{margin:0;font-size:22px;line-height:1}#bfWr .bf-cap{font-size:11px;font-weight:900;background:#ffcf3d;border:2px solid #18163a;border-radius:999px;padding:2px 8px;white-space:nowrap}' + '#bfWr .bf-x{margin-left:auto;font:inherit;font-weight:900;font-size:15px;border:2.5px solid #18163a;border-radius:12px;background:#fff;padding:7px 14px;box-shadow:0 2px 0 #18163a;cursor:pointer;color:inherit}' + @@ -656,7 +657,9 @@ function panel(opts) { const RC = opts.rarity || {}; function showPrev(slot, no) { const s = slotOf(slot), it = s.items.find(i => i.no === no) || null, cs = root.querySelectorAll('.bf-pics canvas'); - s.draw(no, cs[0], false); if (s.back) { cs[1].hidden = false; s.draw(no, cs[1], true); } else cs[1].hidden = true; + if (!no && !s.drawNone) { // nothing worn, and no picture of the game's own look: an empty frame + cs[1].hidden = true; cs[0].width = 96; cs[0].height = 120; const g = cs[0].getContext('2d'); g.font = '900 44px system-ui,sans-serif'; g.textAlign = 'center'; g.fillStyle = 'rgba(24,22,58,.35)'; g.fillText('∅', 48, 76); + } else { s.draw(no, cs[0], false); if (s.back) { cs[1].hidden = false; s.draw(no, cs[1], true); } else cs[1].hidden = true; } q('.bf-name').textContent = it ? TX(it.name) : (s.noneName || TX('None')); q('.bf-rar').textContent = it ? TX(it.rarity.charAt(0).toUpperCase() + it.rarity.slice(1)) : ''; q('.bf-rar').style.color = it ? (RC[it.rarity] || '') : ''; q('.bf-desc').textContent = it ? TX(it.desc) : (s.noneDesc || ''); @@ -694,6 +697,19 @@ function panel(opts) { refresh() { if (!root.hidden) render(); } }; } +// a little picture of a celebration (1 to 4, 0 the usual confetti) for the Wardrobe, in colour T +function cheerIcon(no, cv, T) { + cv.width = 96; cv.height = 120; const g = cv.getContext('2d'); g.clearRect(0, 0, 96, 120); + T = T || '#ff5e6c'; + const pals = { 0: ['#ff5e6c', '#ffcf3d', '#2fd39a', '#4c8dff', '#7c5cff', '#f15bb5'], 1: [T, mixHex(T, '#ffffff', .55), mixHex(T, '#000000', .35), '#ffffff'], 2: ['#ffd23f', '#ffe98a', '#e8343c', '#2fd39a', '#4c8dff'], 3: ['#5ce1ff', '#b6ff5c'], 4: ['#ff5e6c', '#4c8dff', '#ffd23f'] }; + const pal = pals[no] || pals[0]; + if (no === 3) { pal.forEach((col, k) => { g.strokeStyle = col; g.lineWidth = 5; g.setLineDash([4, 6]); g.beginPath(); g.ellipse(48, 70 - k * 22, 40 - k * 6, 13 - k * 2, 0, 0, TAU); g.stroke(); }); g.setLineDash([]); return cv; } + if (no === 4) { pal.forEach((col, k) => { const x = 22 + k * 26, y = 34 + (k % 2) * 18; g.strokeStyle = col; g.lineWidth = 3.5; for (let i = 0; i < 10; i++) { const a = i / 10 * TAU; g.beginPath(); g.moveTo(x + Math.cos(a) * 5, y + Math.sin(a) * 5); g.lineTo(x + Math.cos(a) * 15, y + Math.sin(a) * 15); g.stroke(); } }); } + let s = no * 97 + 13; const r = () => (s = (s * 9301 + 49297) % 233280) / 233280; + for (let i = 0; i < (no === 4 ? 10 : 26); i++) { g.save(); g.translate(8 + r() * 80, (no === 4 ? 70 : 10) + r() * (no === 4 ? 44 : 104)); g.rotate(r() * 3); g.fillStyle = pal[i % pal.length]; g.fillRect(-5, -3.5, 10, 7); g.strokeStyle = 'rgba(24,22,58,.35)'; g.lineWidth = 1; g.strokeRect(-5, -3.5, 10, 7); g.restore(); } + return cv; +} window.BlockFits.panel = panel; +window.BlockFits.cheerIcon = cheerIcon; window.BlockFits.COUNT = COUNT; })(); diff --git a/e63334287a3deaa3/spire/wardrobe.js b/e63334287a3deaa3/spire/wardrobe.js index 0c5dccd1..27fe6899 100644 --- a/e63334287a3deaa3/spire/wardrobe.js +++ b/e63334287a3deaa3/spire/wardrobe.js @@ -80,17 +80,6 @@ function cheer(kit, x, y, z, n, color) { } // ---------------------------------------------------------------- the Wardrobe screen -function cheerIcon(no, cv) { - cv.width = 96; cv.height = 120; const g = cv.getContext('2d'); g.clearRect(0, 0, 96, 120); - const T = X.color || '#ff5e6c'; - const pals = { 0: ['#ff5e6c', '#ffcf3d', '#2fd39a', '#4c8dff', '#7c5cff', '#f15bb5'], 1: [T, mix(T, '#ffffff', .55), mix(T, '#000000', .35), '#ffffff'], 2: ['#ffd23f', '#ffe98a', '#e8343c', '#2fd39a', '#4c8dff'], 3: ['#5ce1ff', '#b6ff5c'], 4: ['#ff5e6c', '#4c8dff', '#ffd23f'] }; - const pal = pals[no] || pals[0]; - if (no === 3) { pal.forEach((col, k) => { g.strokeStyle = col; g.lineWidth = 5; g.setLineDash([4, 6]); g.beginPath(); g.ellipse(48, 70 - k * 22, 40 - k * 6, 13 - k * 2, 0, 0, TAU); g.stroke(); }); g.setLineDash([]); return cv; } - if (no === 4) { pal.forEach((col, k) => { const x = 22 + k * 26, y = 34 + (k % 2) * 18; g.strokeStyle = col; g.lineWidth = 3.5; for (let i = 0; i < 10; i++) { const a = i / 10 * TAU; g.beginPath(); g.moveTo(x + Math.cos(a) * 5, y + Math.sin(a) * 5); g.lineTo(x + Math.cos(a) * 15, y + Math.sin(a) * 15); g.stroke(); } }); } - let s = no * 97 + 13; const r = () => (s = (s * 9301 + 49297) % 233280) / 233280; - for (let i = 0; i < (no === 4 ? 10 : 26); i++) { g.save(); g.translate(8 + r() * 80, (no === 4 ? 70 : 10) + r() * (no === 4 ? 44 : 104)); g.rotate(r() * 3); g.fillStyle = pal[i % pal.length]; g.fillRect(-5, -3.5, 10, 7); g.strokeStyle = 'rgba(24,22,58,.35)'; g.lineWidth = 1; g.strokeRect(-5, -3.5, 10, 7); g.restore(); } - return cv; -} let panel = null; function openPanel() { const C = cos(); if (!C) return; @@ -99,7 +88,7 @@ function openPanel() { title: TX('Wardrobe'), note: TX('Captains only'), rarity: RC, slots: [ { id: 'o', name: TX('Outfits'), items: items('outfit'), back: true, drawNone: true, noneName: TX('Your climber'), noneDesc: TX('Your own colour and hat.'), draw: (no, cv, back) => BF.icon(no, X.color, back, 96, cv) }, - { id: 'c', name: TX('Celebrations'), items: items('cheer'), drawNone: true, noneName: TX('Usual confetti'), noneDesc: TX('The confetti everyone gets.'), draw: (no, cv) => cheerIcon(no, cv) } + { id: 'c', name: TX('Celebrations'), items: items('cheer'), drawNone: true, noneName: TX('Usual confetti'), noneDesc: TX('The confetti everyone gets.'), draw: (no, cv) => window.BlockFits.cheerIcon(no, cv, X.color) } ], worn: slot => look[slot], pick(slot, no) { diff --git a/e63334287a3deaa3/turbo-trail/es.js b/e63334287a3deaa3/turbo-trail/es.js index 1b05feba..80fa17da 100644 --- a/e63334287a3deaa3/turbo-trail/es.js +++ b/e63334287a3deaa3/turbo-trail/es.js @@ -92,3 +92,76 @@ if (window.BackRoomLang) BackRoomLang.add({ 'Shift lock': 'Shift lock', 'Keeps you facing where the camera looks': 'Te mantiene mirando hacia donde mira la cámara', 'Zoom in': 'Acercar', 'The mouse wheel zooms too': 'La rueda del mouse también hace zoom', 'Zoom out': 'Alejar' }); + +// The Wardrobe (wardrobe.js and ../outfits.js, captains only for now): item names and descriptions, the same as the +// game's items in ../cosmetics.js, and the screen's words. +if (window.BackRoomLang) BackRoomLang.add({ + 'Striker': 'Goleador', + 'A football kit in your colour: V-neck, number 9 on the back, white shorts.': 'Un uniforme de fútbol de tu color: cuello en V, el 9 en la espalda y pantalón blanco.', + 'Hoops': 'Aro', + 'A sleeveless basketball jersey, long shorts, a headband and high socks.': 'Una camiseta de básquet sin mangas, pantalón largo, vincha y medias altas.', + 'Gridiron': 'Emparrillado', 'Helmet with a face mask, big shoulder pads and a number 7.': 'Casco con máscara, hombreras grandes y el número 7.', + 'Slugger': 'Bateador', + 'A pinstriped baseball jersey, a cap, grey trousers and a glove.': 'Una camiseta de béisbol a rayas finas, gorra, pantalón gris y guante.', + 'Puck Hound': 'Cazadisco', + 'A thick striped hockey jersey, a caged helmet and skates.': 'Una camiseta gruesa de hockey a rayas, casco con rejilla y patines.', 'Ace': 'As', + 'A white tennis polo with a coloured collar, headband and wristbands.': 'Un polo blanco de tenis con cuello de color, vincha y muñequeras.', + 'Champ': 'Campeón', 'Big red boxing gloves, a headguard and shiny shorts.': 'Guantes de boxeo rojos y grandes, cabezal y pantalón brillante.', + 'Sprinter': 'Velocista', + 'A running vest with a race number pinned on, and bright spikes.': 'Una camiseta de atletismo con dorsal y zapatillas de clavos brillantes.', + 'Lap Swimmer': 'Nadador', 'A swim cap, goggles and a swimsuit in your colour.': 'Gorro de natación, gafas y traje de baño de tu color.', + 'Fairway': 'Calle de golf', + 'A flat cap, an argyle jumper, checked trousers and one white glove.': 'Gorra plana, suéter de rombos, pantalón a cuadros y un guante blanco.', + 'Kickflip': 'Kickflip', + 'A hoodie, a cap on backwards, baggy jeans and pads for the falls.': 'Buzo con capucha, gorra al revés, jeans anchos y protecciones para las caídas.', + 'Wave Rider': 'Surfista', + 'A wetsuit with a coloured flash and a surfboard on your back.': 'Un traje de neopreno con una franja de color y una tabla de surf en la espalda.', + 'Slope Star': 'Estrella de la pista', + 'A puffy ski jacket with a race bib, a helmet and orange goggles.': 'Una campera de esquí inflada con dorsal, casco y antiparras naranjas.', + 'Pole Position': 'Pole position', + 'A striped race suit and a full helmet with a dark visor.': 'Un mono de carreras a rayas y un casco integral con visera oscura.', + 'Referee': 'Árbitro', 'Black and white stripes, a cap and a whistle on a cord.': 'Rayas blancas y negras, gorra y un silbato colgado.', + 'Team Mascot': 'Mascota del equipo', + 'A big friendly bear head on a team jersey. Fuzzy all over.': 'Una gran cabeza de oso simpático sobre una camiseta del equipo. Peludo entero.', + 'Black Belt': 'Cinturón negro', + 'A white karate suit, a black belt and a headband in your colour.': 'Un traje blanco de karate, cinturón negro y una vincha de tu color.', + 'Tin Bot': 'Robot de lata', + 'A tin-can robot with lamp eyes, an antenna and claw hands.': 'Un robot de lata con ojos de lámpara, antena y manos de pinza.', + 'Android': 'Androide', + 'A sleek white android with glowing blue lines and a visor.': 'Un androide blanco y elegante con líneas azules brillantes y visor.', + 'Mech Pilot': 'Piloto de mecha', + 'A flight suit, a harness and a helmet with a radio aerial.': 'Un traje de vuelo, un arnés y un casco con antena de radio.', + 'Pirate Captain': 'Capitán pirata', + 'A tricorn hat, a long red coat, an eye patch and a parrot.': 'Un sombrero de tres picos, una casaca roja larga, un parche en el ojo y un loro.', + 'Deckhand': 'Marinero', + 'A striped shirt, a spotted bandana, an eye patch and bare feet.': 'Una camiseta a rayas, un pañuelo de lunares, un parche en el ojo y los pies descalzos.', + 'First Mate': 'Primer oficial', + 'A leather vest, a bandana, an eye patch and a shiny hook.': 'Un chaleco de cuero, un pañuelo, un parche en el ojo y un garfio brillante.', + 'Ghost Pirate': 'Pirata fantasma', + 'A pale, glowing pirate with an eye patch. Mostly harmless.': 'Un pirata pálido y brillante con parche en el ojo. Casi inofensivo.', + 'Roaring Twenties': 'Años veinte', + 'A pinstripe suit, a fedora and two-tone shoes.': 'Un traje a rayas finas, un sombrero fedora y zapatos de dos colores.', 'The Boss': 'El Jefe', + 'A long dark coat with a fur collar, a tall fur hat and gloves.': 'Un abrigo largo y oscuro con cuello de piel, un gorro alto de piel y guantes.', + 'Tracksuit Tough': 'Duro de jogging', + 'A tracksuit with stripes, a flat cap and a big gold chain.': 'Un jogging con rayas, una gorra plana y una gran cadena dorada.', + 'Bodyguard': 'Guardaespaldas', 'A black suit, dark glasses and an earpiece.': 'Un traje negro, lentes oscuros y un auricular.', 'Tuxedo': 'Esmoquin', + 'A black jacket, a white shirt front and a bow tie.': 'Un saco negro, la pechera blanca y un moño.', 'Business Suit': 'Traje de oficina', + 'A navy suit with a tie in your colour and a pocket square.': 'Un traje azul marino con corbata de tu color y pañuelo en el bolsillo.', + 'Star Wizard': 'Mago estelar', + 'A starry robe, a tall pointed hat and a long white beard.': 'Una túnica estrellada, un sombrero alto y puntiagudo y una larga barba blanca.', + 'Astronaut': 'Astronauta', + 'A white space suit with a gold visor and a life-support pack.': 'Un traje espacial blanco con visor dorado y mochila de soporte vital.', + 'Knight': 'Caballero', + 'Costume armour, a helm with a plume and a tabard in your colour.': 'Armadura de disfraz, un yelmo con penacho y una túnica de tu color.', + 'Team Colours': 'Colores del equipo', + 'Confetti in your own colour, lighter and darker, with white.': 'Confeti de tu propio color, más claro y más oscuro, con blanco.', + 'Treasure': 'Tesoro', + 'Gold, ruby and emerald confetti and a shower of gold sparks.': 'Confeti dorado, rubí y esmeralda y una lluvia de chispas doradas.', + 'Circuit Sparks': 'Chispas de circuito', + 'Rings of cyan and green sparks instead of confetti.': 'Anillos de chispas celestes y verdes en vez de confeti.', 'Fireworks': 'Fuegos artificiales', + 'Three bursts high overhead, one after another.': 'Tres estallidos en lo alto, uno detrás de otro.', 'Wardrobe': 'Vestidor', + 'Captains only': 'Solo capitanes', 'Outfits': 'Trajes', 'Celebrations': 'Festejos', 'Done': 'Listo', 'Common': 'Común', 'Uncommon': 'Poco común', + 'Rare': 'Raro', 'Epic': 'Épico', 'Legendary': 'Legendario', 'Usual confetti': 'Confeti de siempre', + 'The confetti everyone gets.': 'El confeti que tienen todos.', 'Your runner': 'Tu corredor', + 'Cap, goggles, backpack and scarf, in your colour.': 'Gorra, antiparras, mochila y bufanda, de tu color.' +}); diff --git a/e63334287a3deaa3/turbo-trail/index.html b/e63334287a3deaa3/turbo-trail/index.html index 3ffd76c1..e4112b37 100644 --- a/e63334287a3deaa3/turbo-trail/index.html +++ b/e63334287a3deaa3/turbo-trail/index.html @@ -5,6 +5,7 @@ + Turbo Trail @@ -1890,7 +1891,7 @@

Run complete!

function makeMe(){ if(G.av)G.av.dispose(); - G.av=makeAvatar(myColor); + G.av=makeAvatar(myColor);wrDressMe(); me=G.me=newPlayer(0,0,0,0);me.px=0;me.py=0;me.pz=0;me.ryaw=0; if(!myTrail)myTrail=makeTrail();myTrail.set(prog.trail); } @@ -1976,7 +1977,7 @@

Run complete!

for(const t of TRAILS)if(t.need>a&&t.need<=b){feed(''+T('Unlocked the {n} trail',{n:T(t.n)})+'');sfx('unlock')} } function finishRun(total){ - G.finishedRun=true;sfx('finish');confetti(me.x,me.y+2,me.z,120); + G.finishedRun=true;sfx('finish');cheerFx(me.x,me.y+2,me.z,120); const prev=prog.run,pb=!prev||totalRun complete! showResults(pb?(prev?'New best run!':'Run complete!'):'Run complete',prev?(pb?'Faster than your old best by '+fmt(prev.t-total):'Your best is '+fmt(prev.t)+' ('+fmtD(total-prev.t)+')'):'Your first full run. Now beat it.',fmt(total),rows,'run'); } function showAllDone(){ - sfx('finish');confetti(me.x,me.y+2,me.z,100); + sfx('finish');cheerFx(me.x,me.y+2,me.z,100); showResults('All 25 cleared!',golds()+' gold medals so far. Try a full run: every level on one clock.','★ '+totalStars()+' / 75',[], 'levels'); } // After a fall or a hazard: back to the start of the level a moment later. @@ -2185,7 +2186,7 @@

Run complete!

this.db.ref('.info/serverTimeOffset').on('value',s=>{this.offset=s.val()||0}); this.ready=true; }, - base(){return{n:myName||'Runner',c:myColor,x:r2(me.x),z:r2(me.z),h:r3(me.yaw),ts:Math.round(this.now()),y:r2(me.y),j:this.j,a:animCode(me),l:G.ci,r:G.rs?G.rs.id:0,f:'',tr:trailDef(prog.trail).id}}, + base(){const o={n:myName||'Runner',c:myColor,x:r2(me.x),z:r2(me.z),h:r3(me.yaw),ts:Math.round(this.now()),y:r2(me.y),j:this.j,a:animCode(me),l:G.ci,r:G.rs?G.rs.id:0,f:'',tr:trailDef(prog.trail).id};const wk=myKitStr();if(wk){o.wk=wk;this.wkSent=true}return o}, async count(room){ const s=await this.db.ref('rooms/'+room+'/players').once('value');let n=0; s.forEach(c=>{const v=c.val();if(c.key!==this.uid&&v&&this.now()-(+v.ts||0)Run complete! function onNode(uid,v){ if(!v||typeof v!=='object')return; const o={n:cleanName(v.n)||'Runner',c:/^#[0-9a-f]{6}$/i.test(v.c)?v.c:'#ff3d7f',j:+v.j||+v.ts||0,ts:Math.min(+v.ts||0,Net.now()+5000),rs:typeof v.rs==='string'?v.rs:'', - he:Math.min(Math.max(+v.he||0,0),1e9),f:typeof v.f==='string'?v.f.slice(0,40):'',r:+v.r||0,l:clamp(v.l|0,0,NL),tr:typeof v.tr==='string'?v.tr:'none'}; + he:Math.min(Math.max(+v.he||0,0),1e9),f:typeof v.f==='string'?v.f.slice(0,40):'',r:+v.r||0,l:clamp(v.l|0,0,NL),tr:typeof v.tr==='string'?v.tr:'none',wk:typeof v.wk==='string'&&/^\d{1,3}(\.\d{1,3}){0,3}$/.test(v.wk)?v.wk:''}; const was=Net.others.get(uid);Net.others.set(uid,o); if(o.rs&&o.he>G.maxHe)G.maxHe=o.he; let e=ents.get(uid); @@ -2264,6 +2265,7 @@

Run complete!

} e.seen=performance.now(); if(e.name!==o.n||e.color!==o.c){e.name=o.n;e.color=o.c;e.av.setColor(o.c)} + if(e.wk!==o.wk){e.wk=o.wk;if(o.wk&&!WR)wrLoad();else wrDressEnt(e)} // a Wardrobe kit (wardrobe.js): fetched only when someone wears one if(e.trail.id!==o.tr){const d=TRAILS.find(t=>t.id===o.tr)||TRAILS[0];e.trail.def=d;e.trail.id=d.id;e.trail.c0.set(d.cols[0]);e.trail.c1.set(d.cols[1])} if(isFinite(+v.x)&&isFinite(+v.z))e.tpos.set(clamp(+v.x,-2000,2000),clamp(+v.y||0,-200,500),clamp(+v.z,-2000,2000)); e.tyaw=+v.h||0;e.a=clamp(v.a|0,0,5);e.r=o.r; @@ -2342,7 +2344,7 @@

Run complete!

// finished: claim the time (the host lists it), and keep running the last level for fun G.finishedRace=true;const ms=Math.round(now*1000);G.myFinMs=ms;G.finRound=rs.id;G.ci=rs.cs.length; Net.upd({f:rs.id+':'+ms,l:G.ci}); - sfx('finish');confetti(me.x,me.y+2,me.z,90);banner('Finished!',fmt(ms/1000),2.4); + sfx('finish');cheerFx(me.x,me.y+2,me.z,90);banner('Finished!',fmt(ms/1000),2.4); enterLevel(rs.cs[rs.cs.length-1]); if(G.host)hostTick(); } @@ -2751,16 +2753,51 @@

Run complete!

if(inv&&!/^pub-/.test(inv[1])){$('room').value=inv[1];setMsg('You were invited to room sr-'+inv[1]+'. Press Play in room to join.');$('joinRoom').classList.remove('alt');$('joinRoom').classList.add('hot');$('quick').classList.remove('hot');$('quick').classList.add('alt')} if(touchUI)setTouchUI(true); +// ---------- the Wardrobe (captains only for now; README, "Turbo Trail") ---------- +// Outfits (drawn by ../outfits.js, shared with Spire and Escapade) and celebrations, in wardrobe.js beside this page. +// wardrobeOn() says whether this player may open it: WARDROBE_PUBLIC (the one line that opens it to everyone), one of +// the site's captains (../captains.js), or ?wardrobe=1 on localhost or in an automated browser (remembered for the tab; +// ?wardrobe=0 forgets it). The files are fetched only when it is true, or when a runner in the race wears a kit (then +// only outfits.js and wardrobe.js, to draw them); until then WR is null and every runner looks as before. +// Saved as turbotrail:wardrobe; online as `wk` in this runner's node, only while worn. +const WARDROBE_PUBLIC=false; +const CAPTAINS=window.BackRoomCaptains||null; +const wardrobeOn=()=>WARDROBE_PUBLIC||!!(CAPTAINS&&CAPTAINS.may(false,'wardrobe','turbotrail-wardrobe')); +let WR=null,wrAsked=false,cosAsked=false; +const myKit=()=>WR&&wardrobeOn()?WR.mine():null; +function myKitStr(){return WR?WR.kitStr(myKit()):''} +function wrDressMe(){if(WR&&G.av)WR.dress(G.av,myKit(),myColor)} +function wrDressEnt(e){if(WR&&e.av)WR.dress(e.av,WR.kitOf(e.wk),e.color,.6)} +function cheerFx(x,y,z,n){const k=myKit();if(!(WR&&k&&WR.cheer(k,x,y,z,n,myColor)))confetti(x,y,z,n)} +function wrApi(){return{THREE,store,emit,burst,ringFx,cover:()=>dustCover,get color(){return myColor},changed(){wrDressMe();wrSend()}}} +function wrSend(){if(!WR||!Net.refs)return;const s=myKitStr();if(s||Net.wkSent){Net.wkSent=!!s;Net.upd({wk:s||null})}} +const wrAdd=src=>new Promise((res,rej)=>{const e=document.createElement('script');e.src=src;e.onload=res;e.onerror=rej;document.head.appendChild(e)}); +function wrLoad(){ + // the names (../cosmetics.js) only for a player who may open the Wardrobe + if(wardrobeOn()&&!window.BackRoomCosmetics&&!cosAsked){cosAsked=true;wrAdd('../cosmetics.js').then(wrSync).catch(e=>{cosAsked=false;console.error(e)})} + if(wrAsked)return;wrAsked=true; + (window.BlockFits?Promise.resolve():wrAdd('../outfits.js')).then(()=>wrAdd('wardrobe.js')).then(()=>{ + if(!window.TurboWardrobe||!window.BlockFits)throw new Error('wardrobe did not load'); + WR=window.TurboWardrobe(wrApi());wrSync(); + }).catch(e=>{wrAsked=false;console.error(e)}); +} +function wrSync(){ + if(wardrobeOn())wrLoad(); + if(!WR)return; + WR.menu(wardrobeOn());wrDressMe();ents.forEach(wrDressEnt);wrSend(); +} +if(CAPTAINS)CAPTAINS.onChange(wrSync); + // Test hook (automated browsers only): step the simulation without waiting for frames, check levels, drive the runner. if(navigator.webdriver)window.__sr={G,PHYS,LEVELS,WORLDS,MEDALS,prog,get me(){return me},get trail(){return myTrail},ents,Net,onNode,KB,keys,tAct,tMove, advance(s){G.noRender=true;try{const n=Math.round(s/PHYS.DT);for(let i=0;i=G.respawnAt)respawnMe();if(G.W!==W&&G.respawnAt)respawnMe()}if(G.mode!=='online')G.tBase=performance.now()/1000-G.t}finally{G.noRender=false}}, respawnNow(){if(G.respawnAt)respawnMe()}, - buildLevel,runBot,makeBot,startLevels,startRun,startMode,toMenu,goOnline,setRS,newRace,hostTick,showPause,resume,enterLevel,selfReset, + buildLevel,runBot,makeBot,startLevels,startRun,startMode,toMenu,goOnline,setRS,newRace,hostTick,showPause,resume,enterLevel,selfReset,get WR(){return WR},wardrobeOn,wrSync,wrLoad,cheerFx, autopilot(on){G.auto=on?makeBot(G.W.route):null}, camRay,renderer,scene,camera,render(){renderer.render(scene,camera)}, frame(n,quiet){G.freeze=true;try{n=n||1;for(let i=0;i{d.av.dispose();d.tag.remove()});G.decoys=list.map(q=>{const av=makeAvatar(q.c,q.ghost||0);av.root.position.set(q.x,q.y,q.z);av.root.rotation.y=q.yaw||0;for(let i=0;i<30;i++)animate(av,q.a||0,q.a===1?12:0,1/30);const tag=document.createElement('div');tag.innerHTML=''+esc(q.n);$('tags').appendChild(tag);return{av,tag,q}})}, + decoys(list){(G.decoys||[]).forEach(d=>{d.av.dispose();d.tag.remove()});G.decoys=list.map(q=>{const av=makeAvatar(q.c,q.ghost||0);if(WR&&q.wk)WR.dress(av,WR.kitOf(q.wk),q.c,q.ghost||0);av.root.position.set(q.x,q.y,q.z);av.root.rotation.y=q.yaw||0;for(let i=0;i<30;i++)animate(av,q.a||0,q.a===1?12:0,1/30);const tag=document.createElement('div');tag.innerHTML=''+esc(q.n);$('tags').appendChild(tag);return{av,tag,q}})}, placeDecoyTags(){for(const d of G.decoys||[]){const v=_gv.set(d.q.x,d.q.y+2.5,d.q.z).project(camera);d.tag.style.transform='translate('+((v.x+1)/2*innerWidth).toFixed(1)+'px,'+((1-v.y)/2*innerHeight).toFixed(1)+'px) translate(-50%,-100%)'}}}; // A tab in the background gets no animation frames: a timer keeps the node's ts fresh (otherwise the others drop the @@ -2768,7 +2805,7 @@

Run complete!

setInterval(()=>{if(!document.hidden||!Net.refs)return;try{onlineTick();if(performance.now()-(Net.hbT||0)>2000)Net.upd({})}catch(err){console.error(err)}},1000); makeMe();renderSwatches();renderProfile();renderGfx();applyQuality(); try{document.fonts.ready.then(()=>{if(G.mode==='menu'&&G.W)loadWorld(G.W)})}catch(e){} -setupAttract();showAd('adMenu'); +setupAttract();showAd('adMenu');wrSync(); requestAnimationFrame(t=>{last=t;frame(t)}); })(); diff --git a/e63334287a3deaa3/turbo-trail/wardrobe.js b/e63334287a3deaa3/turbo-trail/wardrobe.js new file mode 100644 index 00000000..cb3496ca --- /dev/null +++ b/e63334287a3deaa3/turbo-trail/wardrobe.js @@ -0,0 +1,106 @@ +/* + * Turbo Trail: the Wardrobe (captains only for now; README, "Turbo Trail"). + * + * index.html fetches this file (with ../outfits.js, which draws the outfits) only when it is needed: this player may + * open the Wardrobe (WARDROBE_PUBLIC, one of the site's captains, or ?wardrobe=1 on localhost or in an automated + * browser), or a runner in the race wears something from it. ../cosmetics.js (the names) is fetched only for a player + * who may open it. The page calls window.TurboWardrobe(X) once with what it lends (wrApi() in index.html) and gets back + * the hooks it calls: dress() when a runner is made or changes colour, cheer() for the finish confetti, menu() to show + * or hide the Wardrobe button (in the Garage), and kitOf()/kitStr() for the race room. + * + * A kit is two item numbers, the `no` of Turbo Trail's items in ../cosmetics.js: an outfit (1 to 33, the same outfits + * as Spire and Escapade, drawn by ../outfits.js in the runner's own colour; it replaces the runner's cap, goggles, + * backpack and scarf) and a celebration (1 to 4: the confetti when you finish a race, a full run or the last level). + * 0 is none. Saved in this browser as turbotrail:wardrobe {o, c}. Online it is one optional field in the runner's own + * node, `wk`: "o.c", sent only while this player may open the Wardrobe and wears something; older pages ignore it, and + * a number this page doesn't know draws the plain runner. Other runners stay see-through ghosts in their outfits. The + * trails (the Garage's, unlocked with stars) are not touched. Looks only: the runner's collision is the physics' + * upright cylinder and never looks at the body. + */ +(function () { +'use strict'; +const TX = window.BackRoomLang ? BackRoomLang.t : s => s; +window.TurboWardrobe = function (X) { +const { THREE, store, emit, burst, ringFx } = X; +const BF = window.BlockFits(THREE); +const cos = () => window.BackRoomCosmetics || null; // the names: fetched only for a player who may open the Wardrobe +const GAME = 'turbo-trail', TAU = Math.PI * 2, CHEERS = 4; +const items = slot => cos() ? cos().gameItems(GAME, slot) : []; +const okO = n => Number.isInteger(n) && n > 0 && BF.has(n), okC = n => Number.isInteger(n) && n > 0 && n <= CHEERS; + +// ---------------------------------------------------------------- the kit +function kitOf(s) { + if (typeof s !== 'string' || !/^\d{1,3}(\.\d{1,3}){0,3}$/.test(s)) return null; + const p = s.split('.').map(Number), k = { o: okO(p[0]) ? p[0] : 0, c: okC(p[1]) ? p[1] : 0 }; + return k.o || k.c ? k : null; +} +const kitStr = k => k && (k.o || k.c) ? k.o + '.' + k.c : ''; +let look = (() => { const v = store.get('wardrobe', null); return v && typeof v === 'object' ? { o: okO(v.o) ? v.o : 0, c: okC(v.c) ? v.c : 0 } : { o: 0, c: 0 }; })(); +const save = () => store.set('wardrobe', { o: look.o, c: look.c }); + +// ---------------------------------------------------------------- dressing a runner +// ghost: the see-through-ness of another runner (the page draws them at 0.6); the outfit keeps the page's own light (glow) +function dress(av, kit, color, ghost) { + if (!av) return; + const o = kit && okO(kit.o) ? kit.o : 0; + av.__wr = { o, ghost: ghost || 0 }; + if (!av.__wrWrapped) { + av.__wrWrapped = true; + const sc = av.setColor; + av.setColor = function (c) { sc.call(av, c); av.__wrColor = c; if (av.__wr && av.__wr.o) BF.dress(av, av.__wr.o, c, { glow: .3, ghost: av.__wr.ghost || 0 }); }; + } + av.__wrColor = color || av.__wrColor; + BF.dress(av, o, av.__wrColor, { glow: .3, ghost: ghost || 0 }); +} + +// ---------------------------------------------------------------- celebrations (the page's own particles) +const _c = new THREE.Color(); +const mix = (a, b, t) => '#' + new THREE.Color(a).lerp(new THREE.Color(b), t).getHexString(); +function conf(x, y, z, n, pal) { for (let i = 0; i < n; i++) { _c.set(pal[i % pal.length]); const a = Math.random() * TAU, s = 2 + Math.random() * 6; emit(x, y, z, Math.cos(a) * s, 4 + Math.random() * 7, Math.sin(a) * s, 1.2 + Math.random(), .3, _c, 9, X.cover() ? 1 : 0); } } +function cheer(kit, x, y, z, n, color) { + const c = kit && okC(kit.c) ? kit.c : 0; if (!c) return false; + const big = Math.min(1.6, n / 100 + .4); + if (c === 1) { const T = color || '#ff3d7f'; conf(x, y, z, n, [T, mix(T, '#ffffff', .55), mix(T, '#000000', .35), '#ffffff']); burst(x, y, z, T, 20, 7); } + else if (c === 2) { conf(x, y, z, n, ['#ffd23f', '#ffe98a', '#e8343c', '#2fd39a', '#ffd23f', '#4c8dff']); burst(x, y, z, '#ffd23f', Math.round(34 * big), 8); } + else if (c === 3) { for (let k = 0; k < 3; k++) ringFx(x, y - 1.4 + k * .8, z, k % 2 ? '#b6ff5c' : '#5ce1ff', Math.round(28 * big), 5 + k * 1.6); burst(x, y, z, '#5ce1ff', Math.round(20 * big), 6); } + else { + ['#ff3d7f', '#35c8ff', '#ffcf3d'].forEach((col, k) => setTimeout(() => { const h = y + 4 + k * 1.5, dx = (k - 1) * 2.2; burst(x + dx, h, z, col, Math.round(44 * big), 8); burst(x + dx, h, z, '#ffffff', 10, 3); }, k * 260)); + conf(x, y, z, Math.round(n * .4), ['#ff3d7f', '#35c8ff', '#ffcf3d', '#ffffff']); + } + return true; +} + +// ---------------------------------------------------------------- the Wardrobe screen +let panel = null; +function openPanel() { + const C = cos(); if (!C) return; + const RC = {}; C.RARITY.forEach(r => { RC[r.id] = r.color; }); + panel = panel || window.BlockFits.panel({ + title: TX('Wardrobe'), note: TX('Captains only'), rarity: RC, + slots: [ + { id: 'o', name: TX('Outfits'), items: items('outfit'), back: true, noneName: TX('Your runner'), noneDesc: TX('Cap, goggles, backpack and scarf, in your colour.'), draw: (no, cv, back) => BF.icon(no, X.color, back, 96, cv) }, + { id: 'c', name: TX('Celebrations'), items: items('cheer'), drawNone: true, noneName: TX('Usual confetti'), noneDesc: TX('The confetti everyone gets.'), draw: (no, cv) => window.BlockFits.cheerIcon(no, cv, X.color) } + ], + worn: slot => look[slot], + pick(slot, no) { look[slot] = no; save(); X.changed(); }, + close() {} + }); + panel.open(); +} +// the Wardrobe button, in the Garage under the trails +function menu(on) { + let b = document.getElementById('wrBtn'); + if (!on) { if (b) b.parentNode.remove(); if (panel) panel.close(); return; } + if (b) return; + const row = document.createElement('div'); row.className = 'wrrow'; + row.innerHTML = ''; + row.querySelector('#wrBtn').textContent = TX('Wardrobe'); row.querySelector('.wrcap').textContent = TX('Captains only'); + const st = document.createElement('style'); st.textContent = '.wrrow{display:flex;align-items:center;gap:8px;margin-top:10px}.wrrow .btn{padding:8px 14px;font-size:14px}.wrrow .wrcap{font-size:11px;font-weight:900;background:#ffcf3d;color:#141331;border:2px solid #141331;border-radius:999px;padding:1px 7px}'; + row.appendChild(st); + const g = document.querySelector('#menu .garage'); if (!g) return; + g.appendChild(row); + row.querySelector('#wrBtn').onclick = openPanel; +} +return { kitOf, kitStr, mine: () => (look.o || look.c ? { o: look.o, c: look.c } : null), dress, cheer, menu, open: openPanel, get look() { return look; }, BF }; +}; +})(); From 104083e23e7d838944d240cb610236c8ad04c5d5 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 06:34:18 +0000 Subject: [PATCH 32/63] Patchwork Tower: a hidden Wardrobe for captains (29 paint jobs, hats, face pieces and hop trails) Looks only, saved as patchwork-look; wardrobe.js is fetched only for captains. Trails in both Tidewick and Patchwork Tower are drawn under the enemies and hazards. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn --- README.md | 2 +- e63334287a3deaa3/cosmetics.js | 34 +++ e63334287a3deaa3/patchwork-tower/es.js | 34 ++- e63334287a3deaa3/patchwork-tower/index.html | 28 +- e63334287a3deaa3/patchwork-tower/wardrobe.js | 255 +++++++++++++++++++ e63334287a3deaa3/tidewick/js/es.js | 2 +- e63334287a3deaa3/tidewick/js/look.js | 2 +- e63334287a3deaa3/tidewick/js/render.js | 2 +- e63334287a3deaa3/tidewick/wardrobe.js | 2 +- 9 files changed, 354 insertions(+), 7 deletions(-) create mode 100644 e63334287a3deaa3/patchwork-tower/wardrobe.js diff --git a/README.md b/README.md index ae376361..d8c27ecb 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Personal site hosted with GitHub Pages at **https://ascoding11.github.io**, the - `e63334287a3deaa3/2048/`: 2048 (Back Room), the single-player number-sliding puzzle, drawn on one canvas (no libraries). The rules are pure functions at the top of the page script (`slideLine`, `moveBoard`, `spawnTile`, `isOver`); a board is an array of n × n numbers, row by row, with 0 for empty (every rule takes the size from the board's length), and `linesFor(n)` lists each direction's rows or columns starting from the wall being moved toward, which is where joins start (`LINES` is the 4 × 4 set). A move that changes nothing does nothing (no new tile, animation or score). A move made during an animation finishes that animation at once and then runs, so fast keys never lose a move or add an extra tile. **Modes** (picker under the buttons and in the menu; the last one played reopens): **Classic** is the 4 × 4 game; **Mega** is the same game on a 6 × 6 board (same spawn odds, win at 2048 with keep-going); **College** and **Dessert** are rule-identical to Classic (same engine, only the drawing differs) but each tile shows a step on a 12-step ladder from 2 to 4096 with its own colours, the number small in the corner, and a win at the 2048 step: colleges from ASU up to UChicago (2048) and Princeton (4096), a deliberately silly joke ranking with no basis beyond rough selectivity (the ladder is `COLLEGE` in the script), and desserts from a plain cracker up to a wedding cake (2048) and a croquembouche (4096), each with a small icon drawn with canvas shapes (`DESSERT` and `ICONS`); past the top of a ladder tiles show plain numbers. Strict mode (on by default; the setting was called Classic before the modes arrived, and its key is still `classic`) hides Undo; with it off there is a one-step Undo, and a game where Undo was used no longer reports to the leaderboard. Everything is saved only in this browser, one game and one best per mode: `g48:game` and `g48:best` for Classic (unchanged, so older saves carry over), `g48:game:` and `g48:best:` for `mega`, `college` and `dessert` (the game in progress is `{v:1, b: board, s: score, w: reached 2048, wp: the 2048 screen is still showing, u: the undo step {b, s, w} or null, a: Undo was used, m: moves}`, with 36 entries in `b` for Mega), `g48:opts` (`classic`, `mute`, `mode`) and `keybinds:2048` (keybinds.js). Keep these keys and the `v:1` format so saved games carry over; every read is checked (a save of the wrong size for its mode is ignored), and a broken save just starts a new game. Leaderboard hooks, sent only from games without Undo: `BackRoomStats.max('best', score)` and `BackRoomStats.max('tile', biggest tile)` for Classic, and `best-` / `tile-` for the others (`best-mega`, `tile-mega`, `best-college`, `tile-college`, `best-dessert`, `tile-dessert`; stat names can't hold underscores). The 2048 leaderboard has a chip for each mode's best score plus Classic's biggest tile (`tile-` is sent but has no board yet), and account-nudge.js saves `g48:best` and every `g48:best:` to the signed-in account. **Drawing:** the number tiles have the game's own colour ramp (`PAL`: paper, leaf, mint, teal, blue, indigo, violet, berry, getting darker at every step; 2048 is the one gold tile and glows; the tiles past it are deep colours with a gold rim) and the board is a walnut tray with a sunken well per square. Each tile value is painted once (`paintTile`: shadow, lower lip, a face lit from above, rim, number or ladder name and icon) into its own small picture (`spriteOf`) and then stamped with one `drawImage`, and the empty tray is one picture too (`boardOf`); `clearStyles()` throws these away when the size, mode or font changes, so call it rather than `styles.clear()`. The gold glow is one soft picture drawn under all the tiles (`drawGlow`), so it never covers a neighbour. A move slides the tiles, then a join pops with a white flash and a ring (`drawJoinFx`) and the new tile fades in as it grows, all inside the same 110 ms slide and 190 ms settle as before; the score number bumps when points arrive. With the system's reduce-motion setting none of this moves (the board just redraws). The win, game-over and new-game screens dim the board behind a cream card sized from the board's width (`--s`); the win screen adds a gold sunburst and a star badge, both plain CSS. A webdriver-only hook `window.__g48` exposes the rules, the mode switch and game controls for automated tests. **Spanish:** `es.js` has its words (lang.js), including the dessert tile names drawn on the board (the tile looks are rebuilt on a switch); college names stay as they are. - `e63334287a3deaa3/stackfall/`: Stackfall (Back Room), a single-player falling-block puzzle with two modes on one page (Canvas 2D, Web Audio, no Firebase). The rules are two pure engines with no DOM in them, `Classic(opts)` and `Sand(opts)`, driven by `update(ms, softDrop)` and the move, rotate, hardDrop and holdPiece calls; the view only reads their state, and they report sounds and effects through `onEvent`. **Classic**: a 10 × 20 well plus 2 hidden rows, 7-bag randomizer (`makeBag`), SRS rotation with the published kick tables (`KICKS_UP`, one table for J/L/S/T/Z and one for I; `KICKS` is the same data converted to y-down), DAS 170 ms and ARR 50 ms, 500 ms lock delay that up to 15 moves or turns can reset (`LOCK_MS`, `MAX_RESETS`), gravity from the standard `(0.8 − (level − 1) × 0.007)^(level − 1)` s per row curve, a level every 10 lines, hold once per piece and a five-piece preview. Scoring is 100/300/500/800 × level for 1–4 lines (4 is called a "QUAD!"), T-spins by the 3-corner rule (0–3 lines 400/800/1200/1600, minis 100/200/400, all × level; the 5th kick test upgrades a mini), back-to-back × 1.5 for quads and T-spin clears in a row, combo +50 × combo × level, and 1 per soft-dropped row, 2 per hard-dropped row. It tops out when a new piece overlaps the stack or a piece locks entirely in the hidden rows. **Sand**: the well is a grain grid of 10·B × 20·B in typed arrays (B = 10, so 100 × 200, on computers; B = 8, so 80 × 160, on touch screens and small windows; every rule is in block units, so both play the same and grain counts and scores are normalised to 64 grains per block). Each piece is rigid and steerable (moves in half-block steps) until it touches the floor or the sand, then it crumbles into grains of its one colour (per-grain shade). `step()` is the cellular automaton: bottom row up, each grain falls straight down if it can, else slides diagonally down to a random free side, else rests, so each grain moves at most once a step; it runs at 22.5·B steps a second, up to 10 a frame. `findClear()` flood-fills (4-neighbour, one colour, `Int32Array` queue) from every grain on the left wall, and a component that also reaches the right wall clears whole: it flashes for 200 ms, a dissolve sweeps across it for 260 ms, and then all its grains vanish together so the sand above drops and can make another link. Points are the grains removed × the chain count in that cascade × (1 + 0.25 × (level − 1)), plus 300 × (colours − 1) × level when a new colour joins the chain; the chain resets once the sand comes to rest with nothing left to clear. The level goes up every 3,000 grains cleared (`GRAINS_PER_LEVEL`) and the fall speed is `sandSpeed(level)` blocks a second. Game over: the danger line is 2 blocks below the top (`DANGER`); a new piece only appears when no sand is above it, and if sand is still above it 1 s after the piece is due (`SPAWN_WAIT_MS`), the game ends. Sand mode has 4 colours by default, or 5 or 6. Saved in this browser only: best scores in localStorage `stackfall:best:classic`, `stackfall:best:sand` (4 colours), `stackfall:best:sand5` and `stackfall:best:sand6`, plus `stackfall:sandColours`, `stackfall:mute` and the key bindings (`keybinds:stackfall`, via `keybinds.js`). At game over it reports `BackRoomStats.max('classic' | 'sand', score)` and `max('lines', lines)`; `stats.js` has no `READ` entry for it yet. In an automated browser, `window.__sf` exposes both engines, the shape and kick tables, `state()`, `layout()` and `start(mode)` for the rule tests. **Spanish:** `es.js` has its words (lang.js); the canvas HUD and callouts go through `T()`, and the help paragraphs with bold words are swapped whole (`data-i18n-html`). - `e63334287a3deaa3/melon-merge/`: Melon Merge (Back Room), a single-player fruit-merging puzzle with its own 2D circle physics (no libraries, no Firebase). Fruit are dropped from above a glass jar; two of the same stage that touch merge into the next of 11 stages (cherry → watermelon) at their combined centre with their averaged velocity, growing to full size over 0.12 s so neighbours get pushed aside; two watermelons that touch both burst for `MELON_BONUS` (200). Drops are uniformly random from stages 1–5 (`makeQueue`). Merging into stage k scores `SCORES[k]` (1, 3, 6, … 66), and every merge in a chain counts. Game over when any fruit that isn't still falling in (it counts once it first lands, or after `ENTER_GRACE` 1 s) stays above the red line (`DANGER_Y`) for `OVER_LIMIT` 1.5 s in a row. The physics (`makeSim`) has no DOM in it: world units with the jar 520 × 720, a fixed 1/120 s step with 2 sub-steps, warm-started sequential impulses with friction and rolling, bounce only on a contact's first touch (so piles can't pump themselves up), then 4 position-correction passes (heavier fruit move less) and wall clamps; change `RADII` and the jar size together, since the danger line and drop height are measured against them. Only the best score is saved, in this browser under `melon-merge:best` (also `melon-merge:mute` and `melon-merge:faces`); a game in progress isn't saved. Keys are rebindable through `keybinds.js` (`keybinds:melon-merge`). Calls `BackRoomStats.max('score', …)` at game over and `BackRoomStats.add('melons', 1)` for each watermelon; `leaderboard.js` needs entries for those if they should show on the leaderboards. **Turkey Week** (`../events.js`, November 15 to 26, 2026): the eleven stages are drawn as a Thanksgiving dinner (cranberry, pecan, sprout, dinner roll, yam, apple, corn, ham, pumpkin, pumpkin pie, turkey): `FR_DINNER` holds the names and colours and `paintDinner` the art, swapped in by `setDinner`; the help text and the first-turkey banner follow. Sizes, scores, physics and the saved best are unchanged. The game reads the one Turkey Week switch on the Back Room page (see `events.js` below) once, when it loads (off means fruit); it has no button of its own. **Spanish:** `es.js` has its words (lang.js), fruit and dinner names included; the canvas HUD labels go through `T()`, and the brand stays English. -- `e63334287a3deaa3/patchwork-tower/`: Patchwork Tower (Back Room), a one-screen fix-it arcade game in pixel art for one player (one file, one canvas, Web Audio, no libraries, no Firebase except stats.js). It took the place of Hivefix; `e63334287a3deaa3/hivefix/index.html` is now only a redirect to it, so old links and bookmarks still work (`m/thumbs/hivefix.jpg` stays for the old What's new entry). Rivet, a repair bot with a wrench, hops between the windows of a brick tower at night (5 across, 4 down) and fixes each broken one until it glows; cracked windows take one fix, dark ones two, and fixing roots the bot to the spot. A gargoyle walks along the roof, stops over a column (more often than not the bot's), winds up (eyes red, a red arrow under the roof ledge on every column about to be hit) and kicks a brick straight down it. Clearing every window ends the floor (500 plus 10 for each second left of 60) and the next one starts with a new layout. **Rules** live between `// ==RULES==` and `// ==END RULES==`: no page, clock, sound or `Math.random` in there, so the same seed and presses always give the same game (`create(seed)`, `step(g, 1/120)`, `press(g, k)` for a tap and `hold(g, k, on)` while a key or button is down, with k one of up, down, left, right, fix; what should be heard goes into `g.ev` as words the page plays). `g.win[r][c]` is 0 fixed / 1 cracked / 2 dark; `g.blockV[r][c]` is a planter under the sill of (r, c), which blocks climbing between rows r and r+1; `g.blockH[r][c]` is an open shutter between (r, c) and (r, c+1), which blocks stepping sideways. **Tuning** is the constants at the top of the rules: a hop takes 0.12 s (`HOP`), a fix 0.26 s (`FIX`; 0.08 s with cocoa), a press made during a hop or fix is remembered for 0.3 s (`BUF`), a held direction or FIX repeats after 0.22 s (`REPEAT`), the wind-up is 0.4 s (`TELE`) plus 0.3 s on floor 1 shrinking to nothing by floor 4 (`TELE_EARLY`), 3 lives, a hit freezes the world for 1 s and restarts the bot at the door with 2 s of blinking. Per floor: 7 + 2 × floor windows broken (all 20 from floor 7), the chance one is dark is 0.15 + 0.1 × floor up to 0.75, one more planter or shutter each floor up to four (each on its own edge, redrawn until every window can be reached), the gargoyle walks at 55 + 9 × floor pixels a second, bricks fall at 65 + 11 × floor, and its rest between kicks is 1.5 − 0.13 × floor seconds, never under 0.35; the speeds stop rising at floor 12 (`TOP_LEVEL`). From floor 2, bats cross a row (an arrow blinks at that edge of the row for 0.8 s first, `BAT_WARN`); from floor 3 a kick sometimes (35%) sends a second brick down a neighbouring column 0.18 s later, chosen at the start of the wind-up so its arrow shows too. Cocoa appears on a sill now and then for 7 s: 6 s safe from everything, the first 4 with one-tap repairs, +300. The hit boxes are narrower than the sprites (9 pixels either side for bricks and bats). **Drawing**: the game is a 240 × 320 picture. `layout()` shows it at a whole number of device pixels per game pixel (the canvas is sized in device pixels and scaled back by 1/devicePixelRatio, its corner snapped to a device pixel), so pixels stay square and sharp on any screen; never size the canvas with CSS percentages or `vh`. The sky, skyline and brickwork are drawn once (`back`), the windows, planters and shutters are redrawn only when one changes (`g.winDirty`), and words use a 5 × 5 pixel alphabet drawn in code (`FONT`, capitals, digits and `+ - : ! .` only), not a web font. The loop runs the rules in fixed steps of 1/120 s and draws between steps, so it plays at the same speed on 60, 120 and 144 Hz screens. The game pauses when the tab is hidden or the window loses focus. **Saved in the browser only**: `patchwork-best`, `patchwork-mute` (in try/catch), keys under `keybinds:patchwork-tower`. Stats hook: `max('score', score)` and `max('floor', floor reached)` when a floor is cleared and at game over (the Leaderboards show best score). Controls: arrows or WASD hop (hold to keep hopping), Space, Z or X fix (hold to keep fixing), P, Enter or Esc pause, M sound, all rebindable under KEYS. On touch screens (`body.touch`): a d-pad (slide a thumb between arrows) and a round FIX button under the screen, or either side of it when the phone is sideways. How to play sits beside the screen when there is room, otherwise behind the ? button. A test hook (`window.__pt`) exists only when `navigator.webdriver` is set. It has Spanish: its words are in `patchwork-tower/es.js` (lang.js), with a Language switch in How to play; the canvas words are chosen to need no accents, since the 5×5 pixel font has none. +- `e63334287a3deaa3/patchwork-tower/`: Patchwork Tower (Back Room), a one-screen fix-it arcade game in pixel art for one player (one file, one canvas, Web Audio, no libraries, no Firebase except stats.js). It took the place of Hivefix; `e63334287a3deaa3/hivefix/index.html` is now only a redirect to it, so old links and bookmarks still work (`m/thumbs/hivefix.jpg` stays for the old What's new entry). Rivet, a repair bot with a wrench, hops between the windows of a brick tower at night (5 across, 4 down) and fixes each broken one until it glows; cracked windows take one fix, dark ones two, and fixing roots the bot to the spot. A gargoyle walks along the roof, stops over a column (more often than not the bot's), winds up (eyes red, a red arrow under the roof ledge on every column about to be hit) and kicks a brick straight down it. Clearing every window ends the floor (500 plus 10 for each second left of 60) and the next one starts with a new layout. **Rules** live between `// ==RULES==` and `// ==END RULES==`: no page, clock, sound or `Math.random` in there, so the same seed and presses always give the same game (`create(seed)`, `step(g, 1/120)`, `press(g, k)` for a tap and `hold(g, k, on)` while a key or button is down, with k one of up, down, left, right, fix; what should be heard goes into `g.ev` as words the page plays). `g.win[r][c]` is 0 fixed / 1 cracked / 2 dark; `g.blockV[r][c]` is a planter under the sill of (r, c), which blocks climbing between rows r and r+1; `g.blockH[r][c]` is an open shutter between (r, c) and (r, c+1), which blocks stepping sideways. **Tuning** is the constants at the top of the rules: a hop takes 0.12 s (`HOP`), a fix 0.26 s (`FIX`; 0.08 s with cocoa), a press made during a hop or fix is remembered for 0.3 s (`BUF`), a held direction or FIX repeats after 0.22 s (`REPEAT`), the wind-up is 0.4 s (`TELE`) plus 0.3 s on floor 1 shrinking to nothing by floor 4 (`TELE_EARLY`), 3 lives, a hit freezes the world for 1 s and restarts the bot at the door with 2 s of blinking. Per floor: 7 + 2 × floor windows broken (all 20 from floor 7), the chance one is dark is 0.15 + 0.1 × floor up to 0.75, one more planter or shutter each floor up to four (each on its own edge, redrawn until every window can be reached), the gargoyle walks at 55 + 9 × floor pixels a second, bricks fall at 65 + 11 × floor, and its rest between kicks is 1.5 − 0.13 × floor seconds, never under 0.35; the speeds stop rising at floor 12 (`TOP_LEVEL`). From floor 2, bats cross a row (an arrow blinks at that edge of the row for 0.8 s first, `BAT_WARN`); from floor 3 a kick sometimes (35%) sends a second brick down a neighbouring column 0.18 s later, chosen at the start of the wind-up so its arrow shows too. Cocoa appears on a sill now and then for 7 s: 6 s safe from everything, the first 4 with one-tap repairs, +300. The hit boxes are narrower than the sprites (9 pixels either side for bricks and bats). **Drawing**: the game is a 240 × 320 picture. `layout()` shows it at a whole number of device pixels per game pixel (the canvas is sized in device pixels and scaled back by 1/devicePixelRatio, its corner snapped to a device pixel), so pixels stay square and sharp on any screen; never size the canvas with CSS percentages or `vh`. The sky, skyline and brickwork are drawn once (`back`), the windows, planters and shutters are redrawn only when one changes (`g.winDirty`), and words use a 5 × 5 pixel alphabet drawn in code (`FONT`, capitals, digits and `+ - : ! .` only), not a web font. The loop runs the rules in fixed steps of 1/120 s and draws between steps, so it plays at the same speed on 60, 120 and 144 Hz screens. The game pauses when the tab is hidden or the window loses focus. **Saved in the browser only**: `patchwork-best`, `patchwork-mute` (in try/catch), keys under `keybinds:patchwork-tower`. Stats hook: `max('score', score)` and `max('floor', floor reached)` when a floor is cleared and at game over (the Leaderboards show best score). Controls: arrows or WASD hop (hold to keep hopping), Space, Z or X fix (hold to keep fixing), P, Enter or Esc pause, M sound, all rebindable under KEYS. On touch screens (`body.touch`): a d-pad (slide a thumb between arrows) and a round FIX button under the screen, or either side of it when the phone is sideways. How to play sits beside the screen when there is room, otherwise behind the ? button. A test hook (`window.__pt`) exists only when `navigator.webdriver` is set. It has Spanish: its words are in `patchwork-tower/es.js` (lang.js), with a Language switch in How to play; the canvas words are chosen to need no accents, since the 5×5 pixel font has none. **The Wardrobe** (captains only for now, like the other games' hidden cosmetics): 29 looks for Rivet in `patchwork-tower/wardrobe.js`, listed in `cosmetics.js` under `GAMES['patchwork-tower']` (15 paint jobs, 7 hats, 3 face pieces and 4 hop trails: sports kits, tin and chrome robots, pirates, suits and more). The page fetches `wardrobe.js` and `../cosmetics.js` only when `wardrobeOn()` is true (`PATCHWORK_PUBLIC`, the one line that opens it to everyone; a site captain through `captains.js`; or `?wardrobe=1` on localhost or in an automated browser), and then a hanger button appears in the top bar; for everyone else `WR` stays null and the bot is drawn exactly as before. Looks only: a paint job recolours the bot's own rectangles (cocoa still turns it gold, the blinking after a hit is unchanged), every paint stands out from the bricks at least 3.5 times (`MIN_CR`; factory teal is 4.1) and none is brick-orange or bat-lilac, hats sit on the head (some in place of the antenna), face pieces go on the visor, and hop trails are drawn under the bricks, bats and bot and fade within half a second. Opening it pauses a game in progress. What is worn is saved in this browser as `patchwork-look` (`{p, h, f, t}`, item numbers, 0 for none); nothing is sent anywhere. The words are in `es.js`. - `e63334287a3deaa3/flickerwood/`: Flickerwood (Back Room), an 8-bit maze chase for one player (one file, one canvas, Web Audio, no libraries, no Firebase except stats.js). Glim, a firefly, gathers every speck of pollen in a moonlit hedge maze (a glade) while four night critters come out of the hollow stump in the middle and chase its light. It is our own take on the maze-chase genre: the name, theme, characters, mazes, art, sounds, words and numbers are all ours, and only the genre's ideas are used. **The four critters** never find a path: at the middle of every tile each one picks the open way (never straight back) whose next tile is nearest, in a straight line, to the tile it wants (`target()`), and all of its character is in that tile. Swoop the bat wants Glim's tile; Gulp the frog wants the tile 3 ahead of the way Glim faces (`AHEAD`); Tangle the spider wants the point on the far side of Glim from Swoop (twice Glim's tile minus Swoop's); Dither the moth wants Glim while more than 5 tiles away (`NEAR`) and its own corner once closer. They take turns at two moods on a clock: **roost** (each heads for its own corner: Swoop top right, Gulp top left, Tangle bottom right, Dither bottom left) and **hunt**; every time the mood changes they all turn straight round, which is the tell. Glim is faster than they are in an empty corridor and a little slower while eating, turns can be pressed early and are remembered until the next gap, a turn started up to 4 pixels before the middle of a tile cuts the corner and gains those pixels (`CUT`; up to 3 pixels late it is still taken, `LATE`), and a reverse is taken anywhere. A **moonbloom** (four a glade) dazzles the critters: they turn round, go pale, slow to 60% and mostly run away, and touching one sends it home as a puff of dust for 100, 250, 500 then 1000 (`CATCH`); they flicker for the last 2 seconds, and a caught one rests 1.2 s in the stump and comes back out as itself. **Tunnels** at the edges (`~` tiles) wrap round and slow critters to 55%. A **find** (dewdrop, acorn, clover, toadstool, bluebell, feather, snail shell, moonstone, one kind a glade) shows under the stump for 9 s when 35% and again when 70% of the glade is eaten, worth 200 plus 100 a glade up to 1000. Our own twists: **Dash** (0.32 s at 2.1 times speed, then 6 s to recharge, shown as a meter) and the **chain** (each speck eaten within 1 s of the last carries it on; every 12 raises the multiplier on specks, up to 5 times). Specks are 5, moonblooms 30, clearing a glade 100 times its number up to 1000 plus 300 if no life was lost in it; 3 lives, one more at 6,000 and every 15,000 after, 5 at most. **Rules** live between `// ==RULES==` and `// ==END RULES==`: no page, clock, sound or `Math.random` in there, so the same seed and presses always give the same game (`create(seed)`, `startGame(g)`, `step(g, 1/120)`, `turn(g, d)` with d 0 right, 1 down, 2 left, 3 up, and `dash(g)`; what should be heard or shown goes into `g.ev` as words, and eaten tiles into `g.gone`). Positions in the rules are maze pixels; the page adds the score bar above. Glim and the critters are a tile, a direction and how far along it they are (`c, r, dir, off`), so they can never leave a path; they touch when both gaps are under 7 pixels (`HIT`, smaller than the sprites). **Glades** are the five `MAZES` at the top of the rules, drawn by hand as 23 rows of 21 letters (12-pixel tiles): `#` hedge, `.` pollen, `o` moonbloom, `-` path, `~` tunnel, `HHH` the stump with `G` its gate above the middle, `P` Glim's start, `B` the find, space outside the glade. Hedge Court is a full rectangle with a tunnel across the middle, Lily Pond has its corners cut off and tunnels top to bottom, Bramble Wheel is not mirrored (its bottom half is its top half turned half round) and has two tunnels, Mossy Ruin has tunnels both ways through the middle of each edge, and Moth Hollow is an hourglass with none; glade 6 is Hedge Court again, quicker. A new or changed glade must stay: every path one tile wide (no open 2 × 2), no dead ends, all joined up, a border tile that is a path matched on the opposite border, the start at least 8 steps from the gate with a way left and right (Glim sets off left), one moonbloom in each quarter, nothing but hedge next to the outside. A script checked all of that for the five glades when they were made (it is not in the repo), so check again by hand if you change one. **Tuning** is `tune(level)` and the constants at the top of the rules: Glim 66 pixels a second plus 1.3 a glade; critters 70% of that plus 3 points a glade (97% at glade 10); the dazzle 8 s less 0.67 s a glade, never under 2; roosts of 7, 7, 5 and 4 s (less 0.55 s a glade, never under 1.5) between hunts of 13, 15 and 18 s (plus 1.2 s a glade), then hunting for good; Gulp leaves the stump after 3 s, Tangle after 12 s or 30 specks, Dither after 28 s or 90 specks, all sooner glade by glade; from glade 3 Swoop speeds up 6% when 20% of the pollen is left and 12% under 8%, and keeps hunting through roosts; nothing tightens after glade 10 (`TOP_LEVEL`). Glade 1 is meant to be cleared by a first-time player: a test bot that only heads for the nearest pollen and runs when something is three tiles away clears it nearly every time. **Drawing**: the game is a 252 × 300 picture (a 14-pixel score bar, the 252 × 276 maze, a 10-pixel strip for spare lives, the dash meter and finds). `layout()` shows it at a whole number of device pixels per game pixel, so pixels stay square and sharp, and tries three places for it, biggest picture first: under the top bar with the key hint, under the bar without the hint, and between the bar's title and buttons (so a 1366 × 768 laptop with a short browser window still gets 2 ×); only when a whole number would be 1 is it drawn at 2 and shrunk smoothly to fit. Never size the canvas with CSS percentages or `vh`. Sprites are rows of letters turned into small canvases once (`bake`; Glim is drawn facing right and turned for the other three ways; two frames each; the dazzled look is the same shapes in two pale tones); the hedges, stump and tunnel marks are drawn once per glade (`mazeL`, and a lit copy `flashL` for the blink when a glade is cleared), the pollen sits on its own layer and each speck is wiped from it as it is eaten, the score bar is redrawn only when something on it changes, and words use a 5 × 5 pixel alphabet drawn in code (capitals, digits and `+ - : ! .` only). The loop runs the rules in fixed steps of 1/120 s and draws between steps. It pauses when the tab is hidden or the window loses focus. **Sound** is made in the page: square, triangle and noise blips in `SFX`, and a 16-bar tune of our own in A minor in `TUNE` (notes as numbers), booked a tenth of a second ahead on the audio clock; while a moonbloom is on, a quicker bright figure plays instead. Nobody has listened to it yet, so the loudness and the tune want a check by ear. **Saved in the browser only**: `flickerwood-best` (score), `flickerwood-glade` (furthest glade), `flickerwood-mute` (in try/catch), keys under `keybinds:flickerwood`. Stats hook: `max('score', score)` and `max('glade', glade reached)` when a glade is cleared and at game over (the Leaderboards show best score). Controls: arrows or WASD turn, Space or Shift dashes, P, Enter or Esc pause, M sound, all rebindable under KEYS. On touch screens (`body.touch`): swipe anywhere to turn (keep sliding to turn again without lifting), tap the screen to dash, or use the d-pad with a DASH button either side of it under the screen (pad on the left and DASH on the right when the phone is sideways). How to play, with a picture of each character, sits beside the screen when there is room, otherwise behind the ? button. A test hook (`window.__fw`) exists only when `navigator.webdriver` is set. It has Spanish: its words are in `flickerwood/es.js` (lang.js), with a Language switch in How to play; the canvas words are chosen to need no accents (the 5×5 pixel font has none), and glade and critter names stay English. - `e63334287a3deaa3/lanternhold/`: Lanternhold (Back Room), a co-op tower defense game for 1 to 4 players (one file, three.js r128 with `../autores.js`, `../netsmooth.js` for teammates' pointers, Web Audio, Firebase Realtime Database rooms under `rooms/lh-`, same project and rules as Rumble Karts; invite links go through the home page as `#lh-`; no Quick match, rooms hold up to 4). The name, the Gloom, the towers, the maps, the art and the sounds are all our own. The Gloom walks a road across a floating island (a 20 × 12 grid of 2 m tiles, `GW`/`GH`/`T`) to the lantern; each one that gets there costs lives (`lv` in `EN`: 1, 2 for Shellbacks and Splitblobs, 15 for the boss). Towers go on grass tiles only (not road, scenery or the lantern). **Rules** are plain data and pure functions near the top of the script, the same in every browser, so a client can work out wave previews and enemy health without asking: `MAPS` (Meadow Bend, one long road; Twin Fords, two roads that meet; Whorl Garden, a spiral, whose flyers come from their own pink gate, `fly`, so they don't skip almost the whole map), `DIFFS` (Easy, Normal, Hard: health factor, lives 30/20/12, starting gold 720/620/540, bounty factor and seconds between waves), `EN` (Gloomling; Skitter, fast; Shellback, armour 7 taken off every hit, at least a quarter always goes through; Duskmoth, flies straight at the lantern; Splitblob, splits into three Bloblets; Mender, heals the Gloom near it 5% a second; Gloomwarden, the boss on every 10th wave, armoured, slow, and calls two Skitters every 5 s), `TW` (Bolt Spire, quick single shots, two at once at level 3; Thumper, lobbed blasts that hurt groups, ground only; Frost Bell, rings out to slow and chip everything near it, bosses half as much; Spark Coil, lightning that jumps between enemies; Sky Lance, flyers only, splash on nearby flyers; Sun Lens, a long beam that ignores armour), each with three levels (`lv`: range, damage, seconds between shots and the upgrade's cost) and a target mode (First, Last, Strong, Close). Selling gives back 70% of what went into the tower (`SELL`). `waveDef(w, map)` builds wave w from a seeded random pool (new kinds join at waves 2, 4, 5, 6 and 8, and the wave a kind first appears always has a group of it), `hpScale` makes them tougher each wave and faster still after wave 30. Survive 30 waves (`CAMPAIGN`) to win; then Keep going is endless mode. Gold: every kill's bounty and every wave's bonus (25 + 5 a wave) is split evenly between the players (`income`), each player spends their own share, and the team list has +50 to give gold to a teammate. Sending a wave before its countdown ends pays 2 gold per second left. Speed 1×, 2× or 3× (`sp`, anyone can change it). Only whoever built a tower can sell it (anyone can once they've left); anyone can upgrade or retarget it. `simStep(S, dt)` runs the game at a fixed 30 steps a second in solo, behind the menu (a demo game, `attract`) and on the online host; `act(S, uid, a)` applies one action (`b` build, `u` upgrade, `s` sell, `m` target mode, `w` send the wave, `f` speed, `g` give gold, `c` continue into endless) and returns '' or what went wrong. **Online:** each player writes only their own node `rooms/lh-/players/`: `n` name, `c` colour, `x`/`z` where their pointer is on the board (drawn on the others' screens as a ring and a name tag from a short history, NetSmooth), `h` (always 0), `ts` (server time), `j` (when they joined), and `ac`, their last 10 actions as JSON, each with a rising number `i` and the game number `g`. The host is whoever has the highest `he` with a published state, else whoever joined first (`Net.elect`); it runs the game, takes each player's new actions (`takeActs`, at most once each, by `i`, and only for the current game), and publishes the whole state as JSON in its own node's `rs` about 5 times a second (`encodeRS`: phase, wave, lives, gold per player, towers, enemies, Thumper shells in the air and the last shots, so clients can draw them). Clients rebuild the game from it (`decodeRS`, which checks every value) and move the Gloom on between snapshots from its speed, easing towards the host's numbers. If the host leaves, the next player picks up the last snapshot and carries on (`he` goes up by one), and a tab in the background keeps the host's game running once a second. The host picks the map and difficulty in the room's lobby and presses Start; anyone joining later gets a share of gold (the average, at most 250). Nodes are removed on leave and onDisconnect. **Saved in this browser** (localStorage, all `lanternhold:`): `name`, `color`, `map`, `diff`, `gfx` (Pretty, with shadows, or Fast; Fast is the default on touch screens), `sound`, `room` (the last room code) and `best::`, the best wave held. **stats.js:** `max('wave', waves held)` and `add('bosses', n)`; the Leaderboards show Most waves held and Gloomwardens beaten. **Touch:** shown only on touch screens (`body.touch`): tap a tower button, tap a tile to see the tower there, tap it again to build; drag to move the board, pinch to zoom. The camera fits the board into the space the HUD leaves (`fitCam`, `measureHud`), and on an upright phone the wave box becomes a row under the top bar and the dock gets compact. **Drawing:** the island, scenery and lantern are merged meshes with vertex colours; enemies, health bars, shots and rings are instanced meshes (their colour buffers are made at full size in `whiteColors`, because three r128's `setColorAt` sizes the buffer from the mesh's current count); particles are one Points draw. Automated browsers get a test hook, `window.__lh`. It has Spanish: its words, tower names and descriptions are in `lanternhold/es.js` (lang.js), with a Language switch on the menu and the pause screen; map names and the Gloom's names stay English, and nothing translated is sent to the room. - `e63334287a3deaa3/daily/`: Daily Puzzles (Back Room), the dashboard for every daily puzzle. No libraries, no network except stats.js. `DAILY_GAMES` at the top of the script lists every daily game (`slug` = folder = storage key `daily:`, name, icon, `cat`: word, geo, logic, est (Estimation) or soccer, a one-line blurb, `ready`), plus `EXTRA` link cards under Play together (Puffer Party, `chip` in place of a daily status). Tiles only show for `ready:true` games, and "Coming soon" ones are listed under each category; flip `ready` when a game's folder lands. For each game it reads the shared record `daily:` (written by the game when a daily ends: `{ v:1, days:{YYYYMMDD:{done,win,score,tries,time}}, played, wins, streak, maxStreak, last, dist }`) and shows today's status (Not played, Solved in N / in m:ss, Done, or Missed) and the game's 🔥 streak (only while its last win was today or yesterday). Deepword is read from its own `deepword:` keys. The summary counts today's finished puzzles, the overall streak (days in a row, ending today or yesterday, with at least one daily done, worked out from every game's `days`), and counts down to local midnight; when every ready game is done it shows an "All done today" banner. stats.js (`data-game="daily"`): `max('streak', overall)` and `add('done', 1)` once per game per day (remembered in `daily-hub:counted`). It re-reads storage when the tab comes back into view or another tab writes, so finishing a puzzle in another tab updates it. Test hook: `window.__dh` under webdriver (`setToday`, `render`, `streakOverall`). A game whose win shouldn't read "Solved in " gives a `show` template (`{tries}`, `{score}`, `{time}`; `{score|hint}` adds the word, plural unless the number is 1, and `zero` is the text used when the number is 0): Crosslet shows its time, Ninefold puzzles solved of 3, Crossbar squares, Stat Duel calls right, Top Bins entries found, Quartets mistakes (Perfect for none), Sleight hints, Poopdle moves, Mainstream its points, Yardstick its total out of 500 and Thereabouts its average miss (`{score|x100}`: a score saved as a hundred times a decimal, so 137 reads "1.37×"). A missed puzzle's tile has the finished look but no ✓. Poopdle and Thereabouts are under Logic. `RETIRED`, under `DAILY_GAMES`, holds the daily puzzles taken off the list on 18 Nov 2026 (the least played; see the Back Room page above): they have no tile and aren't in today's total, but their records still count toward the overall streak, so taking a puzzle off never shortens anyone's streak, and a category with nothing listed (Soccer, for now) isn't shown. To bring one back, move its line back into `DAILY_GAMES`. The daily games don't have Back Room or phone-page cards of their own: the Daily Puzzles card and tile are the way in (the phone thumbnails in `m/thumbs/` are kept for if they ever do). diff --git a/e63334287a3deaa3/cosmetics.js b/e63334287a3deaa3/cosmetics.js index 6bcabedf..23d97950 100644 --- a/e63334287a3deaa3/cosmetics.js +++ b/e63334287a3deaa3/cosmetics.js @@ -255,6 +255,7 @@ 'odd-one-out': { name: 'Odd One Out', prefix: 'oo', slots: [['outfit', 'Hunter outfits'], ['tool', 'Hunter tools'], ['taunt', 'Prop taunts'], ['poof', 'Catch poofs']] }, 'drop-zone': { name: 'Driftfall', prefix: 'dz', slots: [['outfit', 'Outfits'], ['pack', 'Backpacks'], ['glider', 'Gliders'], ['trail', 'Glider trails'], ['wrap', 'Gun skins'], ['build', 'Build skins'], ['emote', 'Emotes'], ['victory', 'Victory poses']] }, tidewick: { name: 'Tidewick', prefix: 'tw', slots: [['outfit', 'Outfits'], ['hat', 'Hats'], ['face', 'Face pieces'], ['trail', 'Trails']] }, + 'patchwork-tower': { name: 'Patchwork Tower', prefix: 'pt', slots: [['paint', 'Paint jobs'], ['hat', 'Hats'], ['face', 'Face pieces'], ['trail', 'Hop trails']] }, }; var GAME_ITEMS = [], ITEM_BY_ID = {}; function I(game, slot, no, name, rarity, c1, c2, desc) { @@ -1047,6 +1048,39 @@ I('tidewick', 'trail', 2, 'Bubbles', 'common', '#CFE8F0', '#5AA0C8', 'Tiny bubbles that float up into the rain.'); I('tidewick', 'trail', 3, 'Confetti', 'uncommon', '#FF5A8A', '#FFD23F', 'Bits of coloured paper that flutter down.'); I('tidewick', 'trail', 4, 'Music Notes', 'rare', '#FFE680', '#CFE8F0', 'A little tune follows you along the harbour.'); + // ---- Patchwork Tower items ---- + // Patchwork Tower: paint jobs, hats, face pieces and hop trails for Rivet, drawn by patchwork-tower/wardrobe.js by slot and + // number in the bot's own rectangles. In no pack: captains wear them free in the game's Wardrobe. Cocoa still turns Rivet + // gold, and every paint stands out from the brick wall at least as much as wardrobe.js's MIN_CR says. + I('patchwork-tower', 'paint', 1, 'Striker Kit', 'common', '#5FE07A', '#FFFFFF', 'A green shirt with a number 9 and white shorts.'); + I('patchwork-tower', 'paint', 2, 'Hoops Jersey', 'common', '#7FD0FF', '#2F4FA0', 'A sky-blue jersey, number 11, navy trim.'); + I('patchwork-tower', 'paint', 3, 'Gridiron Gear', 'uncommon', '#F4F6F8', '#FFD23F', 'A white jersey and a gold helmet with a face guard.'); + I('patchwork-tower', 'paint', 4, 'Hockey Sweater', 'common', '#F4F6F8', '#2FB65A', 'A white sweater with green shoulders and a green band.'); + I('patchwork-tower', 'paint', 5, 'Referee', 'uncommon', '#F4F6F8', '#1A1C2A', 'Stripes, a whistle somewhere, and no favourites.'); + I('patchwork-tower', 'paint', 6, 'Racing Driver', 'rare', '#F4F6F8', '#E8453C', 'A white race suit, a striped helmet and a blue visor.'); + I('patchwork-tower', 'paint', 7, 'Ballpark Pinstripes', 'uncommon', '#F4F1E8', '#3A6AD0', 'Cream with blue pinstripes, ready for the ninth inning.'); + I('patchwork-tower', 'paint', 8, 'Retro Tin Bot', 'rare', '#D9E0EA', '#FFD35A', 'Riveted tin, a dial on the chest and two round yellow eyes.'); + I('patchwork-tower', 'paint', 9, 'Chrome Bot', 'legendary', '#E8F0FF', '#7FF0FF', 'Polished till it shines, with a cool blue glow.'); + I('patchwork-tower', 'paint', 10, 'Deckhand', 'common', '#F4F6F8', '#E8453C', 'A red and white striped sailor shirt.'); + I('patchwork-tower', 'paint', 11, 'Pirate Captain', 'legendary', '#D9363E', '#FFD23F', 'A red captain\'s coat with gold buttons over a cream shirt.'); + I('patchwork-tower', 'paint', 12, 'Pinstripe Suit', 'rare', '#C8CCD6', '#E8453C', 'A grey pinstripe suit, a white collar and a red tie.'); + I('patchwork-tower', 'paint', 13, 'Gold Chain Tracksuit', 'epic', '#7FF0C8', '#FFD23F', 'A mint tracksuit and a chunky gold chain.'); + I('patchwork-tower', 'paint', 14, 'Secret Agent', 'epic', '#F4F6F8', '#2A2C3A', 'A dark suit, a thin tie, black glasses and an earpiece.'); + I('patchwork-tower', 'paint', 15, 'Astronaut', 'uncommon', '#F4F6F8', '#FFC83A', 'A white suit, a gold visor and a control box with three lights.'); + I('patchwork-tower', 'hat', 1, 'Ball Cap', 'common', '#E8453C', '#FFFFFF', 'A red cap with the peak out front.'); + I('patchwork-tower', 'hat', 2, 'Sweatband', 'common', '#FFFFFF', '#E8453C', 'Hard work makes even robots sweat.'); + I('patchwork-tower', 'hat', 3, 'Pirate Hat', 'rare', '#4A3A50', '#FFD23F', 'A three-cornered hat with a gold edge.'); + I('patchwork-tower', 'hat', 4, 'Pirate Bandana', 'uncommon', '#E8453C', '#FFFFFF', 'A spotted red bandana knotted at the back.'); + I('patchwork-tower', 'hat', 5, 'Fedora', 'rare', '#8A7A6A', '#2A1D3A', 'A felt hat with a dark band, worn low.'); + I('patchwork-tower', 'hat', 6, 'Top Hat', 'epic', '#3A3A4C', '#E8453C', 'A tall silk hat with a red band.'); + I('patchwork-tower', 'hat', 7, 'Wizard Hat', 'rare', '#4A6AE8', '#FFE45C', 'A floppy blue cone with little stars.'); + I('patchwork-tower', 'face', 1, 'Eye Patch', 'uncommon', '#1A1018', '#FFFFFF', 'A patch over one eye. Rivet still sees every crack.'); + I('patchwork-tower', 'face', 2, 'Shades', 'common', '#05070F', '#FFFFFF', 'Dark glasses for the night shift.'); + I('patchwork-tower', 'face', 3, 'Big Moustache', 'common', '#6A4028', '#9FF2E6', 'A bushy moustache bolted on under the visor.'); + I('patchwork-tower', 'trail', 1, 'Confetti', 'common', '#FF5A8A', '#FFD23F', 'Every hop is a little party.'); + I('patchwork-tower', 'trail', 2, 'Loose Bolts', 'common', '#C9D0E8', '#9AA3D6', 'Nuts and bolts rattle off with every hop.'); + I('patchwork-tower', 'trail', 3, 'Music Notes', 'uncommon', '#FFF6C9', '#9FF2E6', 'Rivet hums a tune while it works.'); + I('patchwork-tower', 'trail', 4, 'Rainbow', 'epic', '#FF5C5C', '#5CC8FF', 'A short rainbow streak behind every hop.'); // Items a game hands over itself are in no pack: give is 'free' (anyone may wear it; the game grants it the first time it // is worn) or 'earned' (the game grants it when it is won). grant(id), below, only adds these. GAME_ITEMS.forEach(function (it) { if (it.game !== 'slipstream') return; if (it.slot === 'sponsor' || (it.slot === 'helmet' && it.no <= 8)) it.give = 'free'; else if (it.slot === 'livery' && it.no > 8) it.give = 'earned'; }); diff --git a/e63334287a3deaa3/patchwork-tower/es.js b/e63334287a3deaa3/patchwork-tower/es.js index 3fb50598..dba14333 100644 --- a/e63334287a3deaa3/patchwork-tower/es.js +++ b/e63334287a3deaa3/patchwork-tower/es.js @@ -14,5 +14,37 @@ if (window.BackRoomLang) BackRoomLang.add({ 'Planters': 'Las macetas', 'block climbing and': 'impiden trepar y', 'shutters': 'las persianas', 'block side steps.': 'impiden moverse de costado.', 'Finish a floor quickly for a bigger bonus.': 'Termina un piso rápido para un premio mayor.', 'CLOSE': 'CERRAR', 'Hop up': 'Saltar arriba', 'Hop down': 'Saltar abajo', 'Hop left': 'Saltar a la izquierda', 'Hop right': 'Saltar a la derecha', 'Sound on / off': 'Sonido sí / no', 'Pause (always)': 'Pausa (siempre)', - 'Language': 'Idioma' + 'Language': 'Idioma', + // the Wardrobe (captains only for now: wardrobe.js) + 'Wardrobe': 'Vestuario', 'WARDROBE': 'VESTUARIO', 'CAPTAINS': 'CAPITANES', 'DONE': 'LISTO', 'PAINT': 'PINTURA', 'HATS': 'SOMBREROS', 'FACE': 'CARA', 'TRAILS': 'ESTELAS', + 'Factory Teal': 'Turquesa de fábrica', 'None': 'Nada', 'Rivet as it left the workshop.': 'Rivet tal como salió del taller.', + 'Striker Kit': 'Equipo de delantero', 'A green shirt with a number 9 and white shorts.': 'Camiseta verde con el número 9 y pantalón corto blanco.', + 'Hoops Jersey': 'Camiseta de básquet', 'A sky-blue jersey, number 11, navy trim.': 'Camiseta celeste, número 11, ribete azul marino.', + 'Gridiron Gear': 'Equipo de fútbol americano', 'A white jersey and a gold helmet with a face guard.': 'Camiseta blanca y casco dorado con protector.', + 'Hockey Sweater': 'Buzo de hockey', 'A white sweater with green shoulders and a green band.': 'Buzo blanco con hombros verdes y una franja verde.', + 'Referee': 'Árbitro', 'Stripes, a whistle somewhere, and no favourites.': 'Rayas, un silbato por ahí y ningún favorito.', + 'Racing Driver': 'Piloto de carreras', 'A white race suit, a striped helmet and a blue visor.': 'Traje de carrera blanco, casco a rayas y visor azul.', + 'Ballpark Pinstripes': 'Rayas de béisbol', 'Cream with blue pinstripes, ready for the ninth inning.': 'Color crema con rayas finas azules, listo para la novena entrada.', + 'Retro Tin Bot': 'Robot de lata retro', 'Riveted tin, a dial on the chest and two round yellow eyes.': 'Lata remachada, un dial en el pecho y dos ojos redondos amarillos.', + 'Chrome Bot': 'Robot cromado', 'Polished till it shines, with a cool blue glow.': 'Pulido hasta brillar, con un resplandor azul.', + 'Deckhand': 'Marinero', 'A red and white striped sailor shirt.': 'Una camiseta de marinero a rayas rojas y blancas.', + 'Pirate Captain': 'Capitán pirata', "A red captain's coat with gold buttons over a cream shirt.": 'Un abrigo rojo de capitán con botones dorados sobre una camisa crema.', + 'Pinstripe Suit': 'Traje a rayas', 'A grey pinstripe suit, a white collar and a red tie.': 'Traje gris a rayas finas, cuello blanco y corbata roja.', + 'Gold Chain Tracksuit': 'Jogging con cadena de oro', 'A mint tracksuit and a chunky gold chain.': 'Un jogging verde menta y una cadena de oro gruesa.', + 'Secret Agent': 'Agente secreto', 'A dark suit, a thin tie, black glasses and an earpiece.': 'Traje oscuro, corbata fina, lentes negros y un auricular.', + 'Astronaut': 'Astronauta', 'A white suit, a gold visor and a control box with three lights.': 'Traje blanco, visor dorado y una caja de control con tres luces.', + 'Ball Cap': 'Gorra', 'A red cap with the peak out front.': 'Una gorra roja con la visera adelante.', + 'Sweatband': 'Vincha', 'Hard work makes even robots sweat.': 'Con tanto trabajo hasta los robots sudan.', + 'Pirate Hat': 'Sombrero pirata', 'A three-cornered hat with a gold edge.': 'Un tricornio con borde dorado.', + 'Pirate Bandana': 'Pañuelo pirata', 'A spotted red bandana knotted at the back.': 'Un pañuelo rojo con lunares atado atrás.', + 'Fedora': 'Sombrero de fieltro', 'A felt hat with a dark band, worn low.': 'Un sombrero de fieltro con cinta oscura, bien calado.', + 'Top Hat': 'Galera', 'A tall silk hat with a red band.': 'Una galera alta de seda con cinta roja.', + 'Wizard Hat': 'Sombrero de mago', 'A floppy blue cone with little stars.': 'Un cono azul blando con estrellitas.', + 'Eye Patch': 'Parche en el ojo', 'A patch over one eye. Rivet still sees every crack.': 'Un parche en un ojo. Rivet igual ve cada grieta.', + 'Shades': 'Lentes oscuros', 'Dark glasses for the night shift.': 'Lentes oscuros para el turno de noche.', + 'Big Moustache': 'Bigote grande', 'A bushy moustache bolted on under the visor.': 'Un bigote tupido atornillado bajo el visor.', + 'Confetti': 'Papel picado', 'Every hop is a little party.': 'Cada salto es una pequeña fiesta.', + 'Loose Bolts': 'Tornillos sueltos', 'Nuts and bolts rattle off with every hop.': 'Con cada salto se caen tuercas y tornillos.', + 'Music Notes': 'Notas musicales', 'Rivet hums a tune while it works.': 'Rivet tararea una melodía mientras trabaja.', + 'Rainbow': 'Arcoíris', 'A short rainbow streak behind every hop.': 'Un trocito de arcoíris detrás de cada salto.' }); diff --git a/e63334287a3deaa3/patchwork-tower/index.html b/e63334287a3deaa3/patchwork-tower/index.html index c1b5723c..075d9c29 100644 --- a/e63334287a3deaa3/patchwork-tower/index.html +++ b/e63334287a3deaa3/patchwork-tower/index.html @@ -5,6 +5,7 @@ + Patchwork Tower @@ -446,6 +447,7 @@

HOW TO PLAY

if(p.bump>0){x+=p.bd[1]*2;y+=p.bd[0]*2} const f=p.face,bodyC=gold?'#ffd35a':'#3fd6c0',head=gold?'#fff0b8':'#9ff2e6'; if(gold&&Math.floor(G.tick*10)%2){R(x-8,y-27,16,1,'#ffd35a');R(x-9,y-26,1,26,'#ffd35a');R(x+8,y-26,1,26,'#ffd35a')} + if(WR&&WR.active)return void WR.bot(g2,x,y,f,gold,p.fix>0?(Math.floor(p.fix*30)%2?-5:1):0); // a captain's look (wardrobe.js): the same rectangles R(x-5,y-3,3,3,'#22305a');R(x+2,y-3,3,3,'#22305a'); R(x-6,y-12,12,9,bodyC);R(x-6,y-4,12,1,gold?'#b8902a':'#1c8f80');R(x-1,y-9,2,2,'#ff6b6b'); R(x-5,y-20,10,8,head);R(x-4,y-18,8,3,'#16203f');R(x+(f>0?1:-3),y-18,2,2,'#ffffff'); @@ -507,6 +509,7 @@

HOW TO PLAY

g2.drawImage(back,0,0); for(const [x,y,k] of stars)R(x,y,1,1,(Math.floor(G.tick*2)+k)%3?'#cdd3ff':'#6e77b8'); g2.drawImage(wins,0,0); + if(WR&&WR.active){const p=G.p;WR.trail(g2,Math.round(p.ox+(p.x-p.ox)*a),Math.round(p.oy+(p.y-p.oy)*a),G.tick)} // a captain's hop trail (wardrobe.js), under everything that moves drawGargoyle(a);drawThings(a);drawBot(a); g2.setTransform(1,0,0,1,0,0); drawHud(); @@ -638,8 +641,31 @@

HOW TO PLAY

if(document.fonts&&document.fonts.ready)document.fonts.ready.then(layout); requestAnimationFrame(frame); +/* ---------- the Wardrobe (captains only for now; README, "Patchwork Tower") ---------- + Paint jobs, hats, face pieces and hop trails for Rivet, drawn by wardrobe.js beside this page. wardrobeOn() says + whether this player may open it: PATCHWORK_PUBLIC (the one line that opens it to everyone), one of the site's + captains (../captains.js), or ?wardrobe=1 on localhost or in an automated browser (remembered for the tab; ?wardrobe=0 + forgets it). wardrobe.js (and ../cosmetics.js, for the item names) is fetched only when it is true; until then WR is + null and the bot is drawn exactly as before. Looks only. Saved in this browser as patchwork-look. */ +const PATCHWORK_PUBLIC=false; +const CAPTAINS=window.BackRoomCaptains||null; +const wardrobeOn=()=>PATCHWORK_PUBLIC||!!(CAPTAINS&&CAPTAINS.may(false,'wardrobe','patchwork-wardrobe')); +let WR=null,wrAsked=false; +function wrLoad(){ + if(wrAsked)return;wrAsked=true; + const add=src=>new Promise((res,rej)=>{const e=document.createElement('script');e.src=src;e.onload=res;e.onerror=rej;document.head.appendChild(e)}); + (window.BackRoomCosmetics?Promise.resolve():add('../cosmetics.js')).then(()=>add('wardrobe.js')).then(()=>{ + if(!window.PatchworkWardrobe||!window.BackRoomCosmetics)throw new Error('wardrobe did not load'); + WR=window.PatchworkWardrobe({C:window.BackRoomCosmetics,store,$,get on(){return wardrobeOn()},pause(){if(inPlay())setPaused(true)}}); + wrSync(); + }).catch(e=>{wrAsked=false;console.error(e)}); +} +function wrSync(){if(wardrobeOn())wrLoad();if(WR){WR.access();layout()}} +wrSync(); +if(CAPTAINS)CAPTAINS.onChange(wrSync); + // for automated tests only -if(navigator.webdriver)window.__pt={create,step,press,hold,canMove,reachable,startGame,STEP,W,H,COLS,ROWS,TELE,BAT_WARN,cx,fy, +if(navigator.webdriver)window.__pt={get WR(){return WR},wardrobeOn,create,step,press,hold,canMove,reachable,startGame,STEP,W,H,COLS,ROWS,TELE,BAT_WARN,cx,fy, get g(){return G},set g(v){G=v},get paused(){return paused},get best(){return best},get touch(){return touchUI},layout,setPaused, run(sec){const n=Math.round(sec/STEP);for(let i=0;i 0 ? x - 6 : x + 5, y - 18, 1, 4, '#2a2c3a'); } }, // Secret Agent: dark suit edges, a tie and an earpiece + 15: { body: '#f4f6f8', belt: '#c8d0e0', head: '#f4f6f8', visor: '#ffc83a', eye: '#ffffff', light: null, + deco(R, x, y) { R(x - 3, y - 11, 6, 3, '#3a6ad0'); R(x - 2, y - 10, 1, 1, '#ff6b6b'); R(x, y - 10, 1, 1, '#ffd35a'); R(x + 1, y - 10, 1, 1, '#7fe07a'); } } // Astronaut +}; + +// ================================================================ HATS (noAnt: the hat takes the antenna's place) +const HATS = { + 1: { noAnt: true, draw(R, x, y, f) { R(x - 5, y - 23, 10, 3, '#e8453c'); R(x - 4, y - 24, 8, 1, '#e8453c'); R(f > 0 ? x + 3 : x - 9, y - 21, 6, 1, '#b8302c'); R(x - 1, y - 25, 2, 1, '#ffffff'); } }, // Ball Cap + 2: { draw(R, x, y) { R(x - 5, y - 20, 10, 2, '#ffffff'); R(x - 5, y - 19, 10, 1, '#e8453c'); } }, // Sweatband + 3: { noAnt: true, draw(R, x, y) { R(x - 3, y - 27, 6, 2, '#4a3a50'); R(x - 6, y - 25, 12, 3, '#4a3a50'); R(x - 8, y - 22, 16, 2, '#4a3a50'); R(x - 8, y - 22, 16, 1, '#ffd23f'); R(x - 9, y - 23, 2, 1, '#ffd23f'); R(x + 7, y - 23, 2, 1, '#ffd23f'); R(x - 1, y - 25, 2, 2, '#ffffff'); } }, // Pirate Hat + 4: { noAnt: true, draw(R, x, y, f) { R(x - 5, y - 22, 10, 3, '#e8453c'); R(x - 4, y - 23, 8, 1, '#e8453c'); for (const dx of [-4, -1, 2]) R(x + dx, y - 21, 1, 1, '#ffffff'); R(x + 1, y - 23, 1, 1, '#ffffff'); + const k = f > 0 ? x - 7 : x + 5; R(k, y - 21, 2, 1, '#e8453c'); R(f > 0 ? k - 1 : k + 1, y - 20, 2, 2, '#e8453c'); } }, // Pirate Bandana + 5: { noAnt: true, draw(R, x, y) { R(x - 8, y - 21, 16, 1, '#8a7a6a'); R(x - 5, y - 25, 10, 4, '#8a7a6a'); R(x - 5, y - 22, 10, 1, '#2a1d3a'); R(x - 1, y - 25, 2, 1, '#6a5a4a'); R(x - 4, y - 25, 1, 3, '#b8a898'); } }, // Fedora + 6: { noAnt: true, draw(R, x, y) { R(x - 7, y - 21, 14, 1, '#3a3a4c'); R(x - 4, y - 29, 8, 8, '#3a3a4c'); R(x - 4, y - 23, 8, 1, '#e8453c'); R(x - 3, y - 28, 1, 4, '#6a6a80'); } }, // Top Hat + 7: { noAnt: true, draw(R, x, y) { R(x - 7, y - 21, 14, 1, '#4a6ae8'); R(x - 4, y - 23, 8, 2, '#4a6ae8'); R(x - 3, y - 25, 6, 2, '#4a6ae8'); R(x - 2, y - 27, 4, 2, '#4a6ae8'); R(x - 1, y - 29, 3, 2, '#4a6ae8'); R(x + 1, y - 30, 2, 1, '#4a6ae8'); + R(x - 2, y - 23, 1, 1, '#ffe45c'); R(x + 1, y - 26, 1, 1, '#ffe45c'); R(x - 1, y - 28, 1, 1, '#ffffff'); } } // Wizard Hat +}; +// ================================================================ FACE PIECES (on the visor) +const FACES = { + 1: (R, x, y, f) => { R(x - 5, y - 20, 10, 1, '#1a1018'); R(x + (f > 0 ? 0 : -4), y - 19, 4, 4, '#1a1018'); R(x + (f > 0 ? -3 : 1), y - 18, 2, 2, '#ffffff'); }, // Eye Patch: over the front eye; a second eye peeks out behind + 2: (R, x, y, f) => { R(x - 5, y - 18, 10, 3, '#05070f'); R(x + (f > 0 ? 2 : -3), y - 18, 1, 1, '#ffffff'); R(x + (f > 0 ? -3 : 1), y - 17, 2, 1, '#2a3a7a'); }, // Shades + 3: (R, x, y) => { R(x - 3, y - 15, 6, 1, '#6a4028'); R(x - 4, y - 16, 1, 1, '#6a4028'); R(x + 3, y - 16, 1, 1, '#6a4028'); R(x - 2, y - 14, 4, 1, '#6a4028'); } // Big Moustache +}; + +// ================================================================ TRAILS (dropped along a hop) +const TRAILS = { + 1: { life: 0.45, cols: ['#ff5a8a', '#ffd23f', '#38c8e8', '#7ad0a0', '#ffffff'], draw: 'dot' }, // Confetti + 2: { life: 0.5, cols: ['#c9d0e8', '#9aa3d6'], draw: 'nut' }, // Loose Bolts + 3: { life: 0.6, cols: ['#fff6c9', '#9ff2e6'], draw: 'note' }, // Music Notes + 4: { life: 0.4, cols: ['#ff5c5c', '#ffa63d', '#ffe45c', '#5ce07a', '#5cc8ff', '#9a7cff'], draw: 'band' } // Rainbow +}; + +// ---------------------------------------------------------------- the look worn +const DRAWN = { paint: PAINTS, hat: HATS, face: FACES, trail: TRAILS }; +const has = (slot, n) => LIST[slot].some(i => i.no === n) && !!DRAWN[slot][n]; +function readLook() { + let v = null; try { v = JSON.parse(store.get('patchwork-look', 'null')); } catch (e) {} + const o = { p: 0, h: 0, f: 0, t: 0 }; + if (v && typeof v === 'object') for (const [s, k] of SLOTS) { const n = v[k]; if (Number.isInteger(n) && has(s, n)) o[k] = n; } + return o; +} +let worn = readLook(); +const saveLook = () => store.set('patchwork-look', JSON.stringify(worn)); + +// ---------------------------------------------------------------- drawing Rivet: the page's own rectangles, recoloured +// (x, y) are the feet, as in the page's drawBot; f is the way Rivet faces; sw the wrench's swing while fixing. +function bot(ctx, x, y, f, gold, sw, L) { + L = L || worn; + const R = (a, b, w, h, col) => { ctx.fillStyle = col; ctx.fillRect(Math.round(a), Math.round(b), w, h); }; + const P = Object.assign({}, BASE, gold ? {} : (PAINTS[L.p] || {})); + const body = gold ? '#ffd35a' : P.body, head = gold ? '#fff0b8' : P.head, belt = gold ? '#b8902a' : P.belt; + R(x - 5, y - 3, 3, 3, P.foot); R(x + 2, y - 3, 3, 3, P.foot); + R(x - 6, y - 12, 12, 9, body); + if (!gold && P.deco) P.deco(R, x, y, f); + R(x - 6, y - 4, 12, 1, belt); + if (gold || P.light) R(x - 1, y - 9, 2, 2, gold ? BASE.light : P.light); + R(x - 5, y - 20, 10, 8, head); + R(x - 4, y - 18, 8, 3, gold ? BASE.visor : P.visor); + if (!gold && P.headDeco) P.headDeco(R, x, y, f); + if (!gold && P.eyes) P.eyes(R, x, y, f); else R(x + (f > 0 ? 1 : -3), y - 18, 2, 2, gold ? BASE.eye : P.eye); + if (FACES[L.f]) FACES[L.f](R, x, y, f); + const hat = HATS[L.h]; + if (!hat || !hat.noAnt) { R(x, y - 23, 1, 3, P.ant); R(x - 1, y - 25, 2, 2, P.tip); } + if (hat) hat.draw(R, x, y, f); + const ax = x + f * 7 - 1; // the wrench arm, as the page draws it + R(ax, y - 17 + sw, 2, 8, '#c9d0e8'); R(ax - 1, y - 20 + sw, 4, 3, '#c9d0e8'); R(ax, y - 20 + sw, 2, 1, '#0d1230'); + return true; +} + +// ---------------------------------------------------------------- hop trails +function drawPart(ctx, q, T, now) { + const age = now - q.t; if (age > T.life || age < 0) return; + if (age > T.life * 0.6 && Math.floor(age * 20) % 2) return; + const R = (a, b, w, h, col) => { ctx.fillStyle = col; ctx.fillRect(Math.round(a), Math.round(b), w, h); }; + const c = T.cols[q.c % T.cols.length], x = q.x, y = q.y - (T.draw === 'note' ? age * 14 : T.draw === 'dot' ? -age * 10 : 0); + if (T.draw === 'dot') R(x, y, q.c % 2 ? 2 : 1, 1, c); + else if (T.draw === 'nut') { R(x - 1, y, 3, 1, c); R(x, y - 1, 1, 3, c); R(x, y, 1, 1, '#4a5070'); } + else if (T.draw === 'note') { R(x, y - 3, 1, 4, c); R(x - 1, y, 2, 2, c); R(x + 1, y - 3, 1, 1, c); } + else if (T.draw === 'band') { for (let i = 0; i < 6; i++) R(x - 1, y - 14 + i, 3, 1, T.cols[i]); } +} +// one trail's state: the game has one, the Wardrobe's preview another +function makeTrail() { + let parts = [], lastX = null, lastY = null, lastT = 0; + return function trail(ctx, x, y, now) { + const T = TRAILS[worn.t]; if (!T) { parts.length = 0; lastX = null; return; } + if (now < lastT || now - lastT > 1) { parts.length = 0; lastX = null; } + if (lastX !== null && (x !== lastX || y !== lastY) && Math.hypot(x - lastX, y - lastY) < 60) { + const n = Math.max(1, Math.round(Math.hypot(x - lastX, y - lastY) / (T.draw === 'band' ? 2 : 6))); + for (let i = 0; i < n && parts.length < 60; i++) { + const k = (i + 0.5) / n, px = lastX + (x - lastX) * k, py = lastY + (y - lastY) * k, c = parts.length + Math.floor(now * 37); + parts.push({ x: px + (T.draw === 'band' ? 0 : ((c * 5) % 7) - 3), y: py - (T.draw === 'band' ? 0 : 4 + (c * 3) % 9), t: now, c }); + } + } + lastX = x; lastY = y; lastT = now; + parts = parts.filter(q => now - q.t <= T.life && now >= q.t); + for (const q of parts) drawPart(ctx, q, T, now); + }; +} +const trail = makeTrail(), pvTrail = makeTrail(); + +// ================================================================ THE WARDROBE SCREEN +const css = ` +#ptWr{position:fixed;inset:0;z-index:20;display:flex;align-items:center;justify-content:center;background:rgba(5,7,20,.78);padding:max(10px,env(safe-area-inset-top)) 10px 10px} +#ptWr .card{width:min(600px,100%);max-height:100%;overflow:auto;background:#141a44;border:3px solid var(--edge);border-radius:8px;padding:14px;color:var(--ink)} +#ptWr .hd{display:flex;align-items:center;gap:10px;margin-bottom:12px} +#ptWr h2{font:400 13px var(--display);letter-spacing:1px;color:var(--lamp);margin:0;flex:1} +#ptWr .cap{font:400 8px var(--display);background:var(--lamp);color:#1a1400;border-radius:4px;padding:3px 5px;margin-left:8px;vertical-align:middle} +#ptWr .body{display:grid;grid-template-columns:140px 1fr;gap:12px;align-items:start} +#ptWr .pv canvas{width:136px;height:136px;image-rendering:pixelated;border-radius:6px;display:block} +#ptWr .pv b{display:block;font:600 13px var(--body);margin-top:6px} +#ptWr .pv small{display:block;font:400 12px var(--body);color:var(--dim)} +#ptWr .tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px} +#ptWr .tabs button{padding:7px 9px;font-size:9px} +#ptWr .tabs button[aria-pressed=true]{background:var(--lamp);color:#1a1400;border-color:var(--lamp)} +#ptWr .grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:6px} +#ptWr .it{display:flex;flex-direction:column;align-items:center;gap:3px;padding:5px 3px;font:600 11px var(--body);line-height:1.15;text-align:center;min-height:100px;border-radius:6px} +#ptWr .it canvas{width:48px;height:64px;image-rendering:pixelated} +#ptWr .it[aria-pressed=true]{border-color:var(--lamp);background:#2a3478} +#ptWr .it i{display:block;width:26px;height:3px;border-radius:2px;margin-top:auto} +#bWr svg{width:16px;height:16px;display:block;margin:auto} +@media (max-width:520px){#ptWr .body{grid-template-columns:1fr}#ptWr .pv{display:flex;gap:12px;align-items:center}#ptWr .pv canvas{width:90px;height:90px;flex:none}} +@media (max-height:500px){#ptWr .card{width:min(760px,100%)}#ptWr .pv canvas{width:100px;height:100px}} +`; +let built = false, tab = 'paint', openNow = false, raf = 0; +const RCOL = id => ({ common: '#8FA3B8', uncommon: '#4FCB6A', rare: '#3D8BFF', epic: '#B26BFF', legendary: '#F5A524' })[id] || '#8FA3B8'; +function mk(w, h) { const c = document.createElement('canvas'); c.width = w; c.height = h; return c; } +function buildUI() { + if (built) return; built = true; + const st = document.createElement('style'); st.textContent = css; document.head.appendChild(st); + const b = document.createElement('button'); b.className = 'ib'; b.id = 'bWr'; b.type = 'button'; b.setAttribute('aria-label', 'Wardrobe'); + b.innerHTML = ''; + $('bar').insertBefore(b, $('bHelp')); + b.addEventListener('click', e => { e.stopPropagation(); open(); b.blur(); }); + const sec = document.createElement('div'); sec.id = 'ptWr'; sec.hidden = true; sec.setAttribute('role', 'dialog'); sec.setAttribute('aria-modal', 'true'); sec.setAttribute('aria-labelledby', 'ptWrH'); + sec.innerHTML = '

WARDROBECAPTAINS

' + + '
' + + '
'; + document.body.appendChild(sec); + for (const [s, , label] of SLOTS) { const bt = document.createElement('button'); bt.type = 'button'; bt.dataset.s = s; bt.textContent = label.toUpperCase(); bt.addEventListener('click', () => { tab = s; render(); }); $('ptWrTabs').appendChild(bt); } + $('ptWrDone').addEventListener('click', close); + sec.addEventListener('pointerdown', e => { if (e.target === sec) close(); }); + addEventListener('keydown', e => { if (!openNow) return; if (e.code === 'Escape') { e.preventDefault(); close(); } e.stopImmediatePropagation(); }, true); + addEventListener('keyup', e => { if (openNow) e.stopImmediatePropagation(); }, true); +} +function open() { + buildUI(); if (X.pause) X.pause(); + openNow = true; $('ptWr').hidden = false; render(); + cancelAnimationFrame(raf); const loop = () => { if (!openNow) return; drawPreview(); raf = requestAnimationFrame(loop); }; loop(); +} +function close() { openNow = false; cancelAnimationFrame(raf); if ($('ptWr')) $('ptWr').hidden = true; } +const slotKey = s => SLOTS.find(x => x[0] === s)[1]; +const NONE = { paint: 'Factory Teal', hat: 'None', face: 'None', trail: 'None' }; +function render() { + for (const bt of $('ptWrTabs').children) bt.setAttribute('aria-pressed', String(bt.dataset.s === tab)); + const grid = $('ptWrGrid'); grid.textContent = ''; + const k = slotKey(tab); + const opts = [{ no: 0, name: NONE[tab], rarity: '' }].concat(LIST[tab].filter(i => DRAWN[tab][i.no])); + for (const it of opts) { + const bt = document.createElement('button'); bt.type = 'button'; bt.className = 'it'; bt.setAttribute('aria-pressed', String(worn[k] === it.no)); + const cv = mk(24, 32), g = cv.getContext('2d'); + g.fillStyle = '#8a3f3a'; g.fillRect(0, 0, 24, 32); g.fillStyle = '#6f2f2c'; for (let yy = 3; yy < 32; yy += 8) g.fillRect(0, yy, 24, 1); + const L = Object.assign({}, worn, { [k]: it.no }); + if (tab === 'trail' && TRAILS[it.no]) { const T = TRAILS[it.no]; for (let i = 0; i < 5; i++) drawPart(g, { x: 3 + i, y: 27 - i * 3 - (T.draw === 'band' ? -12 : 0), t: 0, c: i }, T, T.draw === 'note' ? 0 : 0.05 * i); } + bot(g, 13, 31, 1, false, 0, L); + bt.appendChild(cv); + const sp = document.createElement('span'); sp.textContent = it.name; bt.appendChild(sp); + if (it.rarity) { const i = document.createElement('i'); i.style.background = RCOL(it.rarity); bt.appendChild(i); } + bt.addEventListener('click', () => { worn[k] = it.no; saveLook(); render(); }); + grid.appendChild(bt); + } + const cur = LIST[tab].find(i => i.no === worn[k]); + $('ptWrName').textContent = cur ? cur.name : NONE[tab]; + $('ptWrDesc').textContent = cur ? (cur.desc || '') : (tab === 'paint' ? 'Rivet as it left the workshop.' : ''); +} +let pvT = 0; +function drawPreview() { + const cv = $('ptWrPv'); if (!cv) return; + const g = cv.getContext('2d'); + g.fillStyle = '#8a3f3a'; g.fillRect(0, 0, 34, 34); g.fillStyle = '#6f2f2c'; + for (let yy = 4; yy < 34; yy += 8) { g.fillRect(0, yy, 34, 1); for (let xx = (yy / 8 | 0) % 2 * 8; xx < 34; xx += 16) g.fillRect(xx, yy - 7, 1, 7); } + pvT += 1 / 60; + const ph = pvT % 2.4, hop = ph > 1.2 && ph < 1.32 ? (ph - 1.2) / 0.12 : 0, dir = Math.floor(pvT / 2.4) % 2 ? -1 : 1; + const x = 17 + (ph < 1.2 ? 0 : 0) + Math.round(Math.sin(hop * Math.PI) * 0), y = 32 - Math.round(Math.sin(hop * Math.PI) * 5); + pvTrail(g, x + (hop ? (hop - 0.5) * 8 * dir : 0), y, pvT); + const fixing = ph > 0.3 && ph < 1.0, sw = fixing ? (Math.floor(pvT * 30) % 2 ? -5 : 1) : 0; + bot(g, x, y, dir, false, sw); +} +function access() { + const on = !!X.on; + if (on) buildUI(); + const el = $('bWr'); if (el) el.hidden = !on; + if (!on) close(); +} +return { + access, open, close, bot, trail, get worn() { return Object.assign({}, worn); }, get active() { return !!X.on; }, + wear(o) { for (const [s, k] of SLOTS) if (o && k in o && (o[k] === 0 || has(s, o[k]))) worn[k] = o[k]; saveLook(); if (openNow) render(); }, + PAINTS, HATS, FACES, TRAILS, MIN_CR, drawPart +}; +}; +})(); diff --git a/e63334287a3deaa3/tidewick/js/es.js b/e63334287a3deaa3/tidewick/js/es.js index c3de698d..894d41dd 100644 --- a/e63334287a3deaa3/tidewick/js/es.js +++ b/e63334287a3deaa3/tidewick/js/es.js @@ -44,7 +44,7 @@ if (window.BackRoomLang) BackRoomLang.add({ 'Eye Patch': 'Parche en el ojo', 'One eye on the sea, one patch on the other.': 'Un ojo en el mar y un parche en el otro.', 'Shades': 'Lentes oscuros', 'Dark glasses, even at night. Especially at night.': 'Lentes oscuros, aun de noche. Sobre todo de noche.', 'Big Moustache': 'Bigote grande', 'A bushy moustache with curled ends.': 'Un bigote tupido con las puntas enruladas.', - 'Sparkles': 'Destellos', 'Little twinkles left on the quay behind you.': 'Brillitos que quedan en el muelle detrás de vos.', + 'Sparkles': 'Destellos', 'Little twinkles left on the quay behind you.': 'Brillitos que quedan en el muelle detrás de ti.', 'Bubbles': 'Burbujas', 'Tiny bubbles that float up into the rain.': 'Burbujitas que suben hacia la lluvia.', 'Confetti': 'Papel picado', 'Bits of coloured paper that flutter down.': 'Papelitos de colores que caen revoloteando.', 'Music Notes': 'Notas musicales', 'A little tune follows you along the harbour.': 'Una melodía te sigue por el puerto.' diff --git a/e63334287a3deaa3/tidewick/js/look.js b/e63334287a3deaa3/tidewick/js/look.js index 27459d8f..a4f48b92 100644 --- a/e63334287a3deaa3/tidewick/js/look.js +++ b/e63334287a3deaa3/tidewick/js/look.js @@ -2,6 +2,6 @@ // ../wardrobe.js, so everyone else's Pip is drawn exactly as always. Looks only: the rules never read anything here. // pip(name, sprite) Pip's sprite in the worn look: the same 16 px width and the same feet, with room on top // for a hat (so draw it at feet - height, as render.js does) -// trail(ctx, g, camX) little pixels left behind Pip while moving, drawn just before Pip +// trail(ctx, g, camX) little pixels left behind Pip while moving, drawn before the enemies and Pip export const look = { pip: null, trail: null }; export const pipSprite = (S, name) => { const s = S[name]; return look.pip && s ? look.pip(name, s) : s; }; diff --git a/e63334287a3deaa3/tidewick/js/render.js b/e63334287a3deaa3/tidewick/js/render.js index 1d81db3f..553a03ad 100644 --- a/e63334287a3deaa3/tidewick/js/render.js +++ b/e63334287a3deaa3/tidewick/js/render.js @@ -234,7 +234,6 @@ export function pipFrame(g) { function drawPip(ctx, g, S, camX) { const p = g.player; if (g.inHut) return; - if (look.trail) look.trail(ctx, g, camX); // a captain's trail (look.js), behind Pip if (g.invuln > 0 && Math.floor(g.invuln / 2) % 2 && g.freeze === 0) return; // blinking after a hit let name = pipFrame(g); // growing / shrinking / catching fire: flicker between the two forms @@ -334,6 +333,7 @@ export function drawWorld(ctx, g, S, opts = {}) { const k = Math.floor((frame + b.x) / 10) % 4; ctx.drawImage(S[k === 0 ? 'button0' : k === 2 ? 'button2' : 'button1'], Math.floor(b.x - 3 - camX), Math.floor(b.y - 1)); } + if (look.trail && g.mode !== 'title') look.trail(ctx, g, camX); // a captain's trail (look.js): under Pip and everything that moves for (const e of scene.enemies) drawEnemy(ctx, e, S, camX, frame); drawBoss(ctx, scene.boss, S, camX, frame); if (!pipBehind && g.mode !== 'title' && g.mode !== 'intro') drawPip(ctx, g, S, camX); diff --git a/e63334287a3deaa3/tidewick/wardrobe.js b/e63334287a3deaa3/tidewick/wardrobe.js index c7918dc4..e17fec7d 100644 --- a/e63334287a3deaa3/tidewick/wardrobe.js +++ b/e63334287a3deaa3/tidewick/wardrobe.js @@ -11,7 +11,7 @@ * - hats sit on top of Pip's head, in rows added ABOVE the sprite; the feet stay where they were, and the hit box is * the rules' own (constants.js), which never looks at a picture. * - face pieces are painted over the face pixels (an eye patch, shades, a moustache). - * - trails are a few single pixels left behind Pip while moving, drawn behind Pip, gone within half a second. + * - trails are a few single pixels left behind Pip while moving, drawn under Pip and the enemies, gone within half a second. * Worn items are saved in this browser only, as tidewick:look = {"o": outfit, "h": hat, "f": face, "t": trail} (item * numbers from ../cosmetics.js, 0 for none). The game has no online players, so nothing is sent anywhere. */ From b4a0443c93d2a382321a92e11f9e17ee8880147d Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 06:37:07 +0000 Subject: [PATCH 33/63] Escapade: a hidden Wardrobe for captains, with the 33 outfits and 4 celebrations Same outfits as Spire and Turbo Trail (outfits.js), worn in the escaper's own colour. Optional wk field in the player's own node, only while worn; checked in onNode like the other fields. The lantern's glow and everything else attached to the escaper is kept. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn --- README.md | 4 +- e63334287a3deaa3/cosmetics.js | 41 +++++++++ e63334287a3deaa3/escapade/es.js | 72 ++++++++++++++++ e63334287a3deaa3/escapade/index.html | 57 +++++++++++-- e63334287a3deaa3/escapade/wardrobe.js | 115 ++++++++++++++++++++++++++ 5 files changed, 278 insertions(+), 11 deletions(-) create mode 100644 e63334287a3deaa3/escapade/wardrobe.js diff --git a/README.md b/README.md index a3b20df7..e0228f34 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Personal site hosted with GitHub Pages at **https://ascoding11.github.io**, the - `e63334287a3deaa3/sky-duel/`: Sky Duel (Back Room), an original arcade dogfighting game for up to 8 planes (three.js r128 with `../autores.js`; one self-contained `index.html`, everything drawn and synthesised in code). **Modes:** Duel (1v1), free-for-all and 2v2 (Blue vs Orange), first to the kill target (5 to 20) or most kills when the clock runs out; solo against bots, or online. **The map** is one height function (`terrainRaw`, whole-number hash noise so every browser builds the same land) sampled on a 150 × 150 grid over 6 km: green hills, lakes and sharp peaks in the west, a red-rock plateau cut by canyons in the east (`CANYONS` are the centre lines), a ring of mountains round it, and clouds you can fly through (the screen whites out inside one). `terrainH` reads the same two triangles per grid square that the mesh draws, so what you see is what you hit. Past `ARENA_R` a pilot gets 8 seconds to turn back. **Flight** (`stepPlane`) is deliberately simple: a plane is a heading, a pitch (kept within ±75°, so no loops) and a bank; it steers toward an aim direction at a turn rate that falls as speed rises, climbing costs speed, hard turns cost a little, and under `STALL` the nose drops until it has picked speed back up. Above `CEIL` the engine fades. Boost drains a meter; a barrel roll (0.8 s, 2.4 s cooldown) slides the plane sideways, makes half the bullets miss and usually shakes off a missile that is about to arrive. The ground, the water and the canyon walls are always fatal. All four planes (`PLANE_GEO`: Puffin, Swift, Heron, Dart) fly the same. **Weapons:** machine guns that overheat (`HEAT_UP` per shot, jammed until they cool to 35%), homing missiles that need the target held within `LOCK_CONE` of the nose for `LOCK_T` seconds (two to start, four at most, one back every 22 s), flares (a 70% chance to pull away each missile within `FLARE_R`), and rings to fly through (`PICKS`: green repairs 45 hull, orange two missiles, white two flares; back after 20 s). **HUD:** the ring is the aim, the amber cross is where the guns point, the diamond is the lead marker (where to shoot so the bullets meet the target); boxes with names, distance and hull on other planes, arrows for the ones off screen, a lock ring, a radar that turns with the plane, a kill feed and warnings (missile, stall, pull up, turn back, overheated). **Bots** (`botThink`, levels in `DIFF`: Rookie, Veteran, Ace) fly the same plane through the same controls: each frame a bot only chooses where to aim, the throttle and which buttons to press; `avoidGround` looks up to 2.6 s ahead and pulls up or turns toward lower ground. **Controls:** the mouse aims and the plane follows (pointer lock), with rebindable keys through `keybinds.js` (saved as `keybinds:sky-duel`; the arrow keys and A/D steer without a mouse); on touch screens a stick, a throttle slider and Roll, Flare, Missile, Boost and Fire buttons, with the radar, feed and score moved so nothing overlaps upright or sideways. **Online:** rooms under `rooms/vq-` in the Firebase Realtime Database (same project and rules as the other games), up to 8 people (`MAX_ROOM`), invite links `#vq-`. Quick match uses the public rooms `vq-pub-1` to `4`, which run free-for-alls by themselves (to 15 kills or 5 minutes, Veteran bots filling to 6, the next match 12 s after one ends); any other code is a private room with a briefing room where the host picks the mode, kill target, time, bots and bot level and presses Take off. A duel is for two pilots and 2v2 for four: with more people in the room the host's choice becomes a free-for-all, and someone who joins a full duel or 2v2 watches until the next match. The shared rules only let a browser write its own node and expect `n, c, x, z, h, ts`, so everything is in `players/`: `n` name, `c` colour, `fr` plane, `x y z` position, `h p r` heading, pitch and bank, `s` speed, `f` flags (1 firing, 2 boosting, 4 rolling, 8 alive, 16 spawn shield, 32 sitting out), `hp`, `k` kills, `d` deaths, `j` join time, `v` format (1), and `ev/e0`…`ev/e31`, a ring of events with a number `i` that only goes up (`h` hits one of your planes landed, added up per target every 0.1 s; `k` one of your planes died, and who gets the credit; `m` a missile launched, `c` it lost its target, `x` it blew up; `f` a flare; `p` a ring taken). The host is the live player with the smallest `j` (a tab that is hidden while hosting moves itself to the back of the line); its node also carries `rs` (the match: `id`, `st` 0 briefing / 1 flying / 2 over, `md` mode, `kl`, `tl`, `lvl`, `fill`, `t0` start time, `sky`, `tm` who is on which team, `bl` which bot seats are in use, `rev`, `et`, `win`) and `bt` (each bot's position, flags, hull and score). Nodes are sent 10 times a second and every other plane is drawn from those time-stamped updates with `netsmooth.js`. Each browser decides the hits of its own bullets and missiles against where it sees the other planes, the browser that owns the plane hit takes the damage and announces the kill, and the killer's own browser adds the kill to its score, so nobody writes anyone else's data (and it isn't cheat-proof). If the host leaves, the next in line carries on from the last `rs` it heard and flies the bots from where they were; a newcomer takes a bot's seat and a bot takes the seat of someone who left (`fixRoster`). Solo and the dogfight behind the menu run the same code with this browser as the host. **Saved in this browser:** `skyduel-name`, `-color`, `-frame`, settings and the last room. **Leaderboards:** play time through `stats.js`, and `kills`, `kdkills`, `deaths` (solo and online), `mkills` (most in a match) and `wins` (online only, with at least one other person flying); the boards are in `leaderboard.js`. Graphics has Pretty and Fast (sharpness and particle counts at once, trees and clouds on the next load); phones start on Fast. `AD_SLOT` is empty. A webdriver-only test hook is `window.__skd`. **Spanish** (lang.js): its words are in `sky-duel/es.js`, banners, warnings, the lock ring and the scores go through `TX()` (those HUD parts are `data-noi18n`), and plane names and bot callsigns stay as they are. - `e63334287a3deaa3/spire/`: Spire (Back Room), an obby-style parkour race up a tower stacked from random sections (Three.js, Firebase Realtime Database rooms under `rooms/tw-…`, same project and rules as Rumble Karts; Quick match uses `rooms/tw-pub-1` to `tw-pub-4`; invite links go through the home page as `#tw-`; rooms hold up to 12). Everything that isn't drawing lives between the `// ==CORE==` and `// ==/CORE==` markers in the page: movement (`PHYS`, `simStep`), parts (upright boxes and cylinders, each optionally moving by `line`, `spin` or `orbit`, timed, crumbling, lethal, bouncy, a conveyor, a climbable truss, `ice` (on the ground you speed up at `ICE_ACC` and slow at `ICE_DEC`, so you slide), a launch pad (`boost`: landing or stepping on it sets your velocity to that vector, and the take-off speed that caps air control is measured again from it) or a wind zone (`zone: 'wind'` with a `wind` vector, usually timed: while it's on it carries you like a conveyor, in the air too)), the section library (`MODS`), towers (`buildTower`), the obby (`buildObby`, `WORLDS`) and the checking bot; it has no DOM or Three.js in it, so a test can run it on its own. Physics is a fixed 120 Hz step with the player as an upright cylinder; moving parts are placed by time alone, so every player who shares the round clock sees the same tower. A jump reaches 3.37 (3.67 counting the pop onto a ledge just above your feet) and you run at 7.5. In the air the stick only nudges you (`airControl`): measured against the way you're flying, it speeds you up (`AIR_ACC`, but never past your take-off speed, or the walk speed if that was slower), turns you (`AIR_TURN`) and slows you (`AIR_BRAKE`), so holding back stops a running jump instead of turning you round, and holding sideways for a whole jump moves you about 2.3; from a standing jump the stick gets the full `AIR_ACC`. Sections keep the step from one route part to the one after next above 3.67 (a big jump can't skip a part), keep beams longer than a running jump, and make hazards too tall or too fast to simply hop. When changing a section, also try running jumps (with the real `simStep`) from each part of its route to every later one, to make sure none can be skipped. A section can offer a second way through: Fork in the Road has a slow lift and a gold shortcut (a narrow beam through a laser, a truss and two pillars, with a SHORTCUT sign, from a part's `sign`); its `build` takes a fourth argument `alt` that routes the bot through the shortcut, and `verifyModule(id, d, mir, t0, seed, alt)` checks that way too. Each section in `MODS` is built in its own frame: it starts on the 4 × 4 pad centred at (0, 0, 8) and must end with `B.exit(H)`, its exit pad at (0, H, -8), staying inside radius 12.5 and above y = 0. Towers are versioned so everyone in a room builds the same one: `towerPlan(seed, n, easy, v)` with `v` 1 is the original 19 sections in the original order (kept exactly, for a host on an older copy of the page), and `v` 2 (`TOWER_V`) adds Gust Gaps, Ice Steps, Launch Pads and Fork in the Road (marked `v: 2` in `MODS`) and climbs steadily: each slot takes the unused section whose difficulty is nearest a target rising from 1.4 to 4 (with a little chance mixed in), and the tightness `d` rises from about 0.12 to 0.72. Towers turn every other section 180° and may mirror any, and between sections there is a porch, a truss and a landing 5.5 higher (`RISE`), more than a jump plus a body (5.37), so nothing you can stand on in one section lets you reach the next one's low parts. Every section also lists a route for the bot (`B.j`, `B.w`, `B.jon`): before each jump the bot simulates it with the real `simStep` and only jumps when it lands (in the air it asks for just the speed that brings it down over the target, `aimAir`, as a player who commits to a jump would), and it waits or hops past hazards, so a route that completes proves the section can be beaten with the real movement numbers. Each landing between sections is also checkpoint `k` (`cp` on the part, its spot in `W.cps[k]`). Towers can have checkpoints (on your own, the Checkpoints switch on the menu, saved as `spire:cpOn`, on by default; online, the host's Checkpoints option, `cp` in the round): then reaching a landing saves your place (a mint landing, a fanfare and a mint mark on the height bar), anything lethal or R puts you back on it, and dropping more than 4 below it counts as a fall and does the same. Without checkpoints, red sends you to the bottom and a fall just lands you lower, as before. Either way the first time you reach each landing the feed shows your split time, and the fastest-tower best counts both (a clean run is just as quick either way). Coins float over two spots on each section's route (the same ones for everyone in a room, picked from the tower's seed): each one you pass through is one coin, picked up in the physics step. When adding or changing a section, run the bot over it at several difficulties, mirrored and not, and at several start times, and over whole towers (`verifyModule`, `runBot`; the page exposes them as `window.__tw` in automated browsers). Online, like Chromaflage, everything travels through each player's own node at `rooms/tw-/players/`, which must always hold `n, c, x, z, h, ts`: position and animation (`y`, `a`), the round the player is in (`r`) and a finish claim (`f`, `round:milliseconds`). The host (newest host number `he`, else whoever has been in the room longest, chosen only once the room's players have loaded) publishes the round as JSON in its own `rs`: `{id, seed, ph, t0, dur, n, ez, ff, rf, fin, ne, cp, v}`, where `seed` builds the tower (with tower version `v`; a round without `v` is version 1 and one without `cp` has no checkpoints, so a host on an older page still works), `t0` is the server time it starts, `ff`/`rf` mark the first finish (from then the clock runs at double speed) and `fin` is the finish order. Other players check the round before using it (`cleanRS`: finite times within a day of now, a finish list of `[uid, ms, name]`, names cleaned), so a broken host can't freeze their page. The host takes finish claims at their word, so it isn't cheat-proof. If the host leaves, the next player carries on from the last round it saw. A tab in the background gets no animation frames, so a 1 s timer keeps its node's `ts` fresh and, for the host, keeps the round ticking. Nothing about a round is kept online after it ends. Saved only in the browser, under `spire:` keys: name, colour, hat (`spire:hat`), checkpoints on your own (`spire:cpOn`), settings, the host's round options (now with `cp`), and a profile (`spire:profile`: coins, XP, towers climbed, best times, falls, the furthest obby stage, best practice times and the hats bought with coins, `hats`), `spire:awarded` (the last online round that paid out, so rejoining it doesn't pay twice) and `spire:climbed` (set after the first truss climb; until then a tip shows at the foot of a truss). Hats (`HATS`): a cap, party hat, beanie, top hat, crown and traffic cone unlock with your level, and a halo, Viking helmet, propeller cap and wizard hat cost 100 to 500 coins (the menu's Hat row; a locked one says what it needs, or offers to buy it). Your hat travels online as `k` on your node. In a tower the sky runs on toward sunset as the camera climbs (`skyAt`); online a place pill beside the clock shows where you are (finishers in order, then everyone else by height), and the height bar has a strip in each section's colour and a gold ring on the leader. Climbers squash and stretch as they jump and land, and flying fast (a launch pad, a long fall) brings in speed lines and widens the view a little. Keys use `keybinds.js` (`keybinds:spire`). V (the `view` action) switches between the camera behind you and first person, as does scrolling all the way in or out; in first person your body moves to layer 1, which only the sun's shadow camera sees, so it's hidden but still casts its shadow, and spectating always uses the camera behind the climber you watch. The choice is saved as `spire:view`. On computers the mouse aims: clicking the game while playing captures it (Pointer Lock), so moving it turns the camera with no button held (0.0026 radians per pixel times Sensitivity, pitch kept to the same limits as before), and a crosshair replaces the cursor (a dot in first person). While aiming in third person the camera sits over your right shoulder and you turn to face where you aim as you move; Shift lock also keeps you facing it standing still. Esc, the pause menu, results, the Controls panel, the menus and spectating all let go of the mouse (only Esc and losing it some other way bring up the pause menu), and a small "Click to aim" shows while it's free during play; you can still move then. If the browser refuses the lock three times running (Chrome refuses a request within about a second of Esc), the hint goes and the old drag-to-look carries on, but every click still tries again. Settings and the pause menu have Sensitivity (`spire:sens`, shared with touch) and Invert Y (`spire:invY`, also for touch, off by default). On touch screens the page adds `touch` to `body` for a move stick, a Jump button, an eye button for first person, drag to look and pinch to zoom, with the Controls buttons hidden. Drawing: parts that never change are merged into one mesh per look and per four sections (vertex colours; the bevelled edges and side shading come from a per-face `fe` attribute that `boxGeo`/`cylGeo` add), while moving, blinking and crumbling parts and checkpoints keep their own meshes; lethal parts are unlit neon with a glow. Scenery (hills, trees, mountains, clouds, the obby's islands) is one mesh each, the sky is one shader, and dust, sparkles and confetti are two point buffers. Graphics Pretty (`spire:gfx` `high`, the default on computers) adds soft sun shadows that follow you, a second cloud layer and more particles; Fast (`low`) is the default on phones. Parties can launch it (its row in `GAMES` in `party.js`, `{ k: 'tw', n: 'Spire', d: 'spire', max: 12, nk: 'spire:name' }`), the Online panel offers room invites to it, and it's in the feedback box's game list. It was archived for a while (October 2026) and brought back with checkpoints, the new sections, coins and hats. **Spanish:** it loads `../lang.js` and its own words in `spire/es.js` (sections, worlds, hats and the made-up tower names, which es.js builds from the two word lists, so keep it in step if those lists change); canvas signs use `T()`, and there is an EN | ES switch next to Controls in Settings and the pause card. **Wardrobe (captains only for now):** `spire/wardrobe.js`, fetched together with `../outfits.js` (the blocky outfits shared with Turbo Trail and Escapade) only when `wardrobeOn()` is true (`WARDROBE_PUBLIC = false` is the one line that opens it to everyone; until then a captain through `../captains.js`, or `?wardrobe=1` on localhost or in an automated browser) or when a climber in the room wears a kit (then only those two files, to draw them), adds a Wardrobe button under the hats on the Climber tab: 33 outfits (17 sports kits made in the climber's own colour, 3 robots, 4 pirates with eye patches, 6 suits and bosses, a wizard, an astronaut and a knight) and 4 celebrations (what bursts out at checkpoint landings and at the top instead of the usual confetti). They are Spire's `outfit` and `cheer` items in `cosmetics.js` (game `spire`, prefix `sp`; in no pack, free for captains to wear). Saved as `spire:wardrobe` (`{o, c}`, item numbers, 0 for none); online it is one optional field in the player's own node, `wk` (`"o.c"`, e.g. `"21.3"`), sent only while something is worn; older pages ignore it, and a page that doesn't know a number draws the plain climber and the usual confetti. An outfit is five vertex-coloured meshes on the climber's own pivots (fewer draw calls than the plain climber's eleven) with pictures from one shared atlas texture, so the hit box, speed and jump are the game's own; an outfit with its own headgear hides your hat while it is worn. Everyone else's page only adds `captains.js`, as every hidden wardrobe does. - `e63334287a3deaa3/turbo-trail/`: Turbo Trail (Back Room), a speedrun obby: 25 short levels (about 6 to 12 seconds each at gold pace) in five worlds of five, Candy Coast, Neon City, Lava Forge, Frost Peaks and Star Drift, each with its own sky, sea, palette and scenery (Three.js, Firebase Realtime Database race rooms under `rooms/sr-…`, same project and rules as Rumble Karts; Quick match uses `rooms/sr-pub-1` to `sr-pub-4`; invite links go through the home page as `#sr-`; rooms hold up to 12). Everything that isn't drawing lives between the `// ==CORE==` and `// ==/CORE==` markers in the page, with no DOM or Three.js in it, so a Node script can run it on its own: movement (`PHYS`, `simStep`), parts (upright boxes and cylinders, optionally moving by `line`, `spin` or `orbit`, blinking (`timed`), crumbling, lethal, a jump pad (`bounce`), a climbing wall (`wj`), ice, or a zone: `speed` pads, `lowg` low gravity and the `portal`), the level builder (`Course`), the levels (`WORLDS`, `LEVELS`, `buildLevel`) and the checking bot. Physics is a fixed 120 Hz step with the runner as an upright cylinder (radius 0.42, height 2), so it plays the same at any frame rate (a slow frame runs several steps; nothing moves more than 0.5 in one step, and the thinnest solid or lethal part is 0.25), and parts are found through an x/z grid of 10 × 10 cells. Running speed is 12.5 with snappy acceleration, a jump rises 3.24 and carries about 9 at full speed, with 0.12 s of coyote time and a 0.14 s jump buffer; in the air the stick speeds you up, turns you and brakes you (`airControl`) but never past your take-off speed. Speed pads push you to 27 along their arrows (the extra speed fades on the ground in about a second and stays in the air), jump pads throw you 7.8 up, and touching a striped climbing wall in the air lets you jump again off it (up 16.5, 8 away from the wall, keeping your speed along it; you also slide down it slowly). Levels are written with the `Course` cursor (`start`, `run`, `gap`, `stones`, `blocks`, `pad`, `bounce`, `bars`, `stairs`, `movers`, `pistons`, `spinner`, `lasers`, `wallrun`, `chimney`, `crumble`, `blinks`, `slalom`, `lowg`, `orbit`, `drop`, `turn`, `portal`); each piece also adds the checking bot's route. The bot plays with the real `simStep`: before each jump it simulates the jump and only takes it if it lands, it hops or waits for hazards, and it pushes off climbing walls; when changing a level, run the bot over it at several start times (moving parts depend on the clock) and at the top upgrade speed (`runBot(buildLevel(i), t0, 90, run)`). The medal times in `MEDALS` ([gold, silver, bronze] per level) come from the bot: gold is its median time over several start times plus 4% and 0.25 s, rounded up to a quarter second, silver is 1.3 × gold and bronze 1.75 × gold, so they need re-working out if a level changes. A level's clock starts with your first move and a fall, a lethal part or R puts you back at the level's start with the clock reset; in a Full run (all 25 on one clock, starting with your first move on 1-1) the clock keeps running through falls and T starts the run over. After each portal the split (your full-run time there against your best run's, or the level time against your best) shows green when ahead and red when behind. Stars: 1, 2 or 3 for a bronze, silver or gold best; they unlock speed upgrades (`SPEEDS`: +4%, +8%, +12% at 12, 30 and 50 stars, chosen in the Garage and used online too) and trails (`TRAILS`, at 3 to 75 stars; a camera-facing ribbon of the last 0.45 s, one draw call). Saved only in the browser under `turbotrail:` keys: `name` (a plain string, which party.js puts back after a party launch), `color`, settings (`sens`, `invY`, `follow`, `ghost`, `vol`, `mus`, `gfx`, `zoom`, `slock`, `hostC`, `room`), `prog` (`{reached, best: [25 times], run: {t, sp: [25 splits]}, speed, trail, clears, falls, runs}`), `ghost:` (your best run on that level, 20 samples a second as comma-separated whole tenths of x, y, z and hundredths of the facing, replayed as a see-through runner when Best ghost is on) and `awarded` (the last race win counted). Online, like Spire, everything travels through each runner's own node `rooms/sr-/players/`, which must always hold `n, c, x, z, h, ts`: also `y`, `a` (animation, 5 while respawning), `l` (which level of the course you're on), `r` (the race the position belongs to), `tr` (trail), `j` (join time) and `f` (a finish claim, `race:milliseconds`). The host (newest host number `he`, else whoever has been in the room longest, chosen once the room has loaded) publishes the race as JSON in its own `rs`: `{id, ph: 'race' | 'inter', t0, cs, nm, fin, ff, ne}`, where `cs` is the course (a random world's five levels, five from all over, or all 25: the host's Course option in the pause menu, saved as `turbotrail:hostC`), `t0` the server time it starts (a 5 s countdown), `fin` the finish order `[uid, ms, name]` and `ff` the first finish; the race ends when everyone live has finished, 30 s after the first finish, or after 45 s a level plus 20 s, then results show for 9 s and the next race starts. Guests clean the host's race before using it (`cleanRS`), so a broken host can't freeze them. The race clock is the simulation clock, so every runner sees the moving parts in the same places; other runners are see-through ghosts (with their trails) drawn from a short history of their updates with `../netsmooth.js`, only while they're on the same level as you, and a list on the right shows everyone's progress. The host takes finish claims at their word, so it isn't cheat-proof. A background tab keeps its node fresh (and, for the host, the race moving) with a 1 s timer. Camera: behind you, pulled in so it never ends up inside a wall, easing round to the way you're running while you hold forward (not while strafing, and not for 0.7 s after you turn it yourself; Settings → Camera: Free turns that off), and a little wider at high speed. On computers clicking the game captures the mouse (Pointer Lock) to look around; Esc frees it. Keys are rebindable with `keybinds.js` (`keybinds:turbo-trail`). On touch screens the page adds `touch` to `body`: a run stick, Jump, a restart button, and drag anywhere else to look; Fast graphics by default. Drawing: parts that never change are merged into one mesh per look (bevelled edges from a per-face `fe` attribute, as in Spire), moving, blinking and crumbling parts keep their own meshes, scenery is one mesh per level, the sky one shader and particles one point buffer, so a level is about 20 to 30 draw calls; Pretty graphics adds sun shadows. Leaderboards hooks: `BackRoomStats.min('obby', seconds)` for a finished full run (`obby` is already in stats.js's `LOWER` list; stats are kept per game folder, so it doesn't mix with Spire's), `max('stars', total)`, `add('levels', 1)` at every portal and `add('wins', 1)` for winning a race against at least one other runner. Ads follow the `AD_SLOT` pattern (empty). A test hook (`window.__sr`, with `advance(seconds)`, `autopilot(on)` and `buildLevel`/`runBot`) exists only when `navigator.webdriver` is set. **Spanish:** it loads `../lang.js` and its own words in `turbo-trail/es.js` (level names stay English; signs drawn on canvases use `T()` and follow the language when the level is built), with an EN | ES switch next to Controls in the menu and pause card. **Wardrobe (captains only for now):** `turbo-trail/wardrobe.js`, fetched together with `../outfits.js` (the blocky outfits shared with Spire and Escapade) only when `wardrobeOn()` is true (`WARDROBE_PUBLIC = false` is the one line that opens it to everyone; until then a captain through `../captains.js`, or `?wardrobe=1` on localhost or in an automated browser) or when a runner in the race wears a kit (then only those two files, to draw them), adds a Wardrobe button in the Garage under the trails: the same 33 outfits as Spire, made in the runner's own colour (an outfit replaces the runner's cap, goggles, backpack and scarf), and 4 celebrations (what bursts out when you finish a race, a full run or the last level, instead of the usual confetti). They are Turbo Trail's `outfit` and `cheer` items in `cosmetics.js` (game `turbo-trail`, prefix `tr`; in no pack, free for captains to wear). The Garage's speeds and trails are not touched. Saved as `turbotrail:wardrobe` (`{o, c}`, item numbers, 0 for none); online it is one optional field in the runner's own node, `wk` (`"o.c"`), sent only while something is worn; older pages ignore it, and a page that doesn't know a number draws the plain runner. Other runners stay see-through ghosts in their outfits (each dressed ghost has its own see-through material, as the plain ones share the page's). An outfit is five vertex-coloured meshes on the runner's own pivots (one draw call fewer than the plain runner), keeping the runner's own glow, so the hit box, speed and jump are unchanged. Everyone else's page only adds `captains.js`, as every hidden wardrobe does. -- `e63334287a3deaa3/escapade/`: Escapade (Back Room), a 3D escape-room obby (Three.js, Firebase Realtime Database rooms under `rooms/er-…`, same project and rules as Rumble Karts; Quick match uses `rooms/er-pub-1` to `er-pub-4`; invite links go through the home page as `#er-`; rooms hold up to 12). **Worlds:** six worlds of eight levels (48), each level a themed set of rooms with one way out, harder world by world. World 1, Breakout (Detention, Lab Rats, Hot Kitchen, Toy Box, Down the Drain, The Vault, Orbit Station, The Warden), is built into `index.html`, unchanged. World 2, Lost and Found (Overdue (a library), Clockwork (a clock tower), Cold Feet (an ice cave), Lost Temple, Mirror Manor (a haunted house), Stage Fright (a theatre), Gale Point (a lighthouse in a storm) and After Hours (a museum, the world's finale)), is `escapade/worlds/w2.js`; its first five were levels 9–13 before worlds came, with the same ids. World 3, Deep Down (Cave-In (an old mine), Deep End (a flooded cave), Off the Rails (an underground railway), High Water (a pump station), Fish Tank (an aquarium), Crystal Clear (a crystal cavern), Hull Breach (a sunken ship) and Hot Core (a volcano, the world's finale)), is `escapade/worlds/w3.js`; it added water you swim in (jump strokes up; an Air bar while your head is under), minecarts on rails (`rail`), water and lava that rise (`rise`, started by a flag or a trigger zone) and dark rooms you need the lantern for (`B.dark`, item `lamp`). World 4, Full Power (Assembly Line (a toy factory), Sorting Day (a recycling plant), Spin Cycle (a power station), Growing Pains (a greenhouse), Hot Swap (a data centre), Night Shift (an observatory), Spare Parts (a robot lab) and Meltdown (a power plant, the finale)), is `escapade/worlds/w4.js`; it added belts and fans a lever turns round (`rev`), pressure plates you stand on (`B.hold`), presses and piston walls that crush (`B.crusher`, `B.press`) and red, green and yellow keycards with their doors (`B.cardDoor`). World 5, Sky High (Hot Air (a balloon festival), Big Top (a flying circus), Thunderclap (a skyscraper in a storm), Sky Deck (a revolving restaurant), Zeppelin (an airship), Cloud Keep (a castle in the clouds), Orbiter (a satellite) and Eye of the Storm (a weather station in a hurricane, the finale)), is `escapade/worlds/w5.js`; it added updrafts (`B.lift`), cannons you fire yourself from (`B.cannon`, a `{w5: 'cannon'}` button), lightning on a timer with rods that power gates (`B.bolt`), groups of parts that turn a step at a press (`B.turning`, `B.turnBtn`, `B.align`) and the `clouds` scenery. World 6, The Last Door (One Way Home (a labyrinth with one-way flaps), Sun and Sand (a pyramid), Siege Works (a fortress), Dragon's Wake (a dragon's keep), Borrowed Time (a vault of clocks), Upside Dream (a dream), Long Climb (a climb over a molten sea) and The Last Door (the Keeper, a three-phase boss, and the end of the game)), is `escapade/worlds/w6.js`; it added one-way flaps (`oneway: [nx, nz]`, `B.oneway`), rings of fire you jump (shape `ring`, move `pulse`, `B.ring`) and the shadow (`B.shadow` zones: a chaser that walks your own path a few seconds behind you); escaping its last level shows "You beat Escapade!". Each of Worlds 3–6 keeps its shared code in its own marked blocks in `index.html` (`// ---- World core additions ----` inside the CORE, `// ---- World drawing additions ----` outside it) with one-line hooks ending `// W hook`; each does nothing unless a level uses it, and `worlds/README.md` section 13 lists every helper. Worlds 3–6 are `needs: 3` (`CORE_VER` 3). Each world after the first is its own file, `worlds/w.js`, loaded only when it's needed (picked in the menus, the level an online room is playing, or the next world when you reach a world's last level), so the page stays small; a world file only describes levels (`Escapade.world({n, needs, levels})`), and every shared helper, puzzle part and the bot live in `index.html`. **`escapade/worlds/README.md` is the guide for building a world**: the API, every helper and puzzle with its parameters, seeds, checkpoints, stars, the bot route, the tests a level must pass, a performance budget, a difficulty guide and the mechanics already used. The `WORLDS` list in `index.html` (one line per world: name, colour, blurb and its eight level ids) is what the menus show before a file loads and what progress counts by. `CORE_VER` goes up when the page gains something world files can use; a file says which one it needs, and a page too old for it (or one that can't load it) shows an "Update needed, reload" notice instead of breaking. Everything that isn't drawing lives between the `// ==CORE==` and `// ==/CORE==` markers: movement (`PHYS`, `simStep`, Spire's numbers: jump 3.37, 3.67 with the ledge pop, run 7.5, fixed 120 Hz step, so the frame rate never changes the physics), parts (upright boxes and cylinders, filed in a 6 × 6 xz grid for collision; moving by `line`, `spin` or `orbit`; timed, crumbling, lethal, bouncy, conveyors, ladders, low-gravity zones; and for levels 9–13: `ice` (slippery: you speed up and stop slowly, `PHYS.ICE_ACC`/`ICE_DEC`), the move types `swing` (a pendulum: platforms and blades that stay level, hanging `len` below a pivot) and `roll` (one way at a steady speed, then round again: the temple's boulder), ladders (trusses) that move and carry you while you hang on (stick off = hang, stick into it = climb), `tp` portals (`[x, y, z, yaw]`: where they send you; put the arrival point a little above the floor), zones `cold` (you freeze after `PHYS.COLD` seconds in it, shown as a Warmth bar) and `warm` (a fire thaws you), and `slide` crates (one shove and they slide until something stops them); and for World 2's last three: zones `wind` (`wind: [vx, vz]`, blows you along on the ground and in the air, in gusts when `timed`; white streaks show it, fainter just before a gust; the bot leans into it), the lever button `{toggle}` (flips a flag on and off, for scenery that swaps with `onIf`/`offIf`) and `B.all(flags, set)` (a flag that comes on once all of its flags are: the museum's vault), plus level options `sea` (a molten sea to the horizon instead of the lawn) and `msgs`/`unlock` (a level's own feed messages and Unlocked! banners)), the puzzle parts and `logicStep`/`useBtn`/`tryCode`, the level library (`LEVELS`, each with a `par` target time and a `build` that also writes the checking bot's route) and the bot; it has no DOM or Three.js in it, so a Node test can run it on its own. **Puzzles are flags** in the level's state `W.st.f`: a part with `door: 'flag'` is solid until the flag is on (a number means "on until that time": timed gates); `onIf`/`offIf` make a part exist only while a flag is on/off (the space bridge, the Warden's arms); `lock: 'item'` opens a door when you come near carrying the item; `item` parts are pickups (`key`, `card`, `fuse`, `gem`); `btn` parts are used with E / the USE button: `{set}` (a button), `{timed, dur}` (a valve), `{seq, sym}` (recipe buttons, pressed in the order `W.seqs[g].order`), `{pad}` (a keypad; the code is `W.codes[k]`, four digits from the level's seed), `{need, then}` (a fuse box), `{dial, key, n}` (turns one hand of the clock: `W.dials[g]` holds the target time, from the seed; all of a group's dials on target sets its flag), `{mirror}` (turns a mirror a quarter; `beamTrace` follows the moonbeam in `W.beams[g]` across the floor, and the beam reaching its target sets the flag); `plate` parts latch a pushed crate (`push`, kept inside `lim`, pushed along one axis at a time) and set their flag; `step` parts (`{seq, sym}`, the temple's stones) count when you land on them, in the order `W.seqs[g].order` (the mural shows it). The library's code is `W.codes.lib`, its digits shown on four coloured books in the order `W.books.lib`; the manor's right mirror is the colour `W.rose` (from the seed, like every other clue). Walls are 10 tall (22 in the low-gravity bay) so nothing standable gets you over them. Each level keeps the puzzle in its own copy for every player: there are no shared doors, so nobody can open or block anything for anyone else. **Stars**, saved in this browser under `escapade:prof` (`{best: {levelId: seconds}, st: {levelId: bits}, esc, deaths}`; bits 1 escaped, 2 beat `par`, 4 found the gem; the gem counts once found in any escaped run), by level id as always, so saves from before worlds came load as they were (8 escaped shows World 1 done and World 2 open; 13 shows World 2's first five done). The menus: Play carries on from the first level you haven't escaped; Worlds shows a card per world (name, stars of 24, how many escaped, locked or coming soon), then that world's eight levels. A level opens when you escape the one before it in its world; a world opens when you escape the last level of the one before it (or any of its own levels, say online). The menu counts escapes of 48 and stars of 144. Death (touching anything red and glowing, or falling) respawns you at your last checkpoint after 0.6 s; what you found and opened stays, crates not on their plate go home, crumbled tiles come back and timed gates shut (`softReset`). On your own the clock stops while paused or while the keypad is open. **Online**: each player writes only their own node `rooms/er-/players/`: `n, c, x, z, h, ts` as the shared rules require, plus `y`, `a` (animation), `j` (join time), `rr` (the round you're playing), `f` (your finish, `round:ms:server time`) and, from the room's leader only, `lr`/`ll`/`lt` (round number, level, start time). The leader is the live player who joined first (`Net.leader`); everyone else follows the leader's round, loading that level with a seed made from the round (so codes and recipes match for everyone) and running moving parts from `lt`, so all players see the same moving platforms. Late arrivals' own clocks start when they arrive. When everyone in the room is out (6 s later), or two minutes after the first escape, the leader starts the next level; the leader can also pick a level from the pause menu. If the leader leaves, the next one carries on with the same round. Other players are drawn with `../netsmooth.js` and only while they're in your round. Every value read from another node is checked (`onNode`). Each node also has `v`, its page's `CORE_VER`. The leader can pick any level in the worlds and levels it has opened itself (pause menu, Pick the room's level); everyone else loads that level's world file when they see the round (the round starts 4.5 s later, and a late loader's clock starts when it arrives), and a page that doesn't know the level shows the update notice. Pages from before worlds came (no `v`) only know levels 1–8 and simply don't follow a later level: the room list says they need to reload and the leader's feed names them. Keys are rebindable through `keybinds.js` (`keybinds:escapade`, actions `forward`, `back`, `left`, `right`, `jump`, `use`, `shiftLock`, `view`, `zoomIn`, `zoomOut`, `reset`). Touch: stick, JUMP, USE (green when something can be used), drag to look, pinch to zoom; shown only on touch screens. Other saved settings: `escapade:` `name`, `color`, `room`, `sens`, `invY`, `vol`, `mus`, `gfx`, `view`, `zoom`, `slock`. Leaderboards hooks: `BackRoomStats.add('escapes', 1)`, `max('cleared', n)` (levels escaped, up to 48), `max('stars', n)` (up to 144), `min('total', seconds)` (World 1's best total: the sum of its eight best times once they all have one, as before worlds came, so totals already on the board still compare; the menu calls it "World 1 total") and `min('total-w', seconds)` for each later world (`total-w2` … `total-w6` are in `stats.js`'s `LOWER`; the board has a row for each world). Ads follow the `AD_SLOT` pattern (empty). A test hook (`window.__er`, with `advance`, `frames`, `autopilot`, `depth`, `ensureWorld`) exists only when `navigator.webdriver` is set. **When changing a level**, keep the route in its `build` working and re-run the bot on it at several start times, and check that every puzzle door is still needed: with one door kept shut and all the others open, running, jumping and running jumps from everywhere reachable must not reach the exit (the checks used for this branch ran exactly that on all eight levels; levels 9–13 were checked the same way, with the search keeping the whole player state so rides on moving ladders count, and with each portal taken away in turn: the manor's right mirror and its last mirror are needed; World 2's last three too, with levers as part of the search: the theatre can't be crossed with its levers left either way, and its stage door, the lighthouse's beacon and the museum's vault and exit doors are all needed). Worlds 3–6 were checked the same way: the bot from the spawn and from every checkpoint at several seeds and start times, the search with each gate shut in turn (extended to swim, ride carts, carry keys and turn the turning rooms), random runners for clipping, draw calls, phones and an online room; the merged page still plays Worlds 1 and 2 exactly as before (same parts, codes and bot runs). The checking bot has route steps for the new things: `ladder` (a plan saying wait, grab, hang or climb), `dial`, `tp`, `kick` (a sliding crate) and `steps` (stepping stones, by way of a hub platform). **Spanish:** it loads `../lang.js` and its own words for the page and all six worlds in `escapade/es.js` (a new level's signs and messages need their Spanish added there, or they show in English); level and world names and the EXIT sign stay English. Every canvas made by `cvs()` passes its text through `TX()` while the language is Spanish, so the world files need no changes, and compass dials show N E S O. The puzzles are codes, colours, clocks and pictures, not English words, so none is English-only. EN | ES switch next to Controls. +- `e63334287a3deaa3/escapade/`: Escapade (Back Room), a 3D escape-room obby (Three.js, Firebase Realtime Database rooms under `rooms/er-…`, same project and rules as Rumble Karts; Quick match uses `rooms/er-pub-1` to `er-pub-4`; invite links go through the home page as `#er-`; rooms hold up to 12). **Worlds:** six worlds of eight levels (48), each level a themed set of rooms with one way out, harder world by world. World 1, Breakout (Detention, Lab Rats, Hot Kitchen, Toy Box, Down the Drain, The Vault, Orbit Station, The Warden), is built into `index.html`, unchanged. World 2, Lost and Found (Overdue (a library), Clockwork (a clock tower), Cold Feet (an ice cave), Lost Temple, Mirror Manor (a haunted house), Stage Fright (a theatre), Gale Point (a lighthouse in a storm) and After Hours (a museum, the world's finale)), is `escapade/worlds/w2.js`; its first five were levels 9–13 before worlds came, with the same ids. World 3, Deep Down (Cave-In (an old mine), Deep End (a flooded cave), Off the Rails (an underground railway), High Water (a pump station), Fish Tank (an aquarium), Crystal Clear (a crystal cavern), Hull Breach (a sunken ship) and Hot Core (a volcano, the world's finale)), is `escapade/worlds/w3.js`; it added water you swim in (jump strokes up; an Air bar while your head is under), minecarts on rails (`rail`), water and lava that rise (`rise`, started by a flag or a trigger zone) and dark rooms you need the lantern for (`B.dark`, item `lamp`). World 4, Full Power (Assembly Line (a toy factory), Sorting Day (a recycling plant), Spin Cycle (a power station), Growing Pains (a greenhouse), Hot Swap (a data centre), Night Shift (an observatory), Spare Parts (a robot lab) and Meltdown (a power plant, the finale)), is `escapade/worlds/w4.js`; it added belts and fans a lever turns round (`rev`), pressure plates you stand on (`B.hold`), presses and piston walls that crush (`B.crusher`, `B.press`) and red, green and yellow keycards with their doors (`B.cardDoor`). World 5, Sky High (Hot Air (a balloon festival), Big Top (a flying circus), Thunderclap (a skyscraper in a storm), Sky Deck (a revolving restaurant), Zeppelin (an airship), Cloud Keep (a castle in the clouds), Orbiter (a satellite) and Eye of the Storm (a weather station in a hurricane, the finale)), is `escapade/worlds/w5.js`; it added updrafts (`B.lift`), cannons you fire yourself from (`B.cannon`, a `{w5: 'cannon'}` button), lightning on a timer with rods that power gates (`B.bolt`), groups of parts that turn a step at a press (`B.turning`, `B.turnBtn`, `B.align`) and the `clouds` scenery. World 6, The Last Door (One Way Home (a labyrinth with one-way flaps), Sun and Sand (a pyramid), Siege Works (a fortress), Dragon's Wake (a dragon's keep), Borrowed Time (a vault of clocks), Upside Dream (a dream), Long Climb (a climb over a molten sea) and The Last Door (the Keeper, a three-phase boss, and the end of the game)), is `escapade/worlds/w6.js`; it added one-way flaps (`oneway: [nx, nz]`, `B.oneway`), rings of fire you jump (shape `ring`, move `pulse`, `B.ring`) and the shadow (`B.shadow` zones: a chaser that walks your own path a few seconds behind you); escaping its last level shows "You beat Escapade!". Each of Worlds 3–6 keeps its shared code in its own marked blocks in `index.html` (`// ---- World core additions ----` inside the CORE, `// ---- World drawing additions ----` outside it) with one-line hooks ending `// W hook`; each does nothing unless a level uses it, and `worlds/README.md` section 13 lists every helper. Worlds 3–6 are `needs: 3` (`CORE_VER` 3). Each world after the first is its own file, `worlds/w.js`, loaded only when it's needed (picked in the menus, the level an online room is playing, or the next world when you reach a world's last level), so the page stays small; a world file only describes levels (`Escapade.world({n, needs, levels})`), and every shared helper, puzzle part and the bot live in `index.html`. **`escapade/worlds/README.md` is the guide for building a world**: the API, every helper and puzzle with its parameters, seeds, checkpoints, stars, the bot route, the tests a level must pass, a performance budget, a difficulty guide and the mechanics already used. The `WORLDS` list in `index.html` (one line per world: name, colour, blurb and its eight level ids) is what the menus show before a file loads and what progress counts by. `CORE_VER` goes up when the page gains something world files can use; a file says which one it needs, and a page too old for it (or one that can't load it) shows an "Update needed, reload" notice instead of breaking. Everything that isn't drawing lives between the `// ==CORE==` and `// ==/CORE==` markers: movement (`PHYS`, `simStep`, Spire's numbers: jump 3.37, 3.67 with the ledge pop, run 7.5, fixed 120 Hz step, so the frame rate never changes the physics), parts (upright boxes and cylinders, filed in a 6 × 6 xz grid for collision; moving by `line`, `spin` or `orbit`; timed, crumbling, lethal, bouncy, conveyors, ladders, low-gravity zones; and for levels 9–13: `ice` (slippery: you speed up and stop slowly, `PHYS.ICE_ACC`/`ICE_DEC`), the move types `swing` (a pendulum: platforms and blades that stay level, hanging `len` below a pivot) and `roll` (one way at a steady speed, then round again: the temple's boulder), ladders (trusses) that move and carry you while you hang on (stick off = hang, stick into it = climb), `tp` portals (`[x, y, z, yaw]`: where they send you; put the arrival point a little above the floor), zones `cold` (you freeze after `PHYS.COLD` seconds in it, shown as a Warmth bar) and `warm` (a fire thaws you), and `slide` crates (one shove and they slide until something stops them); and for World 2's last three: zones `wind` (`wind: [vx, vz]`, blows you along on the ground and in the air, in gusts when `timed`; white streaks show it, fainter just before a gust; the bot leans into it), the lever button `{toggle}` (flips a flag on and off, for scenery that swaps with `onIf`/`offIf`) and `B.all(flags, set)` (a flag that comes on once all of its flags are: the museum's vault), plus level options `sea` (a molten sea to the horizon instead of the lawn) and `msgs`/`unlock` (a level's own feed messages and Unlocked! banners)), the puzzle parts and `logicStep`/`useBtn`/`tryCode`, the level library (`LEVELS`, each with a `par` target time and a `build` that also writes the checking bot's route) and the bot; it has no DOM or Three.js in it, so a Node test can run it on its own. **Puzzles are flags** in the level's state `W.st.f`: a part with `door: 'flag'` is solid until the flag is on (a number means "on until that time": timed gates); `onIf`/`offIf` make a part exist only while a flag is on/off (the space bridge, the Warden's arms); `lock: 'item'` opens a door when you come near carrying the item; `item` parts are pickups (`key`, `card`, `fuse`, `gem`); `btn` parts are used with E / the USE button: `{set}` (a button), `{timed, dur}` (a valve), `{seq, sym}` (recipe buttons, pressed in the order `W.seqs[g].order`), `{pad}` (a keypad; the code is `W.codes[k]`, four digits from the level's seed), `{need, then}` (a fuse box), `{dial, key, n}` (turns one hand of the clock: `W.dials[g]` holds the target time, from the seed; all of a group's dials on target sets its flag), `{mirror}` (turns a mirror a quarter; `beamTrace` follows the moonbeam in `W.beams[g]` across the floor, and the beam reaching its target sets the flag); `plate` parts latch a pushed crate (`push`, kept inside `lim`, pushed along one axis at a time) and set their flag; `step` parts (`{seq, sym}`, the temple's stones) count when you land on them, in the order `W.seqs[g].order` (the mural shows it). The library's code is `W.codes.lib`, its digits shown on four coloured books in the order `W.books.lib`; the manor's right mirror is the colour `W.rose` (from the seed, like every other clue). Walls are 10 tall (22 in the low-gravity bay) so nothing standable gets you over them. Each level keeps the puzzle in its own copy for every player: there are no shared doors, so nobody can open or block anything for anyone else. **Stars**, saved in this browser under `escapade:prof` (`{best: {levelId: seconds}, st: {levelId: bits}, esc, deaths}`; bits 1 escaped, 2 beat `par`, 4 found the gem; the gem counts once found in any escaped run), by level id as always, so saves from before worlds came load as they were (8 escaped shows World 1 done and World 2 open; 13 shows World 2's first five done). The menus: Play carries on from the first level you haven't escaped; Worlds shows a card per world (name, stars of 24, how many escaped, locked or coming soon), then that world's eight levels. A level opens when you escape the one before it in its world; a world opens when you escape the last level of the one before it (or any of its own levels, say online). The menu counts escapes of 48 and stars of 144. Death (touching anything red and glowing, or falling) respawns you at your last checkpoint after 0.6 s; what you found and opened stays, crates not on their plate go home, crumbled tiles come back and timed gates shut (`softReset`). On your own the clock stops while paused or while the keypad is open. **Online**: each player writes only their own node `rooms/er-/players/`: `n, c, x, z, h, ts` as the shared rules require, plus `y`, `a` (animation), `j` (join time), `rr` (the round you're playing), `f` (your finish, `round:ms:server time`) and, from the room's leader only, `lr`/`ll`/`lt` (round number, level, start time). The leader is the live player who joined first (`Net.leader`); everyone else follows the leader's round, loading that level with a seed made from the round (so codes and recipes match for everyone) and running moving parts from `lt`, so all players see the same moving platforms. Late arrivals' own clocks start when they arrive. When everyone in the room is out (6 s later), or two minutes after the first escape, the leader starts the next level; the leader can also pick a level from the pause menu. If the leader leaves, the next one carries on with the same round. Other players are drawn with `../netsmooth.js` and only while they're in your round. Every value read from another node is checked (`onNode`). Each node also has `v`, its page's `CORE_VER`. The leader can pick any level in the worlds and levels it has opened itself (pause menu, Pick the room's level); everyone else loads that level's world file when they see the round (the round starts 4.5 s later, and a late loader's clock starts when it arrives), and a page that doesn't know the level shows the update notice. Pages from before worlds came (no `v`) only know levels 1–8 and simply don't follow a later level: the room list says they need to reload and the leader's feed names them. Keys are rebindable through `keybinds.js` (`keybinds:escapade`, actions `forward`, `back`, `left`, `right`, `jump`, `use`, `shiftLock`, `view`, `zoomIn`, `zoomOut`, `reset`). Touch: stick, JUMP, USE (green when something can be used), drag to look, pinch to zoom; shown only on touch screens. Other saved settings: `escapade:` `name`, `color`, `room`, `sens`, `invY`, `vol`, `mus`, `gfx`, `view`, `zoom`, `slock`. Leaderboards hooks: `BackRoomStats.add('escapes', 1)`, `max('cleared', n)` (levels escaped, up to 48), `max('stars', n)` (up to 144), `min('total', seconds)` (World 1's best total: the sum of its eight best times once they all have one, as before worlds came, so totals already on the board still compare; the menu calls it "World 1 total") and `min('total-w', seconds)` for each later world (`total-w2` … `total-w6` are in `stats.js`'s `LOWER`; the board has a row for each world). Ads follow the `AD_SLOT` pattern (empty). A test hook (`window.__er`, with `advance`, `frames`, `autopilot`, `depth`, `ensureWorld`) exists only when `navigator.webdriver` is set. **When changing a level**, keep the route in its `build` working and re-run the bot on it at several start times, and check that every puzzle door is still needed: with one door kept shut and all the others open, running, jumping and running jumps from everywhere reachable must not reach the exit (the checks used for this branch ran exactly that on all eight levels; levels 9–13 were checked the same way, with the search keeping the whole player state so rides on moving ladders count, and with each portal taken away in turn: the manor's right mirror and its last mirror are needed; World 2's last three too, with levers as part of the search: the theatre can't be crossed with its levers left either way, and its stage door, the lighthouse's beacon and the museum's vault and exit doors are all needed). Worlds 3–6 were checked the same way: the bot from the spawn and from every checkpoint at several seeds and start times, the search with each gate shut in turn (extended to swim, ride carts, carry keys and turn the turning rooms), random runners for clipping, draw calls, phones and an online room; the merged page still plays Worlds 1 and 2 exactly as before (same parts, codes and bot runs). The checking bot has route steps for the new things: `ladder` (a plan saying wait, grab, hang or climb), `dial`, `tp`, `kick` (a sliding crate) and `steps` (stepping stones, by way of a hub platform). **Spanish:** it loads `../lang.js` and its own words for the page and all six worlds in `escapade/es.js` (a new level's signs and messages need their Spanish added there, or they show in English); level and world names and the EXIT sign stay English. Every canvas made by `cvs()` passes its text through `TX()` while the language is Spanish, so the world files need no changes, and compass dials show N E S O. The puzzles are codes, colours, clocks and pictures, not English words, so none is English-only. EN | ES switch next to Controls. **Wardrobe (captains only for now):** `escapade/wardrobe.js`, fetched together with `../outfits.js` (the blocky outfits shared with Spire and Turbo Trail) only when `wardrobeOn()` is true (`WARDROBE_PUBLIC = false` is the one line that opens it to everyone; until then a captain through `../captains.js`, or `?wardrobe=1` on localhost or in an automated browser) or when an escaper in the room wears a kit (then only those two files, to draw them), adds a Wardrobe button under your name and colour on the menu: the same 33 outfits as Spire, made in the escaper's own colour, and 4 celebrations (what bursts out when you escape a level, or another escaper in your round does, instead of the usual confetti). They are Escapade's `outfit` and `cheer` items in `cosmetics.js` (game `escapade`, prefix `ec`; in no pack, free for captains to wear). Saved as `escapade:wardrobe` (`{o, c}`, item numbers, 0 for none); online it is one optional field in the player's own node, `wk` (`"o.c"`), sent only while something is worn; older pages ignore it (`onNode` checks it like every other field), and a page that doesn't know a number draws the plain escaper and the usual confetti. An outfit is five vertex-coloured meshes on the escaper's own pivots (fewer draw calls than the plain escaper's eleven), so the hit box, speed and jump are unchanged, and what the page attaches to the escaper (the lantern's glow) is left as it is. Everyone else's page only adds `captains.js`, as every hidden wardrobe does. - `e63334287a3deaa3/odd-one-out/`: Odd One Out (Back Room), Props vs Hunters (prop hunt) for up to 16 players (Three.js, Firebase Realtime Database rooms under `rooms/ph-…`, same project and rules as Rumble Karts; Quick match uses `rooms/ph-pub-1` to `ph-pub-4`; invite links go through the home page as `#ph-`). Props aim at an object and turn into an exact copy of it; hunters wait in a closed room during the hide time, then hunt with a hitscan rifle, and a shot that hits a real object is free by default (the host can switch a 3 or 5 HP penalty on in the lobby: `pen` in the settings; a penalty saved by an older page is ignored unless the host picked it again, `oddone-hostpen`). Props move by size, the smaller the slower: from 3.0 m a second for a cup through about 3.7 for a cardboard box and 3.9 for a bench to 4.3 for a sofa (`speed` where each object type is defined: 3.9 + 0.55 × log10(volume / 0.3), kept between 3.0 and 4.4; it used to be the other way round; the hunter runs at 5.2), so the hard-to-spot small ones can't also outrun anyone; health also goes by size (40 to 200) unless the host sets All 100. A match is 3 to 10 rounds and the hunters are picked so everyone takes turns (`newRound`, by how often each player has hunted, `hn`). Every object you can turn into is a type in `buildProps` (`defProp(id, name, parts)`, where parts are plain Three.js shapes merged into one geometry per material, with the origin in the middle of the base and the front facing +z); a map draws its copies of a type as instanced meshes (`buildInstances`) and a disguised player draws the very same geometries and materials (`propModel`), so the two can't be told apart, and both use the type's own box for collisions and shots. Health scales with the type's size (40 to 200) unless the host picks All 100. To add a type, add a `defProp` line (and `{elig: false}` for things players shouldn't turn into); to add a map, write a `build…` function with the `Builder` helpers (`box` for walls and fixed furniture, `at` for turned furniture, `place(id, x, z, yaw, y)` for turnable objects, `kit` for walls with doors, floors, ceilings and lights, `hunterRoom` for the waiting room outside the map) and add it to `MAPS`; keep every placed object where a player can walk up to it. Like Chromaflage, everything travels through each player's own node at `rooms/ph-/players/`, because the shared rules expect `n, c, x, z, h, ts` there and refuse other paths for new prefixes: position and look (`y`, `p` aim pitch, `d` the type you've turned into), the last shot (`sh`, for tracers), running hit totals for the round (`hd`: `round|uid:hits,…|hits on real objects|session`, where the session is when that browser joined, so a reload starts the totals again) and, from the host, the round state as JSON in `rs` with host number `he`. The host (newest host number, else whoever has been in the room longest, and only once the room's players have loaded) runs the phases (`lobby`, `hide`, `hunt`, `end`, `over`) and works out health from the hit totals, checking them loosely (the shooter must be a living hunter, the target a living prop within 90 m, and no more hits than the rifle could fire); if it leaves, the next player carries on from the last round state it saw and counts the totals it can already see as done. Each browser reports its own hits, so it isn't cheat-proof. Anything read from another player's node is untrusted: a round state is rebuilt by `sanitizeRS` (only the fields the page uses, numbers clamped, player and prop ids checked; match settings kept in range by `cleanSet`), so a new field in the round state has to be added there too, and anything from a node that goes into the page as HTML must be escaped (`esc`) or turned into a number first. The round state goes out whole every time it changes (1-2 KB with 16 players) and during a hunt it changes with every hit, so the host coalesces hit-driven changes (health `hf`, eliminations `el`, finds `k`) to at most 4 publishes a second (`Net.rsDue`; a new phase or round goes straight away); the shape of `rs` is unchanged, so old and new hosts and guests mix freely. A tab in the background keeps its node fresh (and, if it's the host, the round moving) with a one-second timer; a player whose page stops altogether stops counting after 12 s but stays drawn where it was for up to a minute. Sounds a hiding prop makes go through `propSfx`, which keeps them from hunters in the waiting room. Pings are worked out on every screen from the hunt's start time (every 10–30 s, every 10 s in the last minute) and play from each prop's position. Points: 100 per prop found, 10 per 15 s survived, 150 for surviving the round and 50 to everyone on the winning team. Late joiners watch the hunters until the next round; players who are out watch their own team (← →, or tap Next). Practice: Hunt practice against prop bots that copy an object standing in a group and park beside its twins, and Hide practice against hunter bots that notice movement, things out of place and pings (and now and then shoot a real object). Settings, name and keys are saved only in the browser (`oddone-…` and `keybinds:odd-one-out`). Parties can launch it (its row in `GAMES` in `party.js`). On touch screens the page adds `touch` to `body`; the `body.touch` rules near the end of the stylesheet place the HUD for phones upright or sideways (the touch buttons keep their places in their grid by hiding with `visibility`, see `updateTouch`). A test hook (`window.__ph`, with `advance(seconds)` to run the game without drawing) exists only when `navigator.webdriver` is set. **Where players may stand:** the `kit` helpers tag what they build (`kind`: `floor`, `wall`, `fence`, `ceil`; everything else from `box` is furniture, `fix`), and `standRules` (run by `Builder.finish`) turns that into rules every map gets for free: each ceiling is an indoor area whose height limit is the top of its tallest furniture or object base plus 0.12 m (outdoors: 0.3 m under the lowest roof); tops of walls, fences and ceilings, anything above its area's limit, and other players are caps (`b.cap`): `groundAt` never stands you on one and `pushOut` slides you off it, as if it were a wall. You also can't stand where your head would be in the ceiling, ceilings only stop heads (they never push sideways), a long form can't straddle a thin wall (`spineHit`), movement is split into steps shorter than your radius (so a small prop on a slow laptop can't pass through a wall), and a form change (`tfCheck`, used by you and the bots) is refused ("No room to become that here") if it would move you through anything, up onto something higher, or out of bounds. **Out of bounds** (`oobAt`: off the map's floor, under it, on a cap, inside a wall, or more than 0.4 m above the height limit (`high`: a jump from the highest allowed spot is there for under half a second, so your own warning waits 0.6 s and other screens 1 s); the hunters' waiting room only counts for hunters while the props hide): on your own screen a one-line warning counts down from 3 and then puts you back where you last stood; everyone else draws (and can shoot) a player whose drawn position is out of bounds at the nearest walkable floor (`nearestAllowed`); and the host takes out anyone out of bounds for 5 s of a hunt, recording it in the round state's `ob` (kept by `sanitizeRS`) so the feed says "was out of bounds". Older pages ignore `ob` and show such an elimination as "Someone found …"; they don't warn their own player, but are drawn and timed out by newer pages like anyone else. Before these rules players got onto the Willow Lane roofs (up the shed's shelves, or onto a tall disguised player beside the house) and, as a small prop on high furniture next to an outside wall, up past the wall onto the roof (Willow Lane and Brightside Office). For whoever adds the next map, the reachability search used to check this asserts: from every spawn, walking, jumping (running, standing, straight up then over), jumping onto every object, fixture and other player (a tall helper with a low one beside it, on the floor and on furniture), changing form on the spot, beside walls and at the top of a jump, and walking into thin walls at 20 frames a second, no form reaches a wall, fence or ceiling top, a top above the height limit, anywhere off the floor, or another player's head; every raised spot a prop can stand on can be seen from somewhere a hunter can walk to; and 200 practice rounds with bots give no out-of-bounds warning. Landing also counts everything passed on the way down in a frame, so a fast fall at a low frame rate can't skip the floor, and a tab in the background sends its position once a second (so a hunter with a hidden tab isn't left "in the waiting room" when the hunt starts). **Graphics:** a custom tone curve (`CustomToneMapping`, patched into three's shader chunk: colours stay as painted and only the brightest part of each channel is eased off; a filmic curve was tried and greyed the cream walls and the sky) with a key light, fill and exposure per map, a sky dome with sun and clouds, light distance haze, glowing ceiling lights, skirting boards, door trims, soft darkening where walls meet floors and ceilings and under furniture, and a soft contact shadow under every object. The contact shadow is part of the object type (`t.blob`): real objects draw theirs in one instanced mesh per map and disguised players in another (`playerBlobs`, filled just before each render from where each player is drawn), with the same quad, material and matrix maths, so the two still can't be told apart (checked by rendering each type both ways at every quality level and comparing the pixels: like the objects themselves, which are drawn instanced for real ones and as plain meshes for players, they differ only by rounding, at most a few dozen edge pixels per type). Quality (`oddone-gfx`): Low (`fast`, as the old Fast: no shadow maps, sharpness up to 1.1, and none of the tone curve, sky dome, haze, light glow, darkening decals or contact shadows, `applyExtras`), Medium (`med`, everything with a 1024 shadow map, up to 1.35) and High (`high`, a soft 2048 shadow map, up to 1.75, as the old Pretty). Whatever is left out is left out for real objects and disguised players alike. With nothing saved, touch screens start on Low and computers on High, stepping down a level by themselves if the first 4 s of play run slower than about 30 frames a second. **The hunter** (`HG`, `hunterModel`) is a toy figure built in code from rounded boxes (`rbox`), spheres and cylinders: navy jumpsuit, hi-vis vest with two pale bands, pack with an aerial, helmet with an orange band, dark goggles, and a rifle with an orange tip. Its shapes are joined into one geometry per material (`joinGeos`), so a hunter is 16 meshes and about 2,900 triangles; the legs, the arms and the rifle are still separate parts because they swing, aim and kick back. It stands on the floor (the old figure hung 36 cm above it) and is still 1.87 m to the top of the helmet, with the muzzle where it was, so the camera, tracers and aim are unchanged; hunters are never shot at, so there is no hit box to keep in step. On Medium and High it has its own soft contact shadow (a child of the model, not in `playerBlobs`, which is only for disguised players). Nothing about the hunter touches the objects or the players disguised as them. **Shots:** on Medium and High the tracer has a soft glow, the muzzle a short cone of flame and a halo, and every shot leaves a quick pale ring where it lands; the ring is the same colour whatever was hit, so it tells nobody anything new (the sparks were already yellow on a disguised player and still are). Low keeps the plain line and dot. **Menu backdrop:** the camera looks slowly from side to side from a spot inside the chosen map (`menu` in `MAPS`: x, y, z, the way it faces and how far it turns) instead of circling above the roof; a new map needs a `menu` entry, or it falls back to the old circling view. **Turkey Week** (`../events.js`, November 15 to 26, 2026): five object types are drawn as Thanksgiving things, on the maps and as disguises alike (`TK_PROPS` in `tkProps`, used by `defProp`): beach ball as a pumpkin, the gift boxes as a pumpkin pie and a basket of apples, the wooden crate as a hay bale, the garden gnome as a turkey in a pilgrim hat. Each type's box, health and speed are still worked out from its usual parts, so players with the look on and off agree on everything but the picture. Object types are built once at page load, which is also when the game reads the one Turkey Week switch on the Back Room page (see `events.js` below); it has no button of its own. **Wardrobe (November 2026, captains only for now):** hunter outfits, hunter tools, prop taunts and catch poofs, all drawn and played in code by `wardrobe.js` beside the page. Nobody else can see it yet: `ODD_PUBLIC = false` and `wardOn()` asks `../captains.js` (`may(false, 'wardrobe', 'oddone-wardrobe')`), so it opens for the site's captains, or with `?wardrobe=1` on localhost or in an automated browser; to open it to everyone, change `ODD_PUBLIC` to `true`. For everyone else `wardrobe.js` is never fetched (the page asks for it only when `wardOn()` is true or another player arrives wearing something), `WD` stays `null` and the menu, saved data, node fields and draw calls are exactly as before. Captains get a Wardrobe button under their name on the menu and on the pause screen; every item is free and nothing is bought (the shop stays off). There are 14 outfits (Police Officer, Sheriff, Mall Cop, Security Guard, Detective, Store Manager, Janitor, Park Ranger, Exterminator, Construction Worker, Cowboy, Pirate, and the usual hunter with a Top Hat or a Traffic Cone in place of the helmet), 6 tools held in place of the rifle (Flashlight, Price Scanner, Flyswatter, Butterfly Net, Broom, Rubber Chicken), 8 taunts (Bike Horn, Squeaky Duck, Slide Whistle, Boing, Cuckoo, Kazoo, Doorbell, Party Blower) and 5 poofs (Cloud, Feather, Bubble, Star, Price Tag); their names and numbers are in `../cosmetics.js` under `odd-one-out`, and `wardrobe.js` keeps one list per slot in number order (never reorder: add at the end). What a captain wears is saved as `oddone-wear` (`[outfit, tool, taunt, poof]`) and travels in their own node as one short field, `cz`: `'outfit.tool.taunt.poof.count'`, checked strictly by `parse` (anything else is ignored, and a number this page doesn't know draws the usual hunter, rifle or burst); older pages ignore it. **Fairness:** outfits and tools are drawn only on hunters (`hunterModel(color, wear)`; a prop is still `propModel` and looks exactly like the real object whatever its player wears), they change no hit box, height, speed, camera, aim or reach (shots still come from the camera and tracers from the rifle's muzzle point), hats stay within 0.28 m of the head's centre line and tools within the rifle's own space below the line of sight (checked with rays through the crosshair at every pitch, aimed and not, on a laptop and an upright phone: none touches the hunter), every outfit keeps an orange hunter band on both arms and is no darker overall than the usual hunter, and the flashlight has a lit lens but no real light. An outfit hunter is 7 meshes (one vertex-coloured geometry each for the legs, body and arms, sharing one material, plus the tool, its accent and the contact shadow) instead of 16. **Taunts** didn't exist before, so they are strictly opt-in: nothing plays unless a captain prop with a taunt chosen presses T (only while T is bound to nothing else; the hint line shows it) or taps the Taunt button that appears beside Menu and Scores on a touch screen. It plays from the prop's position for everyone in range, like a ping, so it gives the prop away on purpose; hunters in the waiting room don't hear it (like every prop sound), and in Hide practice the hunter bots go after it as after a ping once the hunt is on. One every 10 s (`TAUNT_CD`), and other pages ignore a player's taunts closer together than 8 s (`TAUNT_GAP`); a taunt is the count in `cz` going up by one. **Poofs** play only when a prop is caught (`onElim`, in place of the usual confetti burst), chosen by the hunter who caught it, using the same small effect meshes as the burst. Pictures in the Wardrobe are rendered once with the game's own renderer into a small render target (no second WebGL context). A test hook: `__ph.WD` (the hooks, the item lists and `figShot`/`toolShot` for contact sheets) and `__ph.wdSync`. It has Spanish: its words, prop names and Wardrobe items are in `odd-one-out/es.js` (lang.js; map names and the signs inside the maps stay in English), with a Language switch in Settings and the pause menu; prop names are translated on each page when shown, never sent. - `e63334287a3deaa3/tumble-trials/`: Tumble Trials (Back Room), a knockout party show for up to 16 players (Three.js, Firebase Realtime Database rooms under `rooms/ko-…`, same project and rules as Rumble Karts; Quick match uses `rooms/ko-pub-1` to `ko-pub-4`; invite links go through the home page as `#ko-`). Every show, online or solo, starts with at least 16 contestants (`FIELD`): bots take the places players leave, so a room of 3 plays with 13 bots and a solo show is you and 15 bots; the host's Players setting only caps how many people play. A show is two to four rounds and a final: races (the first few across the line qualify; falling in the slime puts you back at the last checkpoint), survivals (no respawns; whoever is still up when the clock runs out or when only the qualifying number are left goes through) and a final for the crown. Two rounds come before the final in a Short show, three in a Normal one, four in a Long one (one fewer below 10 contestants, which can no longer happen at the start). `planShow` makes the plan from the show's seed so that shows differ: the order of races and survivals (never three of a kind running, never all one kind, so a show can open with a survival), how sharply each round cuts the field (each round gets a random weight, so one show goes 16→13→8→5 and another 16→9→6→4), whether 4, 5 or 6 reach the final, and which rounds are used; rounds the show before used come last in the draw, so a show only repeats one when it has run out of fresh ones. A round always sends on the number it promised: if fewer made it (a race that ran out of time, or several falling in the same moment of a survival), the places left go to whoever got furthest in a race or was knocked out last in a survival, and never fewer than two go on. `nextRound` follows who actually came through; if players leaving means no more are left than the final was planned for, the show goes straight to the final rather than play a round that could knock nobody out. A show can only start with one contestant in practice. Levels are built in code by the `build` functions in `LEVELS` with the `B` helpers (boxes, cylinders and spheres that are both the mesh and the collider; the meshes are the hitboxes, so what you see is what hits you): 23 rounds, only ever added at the end so the number the host sends for a round never changes: Whirligig Way, Teeter Tide, Gatecrash Gauntlet, Springboard Skyway, Swingset Straits, Piston Parade, Roly-Poly Rise, Log Jam Lane, Sink or Skip, Belt Bedlam, Blowhard Bridge, Going Up (lifts up a tower, with blocks at the side as the quick way for a good jumper), Barrel Roll Row (bridges that are turning barrels) and Ferry Frenzy (ferries that shuttle between docks, and two that meet mid-river) are races; Whirlwind Dish, Gap Rush, Colour Call, Bowled Over and Roller Rink (a roller chases everyone round a ring, faster all the time; the view turns with you, `L.orbit`) are survivals; Honeycomb Havoc, Last Spin, High Tide Hill and Crown Dash are finals. Crown Dash is a final marked `dash`: it is played like a race (`mechOf`: checkpoints, respawns) and the first bean to touch the crown as it dips wins, or whoever got furthest if the clock runs out; on Whirlwind Dish and Last Spin the low beam (0.08 to 0.58 m up) has to be jumped, and the high beam's underside (`HIGH_BEAM_Y`, 1.95 m) is well above a standing bean (1.6 m), so you can stand, run or dive under it but not jump into it; the Warm-up Yard is the lobby and menu backdrop and the Crown Stage the podium. Every moving obstacle's position is a function of the round clock (seconds since GO, from the server time offset) and the round's seed, so all players see the same hammers and walls without sending them: a level calls `vary(seed)` to shift the clock of every moving piece it builds (`Lvl.to`), or adds its own shift where bots read the timing too (stones, fans, lifts, ferries), and the sweepers take a seeded start angle and direction, so a round is not the same twice. Who stands where on the start grid is shuffled from the same seed; the seesaws react to weight, so the host runs them and sends their angles. Each player writes only their own node `rooms/ko-/players/`, because the shared rules expect `n, c, x, z, h, ts` there and refuse other paths for new prefixes: position and motion (`y`, `m`), look (`lk`: face, pattern, pattern colour), `rd` ready, `k` the round the position belongs to, `fin`/`out` ("show:round:ms" when you cross the line or drop out), `tt` the honeycomb tiles you touched, `gr`/`fr` grabbing and breaking free. The host (newest host number `he`, else whoever has been in the room longest, chosen only after the room has loaded) publishes the show as JSON in its own `rs` (phase, plan, roster, who qualified and who is out, in order; it goes out whole every time, so changes within a round are coalesced to at most 4 publishes a second, `Net.pubRS`/`flushRS`, while a new phase or round goes straight away; the shape of `rs` is unchanged), its bots in `bt`, seesaw angles in `sw`, and every touched tile in its `tt`; a tile vanishes a fixed delay after the earliest touch anyone reported. Guests treat the host's `rs` as untrusted: `sanitizeRS` rebuilds it field by field (known phases and levels, finite clamped numbers, ids of a safe shape, lists capped at 32, at most 24,000 characters) and drops it if anything doesn't fit, and names and colours from other players are escaped or validated before they reach the page. Guests also run the show on the host's clock (they measure the gap from the `ts` the host writes), and every browser rewrites its `ts` once a second even from a background tab, so a host who switches tabs isn't taken for gone. The host's browser runs the bots and decides qualification from the reports, so it isn't cheat-proof; if the host leaves, the next player carries on from the last show state and takes over the bots from where they were last seen (same traits, speed and checkpoint); a host that goes quiet without leaving is passed over after 4 s (`HOST_QUIET_MS`). `set.bots` is still sent (always 1) because pages from before the bots became permanent read it. A private room starts when everyone in it is ready (one player alone counts) or the host presses Start show; a public lobby starts 20 s after a second player arrives, or after 30 s with one. The physics is the game's own: a fixed 60 Hz step, a capsule of three spheres pushed out of boxes, cylinders and spheres, platforms that carry you, and knockback from the speed of whatever hit you. Bots follow each race's `path` of nodes and wait at `safe` nodes until the obstacles ahead will miss them; the same brain is the test autopilot. Node options a level can use: `w` width, `alt` side-by-side lanes a bot picks between, `xs` bounce pads (the node only counts once the pad has thrown the bot up), `safe` with `len` (how much of the way ahead has to be clear), `wait` (a test of the clock), `on` with `board` (a spot on a lift or ferry, walked to only while it can be boarded), `comp` (lean against a belt or a turning barrel), `near` (must be reached, not just passed). A bot that stops getting nearer its node hops, tries another line, backs off up the course and across, then goes back a node (`unstick`), and one whose jump will land short dives. No two bots are alike: skill comes with the roster, and nerve (how tight a gap it runs, how long it waits), pace and lane choice come from the show id and the bot's id, with a good or bad round from the round number (`botTraits`), so whoever takes the bots over works out the same ones. Keys are rebindable through `keybinds.js` (saved as `keybinds:tumble-trials`). On computers, clicking the game captures the mouse (Pointer Lock) and moving it turns the camera with no button held; a "Click to look" hint shows while it isn't captured, and the click that captures it doesn't also grab. Esc, the pause menu, the main menu, results and podium cards and the Controls panel let go of it (Esc in the online lobby only frees the mouse for the lobby panel; a second Esc opens the menu). A refused capture (Chrome refuses one within about a second of Esc) is only counted: after three in a row the hint goes and drag-to-look carries on, but every click still tries again. A two-finger trackpad scroll (or mouse wheel) also turns and tilts the camera; a pinch is swallowed so the page doesn't zoom. Sensitivity (Settings and the pause menu) scales mouse, scroll and touch look and is saved as `tumble-sens`, clamped to 0.2–3 (anything unreadable loads as 1). The camera comes in at once when a wall is between it and the bean and eases back out; static walls are found with a ray, and moving ones only if marked `camBlock` (Gap Rush's walls). In a race the count pill also says where you are running (`myPlace`), the intro card lists the show's running order, and being knocked out says where you finished. On touch screens the page adds `touch` to `body`: a stick, Jump, Dive and Grab buttons and drag-to-look, hidden while you watch or read a results card (`noctl`, `cardup`). Name, look, settings, best practice times and stats (shows, crowns, rounds qualified) are saved in the browser under `tumble-…`; nothing is stored online between shows. Parties can launch it (its row in `GAMES` in `party.js`). A test hook (`window.__ko`, with `advance(seconds)`) exists only when `navigator.webdriver` is set. **Closet (November 2026, hidden: captains only for now):** extra looks worn on top of the look everyone already has: 10 colours, 6 premium colours (gold, chrome, glow in the dark, see-through jelly, a slow rainbow shift, bubblegum with sprinkles), 9 patterns, 9 pairs of underpants (painted over the lower body as a clean, silly joke; the last pair is worn on the head instead), 14 hats, 6 face extras, 12 costumes, 6 victory dances (danced instead of the cheer when you qualify from a race or win the crown), 6 fall screams made with Web Audio (heard as a bean drops towards the slime, quieter far away) and 5 knockout splashes (as well as the slime splash). `CLOSET_PUBLIC = false` and `closetOn()` near the top of the script (which asks `../captains.js`, with `?closet=1` as the test switch) decide whether a Closet button shows under the look on the menu card; for everyone else the menu, saved data, node fields and draw calls are as before. Everything is drawn by `closet.js` beside the page, fetched only when this player may open the Closet or a player in the room wears a kit; until then `CL` is null and every hook does what it always did. A kit is ten item numbers (the `no` of Tumble Trials' items in `../cosmetics.js`: colour, premium colour, pattern, underpants, hat, face, costume, dance, scream, splash), saved as `tumble-kit` and sent in the player's own node as `ck` (`'3.0.5.0.12.0.0.2.1.0'`, written only while one is worn; `kitOf` checks it strictly, a number `closet.js` doesn't know draws nothing, and older pages ignore the field); bots never wear one. Looks only: colours, patterns, underpants, face extras and a costume's paint go on the bean's existing skin canvas; a hat, the head undies or a costume's shape is one merged mesh per item shared by every bean (one more draw call, and it hides the Turkey Week hat, so none more while that is on; the propeller beanie, the fishbowl and the astronaut's bubble add one more); a premium colour gives the bean its own material, and the rainbow repaints its skin five times a second. The collider, size, speed and name tag are untouched: a costume is drawn around the same body and the face always shows. The Closet hides the menu and stands your bean in the yard beside its panel (below it when the screen is upright); drag to turn it, and choosing a dance, scream or splash plays it. The test hook adds `CL`, `closetOn`, `closetLoad`, `kitOf`, `kitStr` and `myKitNow`. **Turkey Week** (`../events.js`, November 15 to 26, 2026): every bean wears a pilgrim hat (hidden under the winner's crown): one shared hat geometry and material from `events.js` (`tkHat`), one extra draw call each. The game reads the one Turkey Week switch on the Back Room page (see `events.js` below) once, when it loads (off means no hats are made); it has no button of its own. **Spanish:** it loads `../lang.js` and its own words (and the Closet's) in `tumble-trials/es.js`; round and bot names stay English, the show's calls, round descriptions, lobby and results are translated. Text drawn or built in code uses `TRN()` (`TX` is the textures here); the results stamp shows `data-stamp-label` (the stamp's translation) while `data-stamp` keeps the English value the CSS keys on. Nothing translated is sent to the room. EN | ES switch in Settings and the pause card. - `e63334287a3deaa3/deepword/`: Deepword (Back Room), a daily "rarest answer" word game with a multiplayer mode, Blowfish Brawl (one canvas for the ocean, no libraries; Firebase Realtime Database, same project and rules as Rumble Karts, prefix `dw`; invite links go through the home page as `#dw-`; Quick match uses `rooms/dw-pub-1` to `dw-pub-4`; in the Parties list as `{ k: 'dw', … max: 12 }`, since `party.js` lists its own games). **Prompt bank:** `prompts.js` sets `window.DW_BANK`: `lists` (named answer lists, one string each: answers separated by `;`, spellings of one answer by `|`, and a commonness weight 1–5 after `:`, 5 being what most people say), `prompts` (`[category, question, list name or an inline list, optional filter]`, 866 of them, each with 20 or more hand-written answers; categories `geo`, `animals`, `food`, `words`, `pop`, `science`, `sports`, `life`), `words` (about 39,800 plain English words in five commonness tiers, built from the public-domain 12dicts and ENABLE word lists and ranked by how often each word appears in books and Wikipedia; the credits are in the comment at the top of the file, the list behind `'@words'` letter prompts), `labels` (lists the Brawl may turn into "

{L(B,0,1.16,.33,.64,.8,.14,G2);for(let k=0;k<5;k++)T(B,0,-.24+k*.12,.76,.37,.1,.1,.04,G2,0,0,.785);T(B,1,0,1.4,.42,.14,.4,.14,0xe6fffb,0,0,Math.PI/2)})}, // its back, ragged, a ghostly spyglass hat(B,c){tricorne(B,0x6ab8b0,0xe6fffb)}}, - // suits: costume-party style, light cloth so nobody is harder to see than the standard - {id:'pinstripe',name:'Pinstripe Suit',legs:()=>[1,0xb4bac6,WHITE,0xb4bac6,0xb4bac6,0x6a4a3a], - body(B,c){const SU=0xb4bac6;fitBase(B,c,SU,SU,c.skin,SU,{torso:false});c.face||eyes(B); - bagPaint(B,0,1.22,0,.7,.72,.42,[6,4,4],SU,(f,i)=>f[0]!=='y'&&i%2?0xe8ecf2:undefined); // pinstripes - tie(B,WHITE,c.hex);lapels(B,0x9aa1ae);X(B,.2,1.4,-.27,.08,.05,.02,c.hex);L(B,0,.9,0,.74,.08,.46,0x9aa1ae);cuffs(B,WHITE); // shirt and tie, lapels, pocket square - back(B,c,()=>{R(B,0,1.2,.33,.56,.42,.22,0x3a7ad0);for(const x of [-.16,.16])X(B,x,1.2,.455,.05,.44,.02,GOLD);X(B,-.02,1.28,.455,.12,.1,.02,0xffd23f);X(B,.06,1.12,.455,.1,.1,.02,0xff6fb5)})}, // a travel trunk with stickers - hat(B,c){fedora(B,0xc9ced8,c.hex)}}, - {id:'boss',name:'The Boss',legs:()=>[1,0x8a8f9a,0x8a8f9a,0x8a8f9a,0x8a8f9a,0x4a3a30], - body(B,c){const CO=0xa8b4cc,FU=0xf4ece0;fitBase(B,c,CO,CO,c.skin,CO);c.face||eyes(B);shades(B,c); - R(B,0,.78,0,.76,.34,.46,CO);X(B,0,1.1,-.29,.04,.9,.03,0x8a96b0);for(const y of [1.3,1.06,.82])for(const s of [-1,1])X(B,s*.1,y,-.295,.05,.05,.02,GOLD); // a long coat, its edge, gold buttons - L(B,0,1.58,0,.66,.16,.5,FU);L(B,0,1.46,-.2,.2,.2,.1,FU);L(B,-.184,1.36,-.443,.22,.22,.14,FU,-.4);L(B,.3,1.36,-.44,.22,.22,.14,FU); // fur collar and cuffs - for(let k=0;k<7;k++){const a=(k/6-.5)*2.2;T(B,0,.2*Math.sin(a)/Math.sin(1.1),1.3+.26*(1-Math.cos(a))/(1-Math.cos(1.1)),-.268,.05,.05,.03,GOLD,0,0,.785)} // a gold chain - back(B,c,()=>{L(B,0,1.14,.32,.6,.84,.16,CO);L(B,0,1.5,.34,.5,.14,.16,FU)})}, // the coat's long back - hat(B,c){R(B,0,2.06,0,.6,.32,.56,0xf4ece0);L(B,0,1.94,0,.62,.08,.6,0xe6dccb)}}, // a tall fur hat - {id:'tracksuit',name:'Tracksuit and Chain',legs:h=>[1,h,h,h,h,WHITE], - body(B,c){fitBase(B,c,c.hex,c.hex,c.skin,c.hex);c.face||eyes(B); - L(B,0,1.6,0,.44,.1,.4,WHITE);X(B,0,1.24,-.255,.035,.62,.04,WHITE);for(const s of [-1,1])for(const z of [-.04,.04])X(B,s*.425,1.2,z,.04,.7,.03,WHITE);cuffs(B,WHITE); // collar, zip, two pipings - for(let k=0;k<9;k++){const a=(k/8-.5)*2.2;T(B,0,.2*Math.sin(a)/Math.sin(1.1),1.32+.26*(1-Math.cos(a))/(1-Math.cos(1.1)),-.268,.055,.055,.03,GOLD,0,0,.785)}L(B,0,1.26,-.275,.12,.12,.04,GOLD); // a chunky gold chain and medallion + // suits: costume-party style. (Wave four: each its own bright identity, so no two read alike at a distance: cream and + // red, gold and white fur, electric-blue tracksuit, all-white with mirror shades, white tails and a red bow, sky blue + // with a red tie, white with an orange harness, a honey trench coat. Still as bright as the standard in every colour.) + {id:'pinstripe',name:'Pinstripe Suit',legs:()=>[1,CREAM,WHITE,CREAM,CREAM,WHITE], + body(B,c){const RD=0xe8453c;fitBase(B,c,CREAM,CREAM,c.skin,CREAM,{torso:false});c.face||eyes(B); + bagPaint(B,0,1.22,0,.7,.72,.42,[6,4,4],CREAM,(f,i)=>f[0]!=='y'&&i%2?0xd9b49a:undefined); // cream with rust pinstripes + tie(B,WHITE,RD);lapels(B,0xe2d2b2);L(B,.2,1.44,-.27,.12,.12,.06,RD);X(B,.2,1.36,-.27,.03,.1,.02,0x7fbf6a);L(B,0,.9,0,.74,.08,.46,RD);cuffs(B,WHITE); // red tie, a red carnation, red waistband + back(B,c,()=>{L(B,0,1.2,.33,.56,.42,.22,c.hex);for(const x of [-.16,.16])X(B,x,1.2,.455,.05,.44,.02,GOLD);X(B,-.02,1.28,.455,.12,.1,.02,0xffd23f);X(B,.06,1.12,.455,.1,.1,.02,0xff6fb5)})}, // a travel trunk in your colour + hat(B,c){fedora(B,CREAM,0xe8453c);T(B,1,.2,2.2,.12,.04,.2,.08,0xe8453c,0,0,-.4)}}, // a cream fedora, red band and feather + {id:'boss',name:'The Boss',legs:()=>[1,WHITE,WHITE,WHITE,WHITE,0x8a5a2b], + body(B,c){const CO=0xffc93c,FU=0xfaf6ee;fitBase(B,c,CO,CO,c.skin,CO);c.face||eyes(B);shades(B,c); + R(B,0,.78,0,.76,.34,.42,CO);X(B,0,1.1,-.29,.05,.9,.03,FU);for(const y of [1.3,1.06,.82])for(const s of [-1,1])X(B,s*.1,y,-.295,.05,.05,.02,WHITE); // a long gold coat, its white edge, buttons + L(B,0,1.6,0,.68,.18,.46,FU);L(B,0,1.46,-.2,.28,.22,.1,FU);L(B,-.184,1.36,-.443,.22,.22,.14,FU,-.4);L(B,.3,1.36,-.44,.22,.22,.14,FU); // a huge fur collar and cuffs + X(B,0,1.0,-.29,.5,.08,.03,c.hex); // a sash in your colour + back(B,c,()=>{L(B,0,1.14,.32,.6,.84,.16,CO);L(B,0,1.52,.34,.62,.16,.18,FU);X(B,0,1.1,.405,.3,.3,.02,c.hex)})}, // the coat's long back, a crest in your colour + hat(B,c){R(B,0,2.07,0,.56,.34,.5,0xfaf6ee);L(B,0,1.94,0,.58,.08,.52,0xffc93c);X(B,0,2.06,-.3,.12,.12,.03,0xffc93c)}}, // a tall white fur hat, a gold band and badge + {id:'tracksuit',name:'Tracksuit and Chain',legs:()=>[1,0x5ce1ff,0x5ce1ff,0x5ce1ff,0x5ce1ff,WHITE], + body(B,c){const CY=0x5ce1ff;fitBase(B,c,CY,CY,c.skin,CY);c.face||eyes(B); + L(B,0,1.6,0,.44,.1,.4,WHITE);X(B,0,1.24,-.255,.035,.62,.04,WHITE);for(const s of [-1,1])for(const z of [-.06,0,.06])X(B,s*.425,1.2,z,.04,.7,.03,WHITE);cuffs(B,WHITE); // collar, zip, three stripes + for(let k=0;k<9;k++){const a=(k/8-.5)*2.2;T(B,0,.22*Math.sin(a)/Math.sin(1.1),1.3+.28*(1-Math.cos(a))/(1-Math.cos(1.1)),-.27,.08,.08,.04,GOLD,0,0,.785)}L(B,0,1.24,-.28,.18,.18,.05,GOLD);X(B,0,1.24,-.31,.08,.08,.02,c.hex); // a thick gold chain, medallion with your colour back(B,c,()=>{R(B,0,1.24,.33,.56,.34,.2,0xc9d1da);for(const s of [-1,1])L(B,s*.15,1.22,.44,.16,.16,.04,0x5a606b);X(B,0,1.36,.44,.12,.04,.02,c.hex);X(B,0,1.44,.33,.4,.03,.03,0x8d96a0)})}, // a boombox - hat(B,c){R(B,0,2.08,0,.56,.15,.58,0xc9ced8);L(B,0,2.02,-.28,.48,.05,.14,0xc9ced8)}}, // flat cap - {id:'bodyguard',name:'Bodyguard',legs:()=>[1,0xb0c4ea,0xb0c4ea,0xb0c4ea,0xb0c4ea,0x2a2d34], - body(B,c){const SU=0xb0c4ea;fitBase(B,c,SU,SU,c.skin,SU);c.face||eyes(B);shades(B,c); - tie(B,WHITE,0x3a3e45);lapels(B,0xa0b4dc);L(B,0,.9,0,.74,.08,.46,0xa0b4dc); - L(B,-.28,1.74,0,.05,.06,.06,0xdfe4ea);T(B,0,-.26,1.6,.04,.02,.26,.02,0xdfe4ea,0,0,.2); // an earpiece and its cord - back(B,c,()=>{R(B,0,1.2,.32,.5,.42,.18,0xb9c2cc);T(B,1,0,1.24,.42,.12,1.1,.12,c.hex,0,0,.4);L(B,-.25,.76,.42,.08,.14,.08,0x3a3e45)})}, // a case and a folded umbrella - hat(B,c){hairUp(B,c)}}, - {id:'tuxedo',name:'White Tuxedo', + hat(B,c){R(B,0,2.08,0,.56,.15,.58,WHITE);L(B,0,2.02,-.28,.48,.05,.14,WHITE);X(B,0,2.08,-.3,.1,.06,.02,c.hex)}}, // white flat cap + {id:'bodyguard',name:'Bodyguard',legs:()=>[1,WHITE,WHITE,WHITE,WHITE,0x2a2d34], body(B,c){fitBase(B,c,WHITE,WHITE,c.skin,WHITE);c.face||eyes(B); - L(B,0,1.44,-.2,.24,.34,.14,0xffffff);lapels(B,0x3a3e45);for(const s of [-1,1])T(B,0,s*.06,1.56,-.28,.1,.07,.03,c.hex,0,0,s*.3);X(B,0,1.56,-.285,.05,.05,.03,c.hex); // shirt, dark lapels, bow tie - R(B,0,1.0,0,.74,.12,.46,c.hex);X(B,.2,1.42,-.27,.06,.06,.03,0xe8453c);cuffs(B,WHITE); // sash, a flower - back(B,c,()=>{R(B,0,1.04,.3,.56,.7,.14,WHITE);X(B,0,.9,.405,.03,.42,.02,0xd8dce4)})}, // the tails - hat(B,c){R(B,0,2.03,0,.7,.05,.7,0x9aa1ae);R(B,0,2.24,0,.44,.42,.44,0x9aa1ae);L(B,0,2.1,0,.47,.07,.47,c.hex)}}, // a grey top hat - {id:'business',name:'Business Suit',legs:()=>[1,0xbccce8,0xbccce8,0xbccce8,0xbccce8,0x3a2a22], - body(B,c){const SU=0xbccce8;fitBase(B,c,SU,SU,c.skin,SU);c.face||eyes(B); - tie(B,WHITE,c.hex);lapels(B,0xacbce0);X(B,-.2,1.3,-.27,.1,.12,.02,WHITE);L(B,0,.9,0,.74,.08,.46,0xacbce0);cuffs(B,WHITE); // tie, lapels, a name badge - back(B,c,()=>{R(B,0,1.2,.33,.56,.42,.2,0xa8384a);X(B,0,1.44,.33,.2,.06,.06,0x8d96a0);X(B,0,1.2,.445,.12,.06,.02,GOLD)})}, // a briefcase + if(!c.face){X(B,-.1,1.82,-.29,.2,.11,.03,LENS);X(B,.1,1.82,-.29,.2,.11,.03,LENS);X(B,0,1.845,-.29,.08,.03,.03,0xb9c2cc);X(B,-.06,1.84,-.31,.05,.03,.01,WHITE)} // big mirror shades + tie(B,0xe6e9ee,0x3a3e45);lapels(B,0xe6e9ee);L(B,0,.9,0,.74,.08,.46,0xe6e9ee); // tie, lapels + L(B,-.28,1.76,0,.06,.07,.07,0x3a3e45);for(let k=0;k<6;k++)X(B,-.27+(k%2?.02:-.02),1.7-k*.05,.04+k*.012,.05,.04,.05,0x3a3e45);X(B,.2,1.42,-.27,.1,.04,.02,c.hex); // earpiece and its coiled cord, a pin in your colour + back(B,c,()=>{R(B,0,1.2,.32,.5,.42,.18,0xdfe4ea);X(B,0,1.2,.425,.5,.06,.02,c.hex);L(B,0,1.45,.32,.14,.06,.08,0x5a606b)})}, // a hard case with your stripe + hat(B,c){R(B,0,2.04,.04,.52,.3,.5,c.hair);X(B,0,2.2,.04,.5,.04,.48,shadeOf(c.hair,1.25))}}, // a flat-top haircut + {id:'tuxedo',name:'White Tuxedo',legs:()=>[1,WHITE,WHITE,WHITE,WHITE,0x2a2d34], + body(B,c){const RD=0xe8453c;fitBase(B,c,WHITE,WHITE,c.skin,WHITE);c.face||eyes(B); + L(B,0,1.44,-.2,.24,.34,.14,0xffffff);lapels(B,0xe6e2da);for(const s of [-1,1])T(B,0,s*.09,1.56,-.28,.16,.11,.04,RD,0,0,s*.3);X(B,0,1.56,-.29,.06,.06,.03,RD); // shirt, a big red bow tie + R(B,0,1.0,0,.74,.14,.46,RD);L(B,.2,1.42,-.27,.1,.1,.06,RD);X(B,.2,1.34,-.27,.03,.1,.02,0x7fbf6a);cuffs(B,WHITE); // a red cummerbund, a rose + back(B,c,()=>{R(B,0,1.04,.3,.56,.7,.14,WHITE);X(B,0,.9,.405,.03,.42,.02,0xd8dce4);X(B,0,1.28,.405,.4,.06,.02,c.hex)})}, // the tails, a band in your colour + hat(B,c){R(B,0,2.03,0,.64,.05,.64,WHITE);R(B,0,2.25,0,.4,.42,.4,WHITE);L(B,0,2.1,0,.43,.1,.43,0xe8453c);X(B,.2,2.1,-.22,.04,.14,.03,c.hex)}}, // a tall white top hat, a red band + {id:'business',name:'Business Suit',legs:()=>[1,0x8fd0ff,0x8fd0ff,0x8fd0ff,0x8fd0ff,0x3a2a22], + body(B,c){const SU=0x8fd0ff;fitBase(B,c,SU,SU,c.skin,SU);c.face||eyes(B); + if(!c.face){for(const s of [-1,1])X(B,s*.1,1.82,-.29,.14,.1,.02,0x3a3e45);X(B,0,1.83,-.29,.06,.02,.02,0x3a3e45)} // glasses + tie(B,WHITE,0xe8453c);lapels(B,0x7cc0f2);L(B,0,.9,0,.74,.08,.46,0x7cc0f2);cuffs(B,WHITE); // a red tie, lapels + T(B,0,-.1,1.4,-.25,.02,.34,.02,GOLD,0,0,-.3);X(B,-.16,1.2,-.27,.14,.18,.02,WHITE);X(B,-.16,1.24,-.28,.1,.04,.01,c.hex); // a lanyard and its badge + back(B,c,()=>{R(B,0,1.2,.33,.56,.42,.2,0xa8384a);X(B,0,1.44,.33,.2,.06,.06,0x8d96a0);X(B,0,1.2,.445,.12,.06,.02,GOLD);X(B,.18,1.06,.445,.12,.08,.02,c.hex)})}, // a briefcase hat(B,c){hairUp(B,c);X(B,-.12,2.15,-.1,.03,.03,.4,shadeOf(c.hair,1.3))}}, // neat hair with a parting - {id:'agent',name:'Secret Agent',legs:()=>[1,0xb9c2cc,0xb9c2cc,0xb9c2cc,0xb9c2cc,0x5a606b], - body(B,c){const SG=0xb9c2cc;fitBase(B,c,SG,SG,0x8d96a0,SG);c.face||eyes(B); - L(B,0,1.58,0,.46,.14,.44,SG);for(const s of [-1,1]){X(B,s*.17,1.3,-.255,.07,.56,.04,c.hex);X(B,s*.17,1.3,.255,.07,.56,.04,c.hex)}X(B,0,1.2,-.26,.4,.07,.04,c.hex); // turtleneck, a harness - L(B,0,.9,0,.74,.1,.46,0x8d96a0);L(B,.3,1.36,-.4,.2,.2,.08,0x5a606b);X(B,.3,1.42,-.4,.08,.02,.06,0x8fe3ff); // utility belt, a gadget watch - back(B,c,()=>{pack(B,0x9aa3ad);L(B,0,1.24,.44,.24,.24,.06,c.hex);X(B,0,1.24,.475,.08,.08,.02,0xdfe4ea)})}, // a winch pack - hat(B,c){hairUp(B,c);X(B,0,1.98,-.27,.56,.05,.06,0x5a606b);for(const s of [-1,1]){L(B,s*.1,2.0,-.32,.12,.1,.12,0x8d96a0);X(B,s*.1,2.0,-.385,.07,.05,.02,c.hex)}}}, // goggles pushed up - {id:'detective',name:'Detective',legs:()=>[1,0x8a96a8,0x8a96a8,0x8a96a8,0x8a96a8,0x3a2a22], - body(B,c){const TC=0xb8c2d0,TD=0x98a4b6;fitBase(B,c,TC,TC,c.skin,TC);c.face||eyes(B); - L(B,0,.8,0,.8,.3,.52,TC);L(B,0,1.6,.02,.6,.16,.52,TC);for(const y of [1.36,1.12])for(const s of [-1,1])X(B,s*.12,y,-.27,.05,.05,.02,TD); // a trench coat, popped collar, buttons - L(B,0,.98,0,.75,.1,.47,TD);X(B,0,.98,-.3,.12,.1,.03,0xdfe4ea);cuffs(B,TD); + {id:'agent',name:'Secret Agent',legs:()=>[1,WHITE,WHITE,WHITE,WHITE,0x5a606b], + body(B,c){const OR=0xff8a1f;fitBase(B,c,WHITE,WHITE,OR,WHITE);c.face||eyes(B); + L(B,0,1.58,0,.46,.16,.44,WHITE);for(const s of [-1,1]){X(B,s*.17,1.3,-.255,.08,.56,.04,OR);X(B,s*.17,1.3,.255,.08,.56,.04,OR)}X(B,0,1.2,-.26,.42,.08,.04,OR);L(B,0,1.2,-.28,.1,.1,.04,0xdfe4ea); // white turtleneck, an orange harness + L(B,0,.9,0,.74,.1,.46,OR);L(B,.3,1.36,-.4,.2,.2,.08,0x5a606b);X(B,.3,1.42,-.4,.08,.02,.06,0x8fe3ff); // utility belt, a gadget watch + back(B,c,()=>{pack(B,0xdfe4ea);L(B,0,1.24,.44,.24,.24,.06,c.hex);X(B,0,1.24,.475,.08,.08,.02,OR)})}, // a winch pack + hat(B,c){hairUp(B,c);X(B,0,1.98,-.27,.56,.05,.06,0xff8a1f);for(const s of [-1,1]){L(B,s*.1,2.0,-.32,.14,.12,.12,0xff8a1f);X(B,s*.1,2.0,-.385,.08,.06,.02,0x8fe3ff)}}}, // orange goggles pushed up + {id:'detective',name:'Detective',legs:()=>[1,0xf3ead8,0xf3ead8,0xf3ead8,0xf3ead8,0x3a2a22], + body(B,c){const TC=0xf2a65a,TD=0xd0803a;fitBase(B,c,TC,TC,c.skin,TC);c.face||eyes(B); + L(B,0,.8,0,.8,.3,.52,TC);L(B,0,1.6,.02,.66,.18,.54,TC);for(const y of [1.36,1.12])for(const s of [-1,1])X(B,s*.12,y,-.27,.06,.06,.02,TD); // a rust-orange trench coat, popped collar, buttons + L(B,0,.98,0,.75,.1,.47,TD);X(B,0,.98,-.3,.12,.1,.03,GOLD);cuffs(B,TD); // belt, cuffs back(B,c,()=>{pack(B,c.hex);L(B,0,1.26,.44,.26,.26,.04,GOLD);X(B,0,1.26,.465,.18,.18,.02,LENS);T(B,0,.16,1.08,.44,.05,.2,.04,0x8a5a2b,0,0,.7)})}, // a satchel with a big magnifying glass - hat(B,c){fedora(B,0x8a96a8,c.hex)}}, + hat(B,c){fedora(B,0xc8955a,c.hex)}}, // robots {id:'android',name:'Android',skin:0xeef2f6,hatFace:{y:1.82,cell:.032,flat:-.336},legs:()=>[1,0xeef2f6,0xb9c2cc,0xeef2f6,0xeef2f6,0x9aa3ad], body(B,c){const W=0xeef2f6,S=0xb9c2cc;fitBase(B,c,W,W,S,W,{hair:false}); From ff7f18b64ab3d4314ee01e6bbc0c89791ab40633 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 07:23:59 +0000 Subject: [PATCH 44/63] Driftfall Locker: the emote moves from T to J (rebindable in Controls while the Locker is on), so party chat no longer takes it Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn --- e63334287a3deaa3/drop-zone/es.js | 2 ++ e63334287a3deaa3/drop-zone/index.html | 12 +++++++++--- e63334287a3deaa3/drop-zone/locker-extra.js | 12 ++++++++---- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/e63334287a3deaa3/drop-zone/es.js b/e63334287a3deaa3/drop-zone/es.js index b715c036..4125ae9a 100644 --- a/e63334287a3deaa3/drop-zone/es.js +++ b/e63334287a3deaa3/drop-zone/es.js @@ -186,6 +186,8 @@ 'Pick how you glide down. Every glider is held its own way, but you are the same size and fall at the same speed.': 'Elige cómo bajas planeando. Cada planeador se sostiene a su manera, pero tienes el mismo tamaño y caes a la misma velocidad.', 'A trail follows you while you skydive and glide. It never hides anyone: it fades out close to the camera.': 'Una estela te sigue mientras caes y planeas. Nunca tapa a nadie: se desvanece cerca de la cámara.', 'Pick the emote to play in a match: T on a keyboard, the Emote button on a touch screen. Standing still only; moving stops it.': 'Elige el gesto para hacer en una partida: T en el teclado o el botón Gesto en una pantalla táctil. Solo quieto; si te mueves, se corta.', + 'Pick the emote to play in a match: the Emote key on a keyboard (J unless you change it in Controls), the Emote button on a touch screen. Standing still only; moving stops it.': 'Elige el gesto para hacer en una partida: la tecla de Gesto en el teclado (J, salvo que la cambies en Controles) o el botón Gesto en una pantalla táctil. Solo quieto; si te mueves, se corta.', + 'Emote (Locker)': 'Gesto (Casillero)', 'Standing still; moving, jumping or shooting stops it': 'Solo quieto; moverte, saltar o disparar lo corta.', 'Emote': 'Gesto', 'Pick what you do when you win: everyone watching you sees it.': 'Elige qué haces cuando ganas: todos los que te miran lo ven.', 'A backpack goes on over any outfit. It keeps your colour on it, so you can still be told apart.': 'La mochila va sobre cualquier traje. Lleva tu color, así se te sigue reconociendo.', 'Your weapons in a pattern. The orange tip, the muzzle flash, the rarity band and the crosshair stay the same.': 'Tus armas con un diseño. La punta naranja, el fogonazo, la franja de rareza y la mira no cambian.', diff --git a/e63334287a3deaa3/drop-zone/index.html b/e63334287a3deaa3/drop-zone/index.html index f45979f0..7a928861 100644 --- a/e63334287a3deaa3/drop-zone/index.html +++ b/e63334287a3deaa3/drop-zone/index.html @@ -7114,7 +7114,7 @@

canLook(),kbUsed:c=>KB.actions().some(a=>a.keys.includes(c)),get SPEED(){return SPEED}}; + get MS(){return MS},canLook:()=>canLook(),kbUsed:c=>KB.actions().some(a=>a.keys.includes(c)), + // the emote's key: the Controls panel's Emote when it has one, else J while nothing else is on J (T is party chat's in a party frame, gamechat.js) + isEmoteKey:c=>KB.actions().some(a=>a.id==='emote')?KB.is('emote',c):c===EMOTE_KEY0&&!KB.actionsFor(c).length, + emoteKeyName:()=>KB.actions().some(a=>a.id==='emote')?(KB.keys('emote').length?KB.short('emote'):''):'J',get SPEED(){return SPEED}}; lockerSync(); if(CAPTAINS)CAPTAINS.onChange(lockerSync); diff --git a/e63334287a3deaa3/drop-zone/locker-extra.js b/e63334287a3deaa3/drop-zone/locker-extra.js index af21a934..9897e7b3 100644 --- a/e63334287a3deaa3/drop-zone/locker-extra.js +++ b/e63334287a3deaa3/drop-zone/locker-extra.js @@ -688,11 +688,15 @@ function canEmote(){const p=G.player;return G.lockerOn()&&G.canLook()&&p.alive&& function startEmote(){if(!canEmote())return;const n=myEmote(),o=worn();o.e=n;G.setLxNet(str(o));G.player.lxEA=performance.now();G.player.lxEN=n} function stopEmote(){const o=worn();if(!o.e)return;delete o.e;G.setLxNet(str(o))} const myEmote=()=>{const n=+G.store.get('em','1')|0;return n>=1&&n<=EMOTE_NAMES.length?n:1}; -addEventListener('keydown',e=>{if(e.code!=='KeyT'||e.repeat||e.ctrlKey||e.metaKey||e.altKey||G.kbUsed('KeyT')||!G.lockerOn())return;const a=document.activeElement;if(a&&/INPUT|TEXTAREA/.test(a.tagName))return;if(worn().e)stopEmote();else startEmote()}); +// The emote's key (wave four): J, or what the player set for Emote in Controls (G.isEmoteKey). It was T, but in a party +// frame gamechat.js takes T for chat first, so it never reached here. (An older page without isEmoteKey keeps T.) +const isEmoteKey=c=>G.isEmoteKey?G.isEmoteKey(c):c==='KeyT'&&!G.kbUsed('KeyT'); +const emoteKeyName=()=>G.emoteKeyName?G.emoteKeyName():'T'; +addEventListener('keydown',e=>{if(!isEmoteKey(e.code)||e.repeat||e.ctrlKey||e.metaKey||e.altKey||!G.lockerOn())return;const a=document.activeElement;if(a&&/INPUT|TEXTAREA/.test(a.tagName))return;if(worn().e)stopEmote();else startEmote()}); function emoteTick(){ const p=G.player,o=parse(G.myLx||''); if(o.e){const E=EMOTES[o.e],t=(performance.now()-(p.lxEA||0))/1000;if(!E||t>E.dur||!p.alive||!p.onGround||Math.hypot(p.vel.x,p.vel.z)>1||G.player.cd>0&&t>.3)stopEmote()} - if(G.touchUI&&G.lockerOn()){if(!emoteBtn){emoteBtn=document.createElement('button');emoteBtn.className='tb';emoteBtn.id='tEmote';emoteBtn.type='button';emoteBtn.textContent=lxT('EMOTE'); + if(G.touchUI&&G.lockerOn()){if(!emoteBtn){emoteBtn=document.createElement('button');emoteBtn.className='tb';emoteBtn.id='tEmote';emoteBtn.type='button';emoteBtn.textContent=lxT('EMOTE');emoteBtn.title=lxT('Emote')+(emoteKeyName()?' ('+emoteKeyName()+')':''); emoteBtn.addEventListener('pointerdown',ev=>{ev.preventDefault();ev.stopPropagation();if(worn().e)stopEmote();else startEmote()});const T=G.$('touch');if(T)T.appendChild(emoteBtn)} emoteBtn.hidden=!(canEmote()||o.e)}else if(emoteBtn)emoteBtn.hidden=true; } @@ -744,7 +748,7 @@ const TABS=[['outfits','Outfits','OUT','FITS'],['p','Backpacks','BACK','PACKS'], // (the HUD the Emote button sits in is left alone by ../lang.js, so it's put in the player's language here; the Locker's own words // are translated by lang.js, from the page's es.js) const lxT=s=>window.BackRoomLang?window.BackRoomLang.t(s):s; -const LEDE={outfits:'Pick what you wear. Every outfit is the same size and just as easy to hit as the standard one.',g:'Pick how you glide down. Every glider is held its own way, but you are the same size and fall at the same speed.',t:'A trail follows you while you skydive and glide. It never hides anyone: it fades out close to the camera.',e:'Pick the emote to play in a match: T on a keyboard, the Emote button on a touch screen. Standing still only; moving stops it.',v:'Pick what you do when you win: everyone watching you sees it.',p:'A backpack goes on over any outfit. It keeps your colour on it, so you can still be told apart.',w:'Your weapons in a pattern. The orange tip, the muzzle flash, the rarity band and the crosshair stay the same.',b:'What your walls, floors and ramps look like to everyone. They are just as strong, and just as hard to see through.'}; +const LEDE={outfits:'Pick what you wear. Every outfit is the same size and just as easy to hit as the standard one.',g:'Pick how you glide down. Every glider is held its own way, but you are the same size and fall at the same speed.',t:'A trail follows you while you skydive and glide. It never hides anyone: it fades out close to the camera.',e:'Pick the emote to play in a match: the Emote key on a keyboard (J unless you change it in Controls), the Emote button on a touch screen. Standing still only; moving stops it.',v:'Pick what you do when you win: everyone watching you sees it.',p:'A backpack goes on over any outfit. It keeps your colour on it, so you can still be told apart.',w:'Your weapons in a pattern. The orange tip, the muzzle flash, the rarity band and the crosshair stay the same.',b:'What your walls, floors and ramps look like to everyone. They are just as strong, and just as hard to see through.'}; let stageA=0,lede0=null,tab='outfits',built=false,drawnPics=false,stageEnt=null,stageTrail=0,posed=false,disp=null; const cards={}; function worn(){return parse(G.myLx)} @@ -773,7 +777,7 @@ function buildMenu(){ function pick(id,n){if(!G.lockerOn())return;if(id==='e'){G.store.set('em',String(n||1));stageA=performance.now();mark();return}const o=worn();delete o.e;if(n)o[id]=n;else delete o[id];if(id==='v')stageA=performance.now();G.setLx(str(o));mark()} function nameOf(id){const o=worn();o.e=myEmote();const n=o[id];return n?SLOT[id][n-1]:id==='w'?'No skin':id==='t'?'No trail':id==='b'?'Plywood':id==='p'?'The outfit\'s own':id==='v'?'No victory pose':'Standard glider'} function mark(){if(!built)return;const o=worn();o.e=myEmote();for(const id in cards)cards[id].forEach((b,n)=>b.setAttribute('aria-pressed',(o[id]||0)===n?'true':'false')); - if(tab!=='outfits')G.$('lkName').textContent=nameOf(tab)} + if(tab!=='outfits')G.$('lkName').textContent=nameOf(tab)+(tab==='e'&&emoteKeyName()?' ['+emoteKeyName()+']':'')} function setTab(id){tab=id;const sec=G.Locker.sec; for(const b of sec.querySelectorAll('.lk-tabs button')){b.setAttribute('aria-pressed',b.dataset.tab===id?'true':'false');if(b.dataset.tab===id&&sec.offsetParent!==null){const bar=b.parentNode;if(b.offsetLeftbar.scrollLeft+bar.clientWidth)bar.scrollLeft=b.offsetLeft-12}} G.$('lkGrid').hidden=id!=='outfits';for(const k in cards)G.$('lkGrid-'+k).hidden=k!==id; From 89495ad77aabe72d041741e4649a11ae5cae674f Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 07:26:39 +0000 Subject: [PATCH 45/63] Backrooms Locker (captains only): 36 outfits, 15 gun skins, 6 build skins, 8 elimination effects, 8 celebrations Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn --- e63334287a3deaa3/backrooms-1v1/index.html | 76 +- e63334287a3deaa3/backrooms-1v1/locker.js | 827 ++++++++++++++++++++++ e63334287a3deaa3/cosmetics.js | 78 +- 3 files changed, 964 insertions(+), 17 deletions(-) create mode 100644 e63334287a3deaa3/backrooms-1v1/locker.js diff --git a/e63334287a3deaa3/backrooms-1v1/index.html b/e63334287a3deaa3/backrooms-1v1/index.html index 5589ae6f..d1f73fb0 100644 --- a/e63334287a3deaa3/backrooms-1v1/index.html +++ b/e63334287a3deaa3/backrooms-1v1/index.html @@ -5,6 +5,7 @@ + Backrooms 1v1–4v4 @@ -475,6 +476,15 @@

YOU GOT O // Side rails beside the game on wide screens (1180px+). Uses its own ad unit if you set RAIL_SLOT // (a vertical 160x600 unit works best); otherwise falls back to AD_SLOT. Rails collapse if no ad fills. const RAIL_SLOT=''; +// The Locker (not public yet): outfits, gun skins, build skins, elimination effects and round-win celebrations, all +// drawn by locker.js beside this page. lockerOn(): may this player see the Locker and wear things? True for the site's +// captains (../captains.js: the Google account signed in is one of miles.js's Captains), or with ?locker=1 on localhost +// or in an automated browser. To open it to everyone, change BR_PUBLIC to true: that one line is all it takes. +// locker.js is fetched the first time lockerOn() is true, or when another player in the room arrives wearing something +// (their node's lk); for everyone else it is never loaded, LK stays null and the game is exactly as it was. +const BR_PUBLIC=false; +const CAPTAINS=window.BackRoomCaptains||null; +const lockerOn=()=>BR_PUBLIC||!!(CAPTAINS&&CAPTAINS.may(false,'locker','br1v1-locker')); const $=id=>document.getElementById(id); const V3=THREE.Vector3; @@ -1234,9 +1244,10 @@

YOU GOT O function myBuildTeam(){return online?player.team||null:'me'} // owner: the entity that built it (null: another player, whose team is given). Your own builds online are sent to // everyone else in the room. -function tryBuild(s,owner,team,quiet){ +function tryBuild(s,owner,team,quiet,by){ if(!specValid(s))return false; const pc=makePiece(s,owner===player?myBuildTeam():owner===opp?'bot':team); + if(LK)LK.piece(pc,owner||remotes.get(by)); // the builder's build skin (locker.js); by: another player's uid clearBodies(pc); if(!quiet)sfxBuild(owner===player?1:1/(1+camera.position.distanceTo(pc.obj.position)*.08)); if(online&&owner===player)Net.send({type:'b',k:s.kind,x:s.x,z:s.z,L:s.L,o:s.o||'',dir:s.dir||0,r:roundNo()}); @@ -1441,6 +1452,7 @@

YOU GOT O const m=new THREE.Mesh(EVT.hat(THREE),tkHatMat||(tkHatMat=new THREE.MeshLambertMaterial({vertexColors:true}))); m.scale.setScalar(scale);m.position.set(0,y,z||0);if(ry)m.rotation.y=ry;parent.add(m);return m; } +let LK=null; // the Locker (locker.js), once it is loaded: see BR_PUBLIC // A suit is a few meshes, each several boxes joined up (see parts), so the extra detail costs no extra draw calls. function makeSuit(suit,trim,visor){ const g=new THREE.Group(); @@ -1452,18 +1464,19 @@

YOU GOT O const gear=P([[.77,.1,.47,0,.9,0],[.42,.52,.2,0,1.26,.31],[.09,.56,.03,-.2,1.28,-.225],[.09,.56,.03,.2,1.28,-.225],[.31,.07,.03,0,1.36,-.225],[.44,.06,.22,0,1.5,.3]],mt); // belt, air tank, chest straps const lamp=P([[.14,.07,.02,0,1.4,.412],[.05,.05,.02,0,1.16,.412]],mv); // lamps on the tank, in the visor colour: what you see of yourself const head=new THREE.Group();head.position.y=1.78; - const hood=box(.54,.54,.54,ms);const vis=box(.42,.22,.04,mv);vis.position.set(0,.03,-.275);const filt=P([[.17,.14,.12,0,-.17,-.3],[.46,.05,.05,0,.17,-.27]],mt);head.add(hood,vis,filt);tkHat(head,.92,.27); + const hood=box(.54,.54,.54,ms);const vis=box(.42,.22,.04,mv);vis.position.set(0,.03,-.275);const filt=P([[.17,.14,.12,0,-.17,-.3],[.46,.05,.05,0,.17,-.27]],mt);head.add(hood,vis,filt);const tk=tkHat(head,.92,.27); const arms=new THREE.Group();arms.position.set(0,1.44,0); const sleeves=P([[.17,.17,.62,-.26,-.05,-.26,-.35],[.17,.17,.62,.3,-.05,-.22]],ms); const gloves=P([[.18,.18,.14,-.176,-.05,-.49,-.35],[.18,.18,.14,.3,-.05,-.465]],mt); const gun=new THREE.Group();gun.position.set(.16,-.04,-.62);arms.add(sleeves,gloves,gun); g.add(torso,gear,lamp,head,arms); - g.userData={legs,arms,gun,head,gunId:-1,ms,mt,mv}; + // base: the plain suit's meshes and tk its pilgrim hat (an outfit from the Locker hides them and puts its own in: locker.js) + g.userData={legs,arms,gun,head,gunId:-1,ms,mt,mv,tk,base:[...legs.flatMap(l=>l.children),torso,gear,lamp,hood,vis,filt,sleeves,gloves]}; return g; } // Suit colours: your practice suit, the Entity, and the two online teams. const SUITS={me:[0xe8e9e4,0x34536e,0x7fd3ff],entity:[0x1d1c19,0x3c3a33,0xff3b2e],r:[0xc8402f,0x5e1c14,0xffd2b8],b:[0x2f6ad6,0x15305f,0xbfe8ff]}; -function setSuit(model,key){const c=SUITS[key]||SUITS.me,u=model.userData;u.ms.color.setHex(c[0]);u.mt.color.setHex(c[1]);u.mv.color.setHex(c[2])} +function setSuit(model,key){const c=SUITS[key]||SUITS.me,u=model.userData;u.ms.color.setHex(c[0]);u.mt.color.setHex(c[1]);u.mv.color.setHex(c[2]);u.key=key;if(LK)LK.suit(model)} // The three guns: each is one mesh made of boxes coloured per corner (one draw call), shared by every character. // z is along the barrel, pointing away from the holder. GUN_TIP is how far the muzzle is from the hands. // gunFit squeezes a gun along its barrel so it runs from z0 to z1: each gun is exactly as long as the plain one it @@ -1472,22 +1485,23 @@

YOU GOT O const GC={steel:[.2,.2,.22],dark:[.09,.09,.1],grey:[.4,.41,.4],wood:[.52,.32,.16],tan:[.56,.48,.31],amber:[.96,.63,.16],red:[.82,.2,.15],lens:[.3,.82,.95]}; const gunFit=(l,z0,z1)=>{let a=1e9,b=-1e9;for(const p of l){a=Math.min(a,p[5]-p[2]/2);b=Math.max(b,p[5]+p[2]/2)}const k=(z1-z0)/(b-a); return parts(l.map(p=>{const q=p.slice();q[2]=p[2]*k;q[5]=z0+(p[5]-p[2]/2-a)*k+q[2]/2;return q}))}; -const GUN_GEO=[ - gunFit([[.1,.15,.4,0,0,.04,0,GC.steel],[.085,.11,.3,0,.005,-.3,0,GC.grey],[.04,.04,.2,0,.02,-.54,0,GC.dark],[.06,.06,.07,0,.02,-.63,0,GC.dark], +const GUN_SRC=[ + [[[.1,.15,.4,0,0,.04,0,GC.steel],[.085,.11,.3,0,.005,-.3,0,GC.grey],[.04,.04,.2,0,.02,-.54,0,GC.dark],[.06,.06,.07,0,.02,-.63,0,GC.dark], [.07,.11,.16,0,-.025,.3,0,GC.grey],[.085,.16,.04,0,-.04,.385,0,GC.dark],[.065,.15,.1,0,-.14,-.04,0,GC.dark],[.065,.06,.1,0,-.22,-.065,0,GC.dark], - [.055,.13,.07,0,-.13,.15,0,GC.dark],[.045,.025,.34,0,.088,-.06,0,GC.dark],[.05,.05,.03,0,.12,.12,0,GC.dark],[.03,.06,.03,0,.105,-.42,0,GC.dark],[.105,.035,.1,0,.03,.1,0,GC.amber]],-.39,.39), - gunFit([[.11,.15,.32,0,0,.08,0,GC.steel],[.055,.055,.56,0,.035,-.36,0,GC.dark],[.05,.05,.46,0,-.03,-.31,0,GC.dark],[.12,.1,.22,0,-.04,-.27,0,GC.wood], + [.055,.13,.07,0,-.13,.15,0,GC.dark],[.045,.025,.34,0,.088,-.06,0,GC.dark],[.05,.05,.03,0,.12,.12,0,GC.dark],[.03,.06,.03,0,.105,-.42,0,GC.dark],[.105,.035,.1,0,.03,.1,0,GC.amber]],-.39,.39], + [[[.11,.15,.32,0,0,.08,0,GC.steel],[.055,.055,.56,0,.035,-.36,0,GC.dark],[.05,.05,.46,0,-.03,-.31,0,GC.dark],[.12,.1,.22,0,-.04,-.27,0,GC.wood], [.09,.13,.2,0,-.03,.3,0,GC.wood],[.095,.16,.04,0,-.045,.4,0,GC.dark],[.06,.1,.07,0,-.11,.2,0,GC.wood],[.02,.03,.02,0,.075,-.62,0,GC.amber], - [.02,.06,.045,.062,0,.02,0,GC.red],[.02,.06,.045,.062,0,.08,0,GC.red],[.02,.06,.045,.062,0,.14,0,GC.red]],-.43,.43), - gunFit([[.085,.13,.38,0,0,.08,0,GC.steel],[.04,.04,.74,0,.015,-.48,0,GC.dark],[.065,.065,.1,0,.015,-.88,0,GC.dark],[.075,.08,.3,0,-.03,-.24,0,GC.tan], + [.02,.06,.045,.062,0,.02,0,GC.red],[.02,.06,.045,.062,0,.08,0,GC.red],[.02,.06,.045,.062,0,.14,0,GC.red]],-.43,.43], + [[[.085,.13,.38,0,0,.08,0,GC.steel],[.04,.04,.74,0,.015,-.48,0,GC.dark],[.065,.065,.1,0,.015,-.88,0,GC.dark],[.075,.08,.3,0,-.03,-.24,0,GC.tan], [.075,.14,.2,0,-.03,.3,0,GC.tan],[.06,.04,.14,0,.06,.28,0,GC.dark],[.085,.17,.04,0,-.04,.4,0,GC.dark],[.06,.06,.34,0,.135,0,0,GC.dark], [.085,.085,.08,0,.135,-.2,0,GC.dark],[.075,.075,.06,0,.135,.19,0,GC.dark],[.065,.065,.012,0,.135,-.245,0,GC.lens],[.03,.05,.04,0,.085,-.08,0,GC.steel], - [.03,.05,.04,0,.085,.1,0,GC.steel],[.06,.09,.1,0,-.1,.02,0,GC.dark],[.02,.02,.26,-.035,-.04,-.52,0,GC.grey],[.02,.02,.26,.035,-.04,-.52,0,GC.grey],[.05,.025,.025,.065,.03,.14,0,GC.grey]],-.75,.43) + [.03,.05,.04,0,.085,.1,0,GC.steel],[.06,.09,.1,0,-.1,.02,0,GC.dark],[.02,.02,.26,-.035,-.04,-.52,0,GC.grey],[.02,.02,.26,.035,-.04,-.52,0,GC.grey],[.05,.025,.025,.065,.03,.14,0,GC.grey]],-.75,.43] ]; +const GUN_GEO=GUN_SRC.map(a=>gunFit(...a)); const GUN_TIP=[.39,.43,.75]; function setGun(model,wi){ const u=model.userData;if(u.gunId===wi)return;u.gunId=wi; - const geo=GUN_GEO[wi]||GUN_GEO[0]; + const geo=(u.lk&&LK&&LK.gunGeo(wi,u.lk.g))||GUN_GEO[wi]||GUN_GEO[0]; // u.lk: what it wears from the Locker (locker.js) if(u.gunMesh)u.gunMesh.geometry=geo;else{u.gunMesh=new THREE.Mesh(geo,gunVMat);u.gun.add(u.gunMesh)} } // the soft round shadow that sits on the ground under a character: 1 m across, about the width of the figure, so it @@ -1769,6 +1783,7 @@

YOU GOT O function onKill(victim,killer,wi,head){ if(!victim.alive&&victim===player&&phase==='over')return; victim.alive=false;victim.dieT=0; + if(LK)LK.elim(victim,killer); // the winner's elimination effect (locker.js), if they wear one const w=WEAPONS[wi]||WEAPONS[0],tail=' · '+TX(w.name)+(head?' · '+TX('head'):''); if(victim===opp&&window.BackRoomStats){BackRoomStats.add('kills',1);BackRoomStats.add('kdkills',1);BackRoomStats.max('mkills',score.you+1)} if(victim===player&&window.BackRoomStats)BackRoomStats.add('deaths',1); @@ -2205,7 +2220,7 @@

YOU GOT O setGun(e.model,0);e.model.visible=false;scene.add(e.model);remotes.set(uid,e);rebuildEnts();return e; } function clearRemotes(){ - for(const e of remotes.values()){scene.remove(e.model,e.shadow);e.model.traverse(o=>{if(o.geometry&&!GUN_GEO.includes(o.geometry))o.geometry.dispose();if(o.material&&o.material!==gunVMat&&o.material!==tkHatMat)o.material.dispose()})} + for(const e of remotes.values()){scene.remove(e.model,e.shadow);e.model.traverse(o=>{if(LK&&LK.shared(o))return;if(o.geometry&&!GUN_GEO.includes(o.geometry))o.geometry.dispose();if(o.material&&o.material!==gunVMat&&o.material!==tkHatMat)o.material.dispose()})} remotes.clear();rebuildEnts(); } // Make sure every roster member has a body in their team colour; anyone else is hidden. @@ -2215,6 +2230,7 @@

YOU GOT O } function applyNode(e,v){ e.lastRecv=Date.now(); + if(v.lk!=null||e.model.userData.lk)lkHeard(e,v.lk); // what they wear from the Locker (locker.js) if(!inPlay()||v.m!==curMatch||v.rd!==curRound)return; const s={t:+v.ts||Net.now(),x:+v.x,y:+v.y||0,z:+v.z,h:+v.h||0,p:+v.p||0}; if(!isFinite(s.x)||!isFinite(s.z))return; @@ -2325,6 +2341,7 @@

YOU GOT O player.alive=false;player.dieT=0;lmb=false;tAct.fire=false; if(kdm.m!==curMatch){kdm.m=curMatch;kdm.d=0}kdm.d++;if(window.BackRoomStats)BackRoomStats.add('deaths',1); const k=shooter&&shooter.uid||'',wi=shooter?shooter.wi|0:0; + if(LK)LK.elim(player,remotes.get(k)); Net.send({type:'kill',v:Net.uid,k,w:wi,hd:head?1:0,r:curRound}); killFeed(k,Net.uid,wi,head); if(Net.amHost)hostDead.add(curMatch+':'+curRound+':'+Net.uid); @@ -2357,13 +2374,13 @@

YOU GOT O }else if(e.type==='b'){ if(!sameRound)return; const s={kind:e.k,x:e.x|0,z:e.z|0,L:e.L|0},tm=roster.get(e.by)||null;if(e.k==='wall')s.o=e.o;if(e.k==='ramp')s.dir=e.dir|0; - if(typeof e.ed!=='number'){tryBuild(s,null,tm);return} + if(typeof e.ed!=='number'){tryBuild(s,null,tm,false,e.by);return} // an edit: the build message again with the tiles cut out (ed). Only the team that built a piece can reshape it. // (A page from before editing sees a build for a spot that is taken and ignores it, so it keeps the whole piece; // that is why editing is only on when no such page is in the match.) if(!editOn()||!tm)return; let pc=pieces.get(pieceKey(s)); - if(!pc){if(!tryBuild(s,null,tm,true))return;pc=pieces.get(pieceKey(s))} + if(!pc){if(!tryBuild(s,null,tm,true,e.by))return;pc=pieces.get(pieceKey(s))} if(pc.team!==tm)return; if(edit&&edit.pc===pc)closeEdit(); editPiece(pc,e.ed); @@ -2387,6 +2404,7 @@

YOU GOT O const v=String(e.v||''),k=String(e.k||''); if(e.r!==curRound||v!==e.by)return; const ent=remotes.get(v);if(ent&&ent.alive){ent.alive=false;ent.dieT=0} + if(LK&&ent)LK.elim(ent,k===Net.uid?player:remotes.get(k)); killFeed(k,v,e.w|0,!!e.hd); if(k===Net.uid&&window.BackRoomStats){BackRoomStats.add('kills',1);BackRoomStats.add('kdkills',1);BackRoomStats.max('mkills',myKills+1)} if(k===Net.uid){myKills++;kills.set(Net.uid,myKills);banner(TX('{n} DOWN',{n:nameOf(v).toUpperCase()}),e.hd?'Headshot':'Eliminated',1.8);Net.publishSoon()} @@ -2624,7 +2642,9 @@

YOU GOT O // n, c, x, z, h and ts are always sent: the shared database rules expect that shape stateOf(){ const p=player,act=activeOnline(); - return{n:myName,c:TEAM_HEX[act?roster.get(this.uid):myTeamPref],x:r2(p.pos.x),y:r2(p.pos.y),z:r2(p.pos.z),h:r3(p.yaw),p:r3(p.pitch),hp:Math.max(0,Math.round(p.hp)),sh:Math.round(p.shield),wi:p.wi,rl:p.reloadT>0?1:0,d:act&&p.alive?0:1,rd:curRound,m:curMatch==null?-1:curMatch,t:myTeamPref,k:myKills,j:this.j,mv:MAP_V,ev:EDIT_V,ts:Math.round(this.now())}; + const s={n:myName,c:TEAM_HEX[act?roster.get(this.uid):myTeamPref],x:r2(p.pos.x),y:r2(p.pos.y),z:r2(p.pos.z),h:r3(p.yaw),p:r3(p.pitch),hp:Math.max(0,Math.round(p.hp)),sh:Math.round(p.shield),wi:p.wi,rl:p.reloadT>0?1:0,d:act&&p.alive?0:1,rd:curRound,m:curMatch==null?-1:curMatch,t:myTeamPref,k:myKills,j:this.j,mv:MAP_V,ev:EDIT_V,ts:Math.round(this.now())}; + if(LK){const lk=LK.wire();if(lk)s.lk=lk} // what this player wears from the Locker; nothing at all for everyone else + return s; }, async peek(room){ const s=await this.db.ref('rooms/'+room+'/players').once('value');let n=0,r=0; @@ -2781,6 +2801,7 @@

YOU GOT O if(!e.onGround)gy=Math.min(e.pos.y,groundAt(e.pos.x,e.pos.z,e.pos.y+.05)); else for(const r of ramps){const h=rampH(r,e.pos.x,e.pos.z);if(h>=0&&Math.abs(h-e.pos.y)<.25){tilt=Math.PI/4;yaw=DIR_YAW[r.dir];break}} sh.visible=true;sh.position.set(e.pos.x,gy+(tilt?.07:.03),e.pos.z);sh.rotation.set(-Math.PI/2-tilt,yaw,0);sh.scale.setScalar(clamp(1-(e.pos.y-gy)/6,.4,1)); + if(LK&&u.lk)LK.anim(e,dt); // a round-win celebration (locker.js) } /* ---------- camera ---------- */ @@ -2994,6 +3015,7 @@

YOU GOT O updateRemotes(dt); }else if(state==='end'&&online)updateRemotes(dt); if(!(state==='playing'&&paused&&!online)){for(const e of ents)animModel(e,dt);updateFx(dt);updateLights(dt)} + if(LK)LK.update(dt); updateCamera(dt); if(state==='playing')updateHud(dt); if(touchUI)document.body.classList.toggle('inlobby',lobbyShown); @@ -3175,9 +3197,31 @@

YOU GOT O const inv=/^#br-([a-z0-9-]{1,17})$/.exec(location.hash); if(inv){$('room').value=inv[1];setMsg('You were invited to room br-'+inv[1]+'. Press Play in room to join.');$('joinRoom').classList.replace('ghost-btn','cta');$('quick').classList.replace('cta','ghost-btn')} +// ---------- the Locker (locker.js; see BR_PUBLIC near the top) ---------- +let lkAsked=false; +function lkLoad(){ + if(lkAsked)return;lkAsked=true; + loadScript('locker.js').then(()=>{ + LK=window.BackroomsLocker({THREE,scene,renderer,camera,store,$,TX,esc,flatBox,joinGeos,makeSuit,setSuit,setGun,SUITS,GUN_SRC,GUN_GEO,GUN_TIP,gunFit,GC,gunVMat, + plyTex,canvasTex,noise,player,opp,remotes,WEAPONS,RM,Net, + get on(){return lockerOn()},get state(){return state},get online(){return online},get phase(){return phase},get RD(){return RD}, + get roster(){return roster},get touch(){return touchUI},get ents(){return ents}, + teamOf:e=>online?(e===player?roster.get(Net.uid):e.team)||null:e===player?'me':null, + floorAt:(x,z,y)=>groundAt(x,z,y), + publish(){if(online)Net.publishSoon()}}); + for(const e of remotes.values()){const o=Net.others.get(e.uid);if(o&&o.v.lk!=null)lkHeard(e,o.v.lk)} + LK.access(); + }).catch(e=>{lkAsked=false;console.error(e)}); +} +function lkSync(){if(lockerOn())lkLoad();if(LK)LK.access()} +// Another player's lk: drawn once locker.js is here (fetched now if this is the first one seen wearing something). +function lkHeard(e,lk){if(LK)LK.heard(e,lk);else if(typeof lk==='string'&&/^([ogbec][0-9]{1,3}){1,5}$/.test(lk))lkLoad()} +lkSync();if(CAPTAINS)CAPTAINS.onChange(lkSync); + // Test hook for automated browser tests only (navigator.webdriver is set by Playwright and similar tools). if(navigator.webdriver)window.__br={get state(){return state},get online(){return online},get phase(){return phase},get R(){return RD},get roster(){return roster},get curMatch(){return curMatch},get curRound(){return curRound}, get lobbyShown(){return lobbyShown},get myTeamPref(){return myTeamPref},get myKills(){return myKills},get specUid(){return specUid},get N(){return N},get W(){return W},get ents(){return ents},get score(){return score},get mode(){return mode}, + get LK(){return LK},lockerOn,lkLoad,makeSuit,SUITS,GUN_GEO,set phase(v){phase=v}, Net,player,opp,remotes,names,kills,setMyTeam,hostStart,hostRandomize,hostSetTarget,hostToLobby,cellFor,camTarget,cycleSpectate,isSpectating,handleEvent,damageEntity,raycast,startPractice,toMenu,joinPrivate,liveHumans, hitboxes,solids:()=>solids,ramps:()=>ramps,pieces,walls:()=>({h:hWall,v:vWall}),keys,renderer,scene,camera, // collision audit: the real movement, building and interpolation code, driven step by step diff --git a/e63334287a3deaa3/backrooms-1v1/locker.js b/e63334287a3deaa3/backrooms-1v1/locker.js new file mode 100644 index 00000000..a09888c6 --- /dev/null +++ b/e63334287a3deaa3/backrooms-1v1/locker.js @@ -0,0 +1,827 @@ +/* + * Backrooms 1v1–4v4: the Locker. Outfits, gun skins, build skins, elimination effects and round-win celebrations, all + * drawn here in code. + * + * NOT PUBLIC YET. index.html fetches this file only when something needs it: + * - this player may see the Locker (X.on: BR_PUBLIC in index.html, or the account signed in is one of the site's + * captains (../captains.js), or ?locker=1 on localhost / in an automated browser). X.on can change while the page is + * open: index.html then calls access(); + * - or another player in the room arrives wearing something (their node's lk). Then this file only draws them: no + * Locker button, nothing of this player's own is read, worn or sent, and the Entity stays plain. + * For everyone else this file is never loaded, nothing here runs, and the game is exactly as it was. + * + * While the shop is not open (../cosmetics.js is off), nothing is owned or bought: a player who may see the Locker finds + * every item free to wear, saved by the game as br1v1-kit (the wire string below). Once the shop is open, what is worn + * is what the shop's locker has equipped for 'backrooms-1v1'. + * + * Online. What a player wears travels in their own room node as `lk`: a letter per slot and the item's number, + * e.g. "o12g3c2" (o outfit, g gun skin, b build skin, e elimination effect, c celebration; the numbers are the `no` of the + * items in ../cosmetics.js). It is only sent while something is worn. Pages from before the Locker ignore it; here every + * part is checked against the lists below, and an unknown number draws the plain default for that slot, so an older copy + * of this file copes with newer items. Never reorder a list: add new ones at the end, with the same number in cosmetics.js. + * + * LOOKS ONLY, and fair in a ranked game. Nothing here is read by movement, shots, hits, damage or the bots: + * outfits: every outfit is the plain suit's own boxes (legs, body, head, arms; same size) with things added on the + * surface, and every one keeps a pack on its back the size of the plain suit's air tank, so no outfit is ever drawn + * smaller than the plain suit; hats only add height. The body's main colour is always the team colour (red or blue + * online), and the measured brightness and contrast against the yellow walls and carpet are never below the plain + * suit's (see the test hook's fair()). Nothing is see-through. The visor still glows. + * gun skins: the same three guns, each box recoloured (and split into stripes or patches); the length, shape, muzzle + * and the sniper's lens are unchanged; + * build skins: only the picture on a piece changes: as opaque, the same frame and brace round the edge, and measured to + * be at least as far from the walls, the carpet and both team colours as plywood. Damage still darkens it the same way; + * elimination effects: small pieces round the body that is falling over, gone in 1.5 s (the body takes 2.2 s); + * celebrations: only while the round is over (every enemy is out), and they stop as soon as the player moves. + * + * Cost. An outfit is fewer draw calls than the plain suit (one mesh per moving part: two legs, body, head, arms, plus + * one for glowing parts, against twelve), with shared materials and geometry cached per outfit and team colour. A gun + * skin is a recoloured copy of that gun's one geometry. A build skin is a different picture on the piece's own material. + * Effects use two instanced meshes and a few small pooled meshes that are only drawn while something plays. + */ +window.BackroomsLocker=function(X){ +'use strict'; +const {THREE,TX}=X;const V3=THREE.Vector3; +const GAME='backrooms-1v1'; +const now=()=>performance.now()/1000; +const clamp=(v,a,b)=>vb?b:v; +const rnd=(a,b)=>a+Math.random()*(b-a); +const TAU=Math.PI*2; + +// ===================================================================== +// The catalogue's names (../cosmetics.js has the same items, by number, with rarities and descriptions) +// ===================================================================== +const OUTFIT_NAMES=['Striker','Hoops','Gridiron','Slugger','Puck','Ace','Champ','Sprinter','Lap Swimmer','Fairway','Skater','Downhill','Pit Racer', + 'Referee','Coach','Bear Mascot','Martial Artist','Cheer Captain','Tin Bot','Sleek Android','Mech Pilot','Junkyard Bot', + 'Pirate Captain','Deckhand','First Mate','Ghost Pirate','Pinstripe Suit','The Boss','Tracksuit and Chain','Bodyguard','Tuxedo','Detective', + 'Astronaut','Wizard','Firefighter','Knight']; +const WRAP_NAMES=['Gold','Chrome','Wood Grain','Forest Camo','Desert Camo','Arctic Camo','Pixel Camo','Candy Cane','Hazard Stripes','Lava', + 'Toy Blaster','Galaxy','Checkered Flag','Pirate Brass','Football Leather']; +const BUILD_NAMES=['Concrete','Ice Block','Candy Stripes','Scrap Metal','Cardboard','Marble']; +const ELIM_NAMES=['Confetti Pop','Noclip Glitch','Ghost Away','Red Card','Treasure Coins','Nuts and Bolts','Balloon Pop','Rubber Ducks']; +const CELEB_NAMES=['Fist Pump','Victory Hop','Spin Move','Robot Dance','Pirate Jig','Take a Bow','Trophy Lift','Fireworks']; +const SLOTS=['o','g','b','e','c']; +const LISTS={o:OUTFIT_NAMES,g:WRAP_NAMES,b:BUILD_NAMES,e:ELIM_NAMES,c:CELEB_NAMES}; +const CAT_SLOT={o:'outfit',g:'wrap',b:'build',e:'elim',c:'celebrate'}; // the slot names in ../cosmetics.js +const N={};for(const s of SLOTS)N[s]=LISTS[s].length; + +// ---------------- the wire string (the node's lk) ---------------- +function parse(w){ + const k={o:0,g:0,b:0,e:0,c:0}; + if(typeof w!=='string'||w.length>24||!/^([ogbec][0-9]{1,3})*$/.test(w))return k; + for(const m of w.matchAll(/([ogbec])([0-9]{1,3})/g)){const n=+m[2];if(n>=1&&n<=N[m[1]])k[m[1]]=n} + return k; +} +function wireOf(k){if(!k)return '';let s='';for(const sl of SLOTS){const n=k[sl]|0;if(n>=1&&n<=N[sl])s+=sl+n}return s} +const worn=k=>!!k&&SLOTS.some(s=>k[s]); + +// ===================================================================== +// Outfits +// ===================================================================== +// Every outfit is made of the plain suit's own boxes, in the same places and sizes (legs .28 x .86 x .3, body .74 x .72 x +// .44, head .54, sleeves, gloves, the boot and the pack on the back, the size of the air tank), coloured its own way, +// plus things added on top of them (patches, bands, hats, collars...). A part is [w,h,d, x,y,z, colour, rx,ry,rz, shape] +// in the frame of the moving part it belongs to (legs: the hip at 0, the floor at -.86; head: its middle; arms: the +// shoulders, the sleeves pointing along -z). Colour is a hex number, or a letter for the player's own colours: +// T the team colour (red or blue online; the outfit's own `home` colours in practice), K a darker shade of it, +// L a lighter one, D the team's trim, W white, V the visor's glow; G(hex) is a fixed glowing colour. +// shape: undefined a box, 'c' a cylinder (w and d its width, h its height), 'o' a ball. +const G=h=>0x1000000+h; +const W='W',T='T',K='K',L='L',D='D',V='V'; +const GOLD=0xe8b22e,SILVER=0xc9d0d6,STEEL=0x9aa3ab,INK=0x34343c,SHOE=0x3a3a42,CREAM=0xf1ece0; +// on the body (x -.37..37, y .86..1.58, z -.22 front .. .22 back). Lt: layer, for patches on patches. +const off=Lt=>.004+.012*(Lt||0); +const F=(x,y,w,h,c,Lt,rz)=>[w,h,.02,x,y,-.22-off(Lt),c,0,0,rz||0]; // a patch on the front +const Bk=(x,y,w,h,c,Lt,rz)=>[w,h,.02,x,y,.22+off(Lt),c,0,0,rz||0]; // on the back +const Sd=(s,y,d,h,c,Lt,z)=>[.02,h,d,s*(.37+off(Lt)),y,z||0,c]; // on a side (s -1 left, 1 right) +const band=(y,h,c,Lt)=>{const o=.02+2*off(Lt);return [.74+o,h,.44+o,0,y,0,c]};// right round the body +// on the head (a cube of .54 round its middle) +const HF=(x,y,w,h,c,Lt)=>[w,h,.02,x,y,-.27-off(Lt),c]; +const HB=(x,y,w,h,c,Lt)=>[w,h,.02,x,y,.27+off(Lt),c]; +const HS=(s,y,z,d,h,c,Lt)=>[.02,h,d,s*(.27+off(Lt)),y,z,c]; +const HT=(x,z,w,d,c,Lt)=>[w,.02,d,x,.27+off(Lt),z,c]; +const hBand=(y,h,c,Lt)=>{const o=.02+2*off(Lt);return [.54+o,h,.54+o,0,y,0,c]}; +// on a leg (x -.14..14 with the outside at s*.14, z -.15 front .. .15 back) +const LB=(y,h,c,Lt)=>{const o=.02+2*off(Lt);return [.28+o,h,.3+o,0,y,0,c]}; +const LF=(x,y,w,h,c,Lt)=>[w,h,.02,x,y,-.15-off(Lt),c]; +const LBk=(x,y,w,h,c,Lt)=>[w,h,.02,x,y,.15+off(Lt),c]; +const LS=(s,y,d,h,c,Lt,z)=>[.02,h,d,s*(.14+off(Lt)),y,z||0,c]; +// on an arm: i 0 the left sleeve, 1 the right; u along the sleeve (.31 the shoulder end, -.31 the wrist), dx/dy across it +const SLV=[{c:[-.26,-.05,-.26],ry:-.35},{c:[.3,-.05,-.22],ry:0}]; +function onArm(i,dx,dy,u,w,h,d,c,rx,rz,shape){const S=SLV[i],cs=Math.cos(S.ry),sn=Math.sin(S.ry); + return [w,h,d,S.c[0]+dx*cs+u*sn,S.c[1]+dy,S.c[2]-dx*sn+u*cs,c,rx||0,S.ry,rz||0,shape]} +const aBand=(i,u,len,c,Lt)=>{const o=.02+2*off(Lt);return onArm(i,0,0,u,.17+o,.17+o,len,c)}; +const aTop=(i,u,len,w,c,Lt,dx)=>onArm(i,dx||0,.085+off(Lt),u,w,.02,len,c); // a stripe along the top of a sleeve +const arms2=f=>[f(0),f(1)]; +// a digit in a 3 x 5 grid of blocks on the back (z>0) or front of the body; s: size of one block +const DIG=['111101101101111','010110010010111','111001111100111','111001111001111','101101111001001','111100111001111','111100111101111','111001001001001','111101111101111','111101111001111']; +function num(str,x,y,s,c,back,Lt){const out=[],n=String(str).length,w=s*3+s*.6;let x0=x-(n*w-s*.6)/2; + for(const ch of String(str)){const g=DIG[+ch];for(let j=0;j<5;j++)for(let i=0;i<3;i++)if(g[j*3+i]==='1'){const px=x0+i*s+s/2,py=y+(2-j)*s;out.push(back?Bk(-px,py,s*1.02,s*1.02,c,Lt):F(px,py,s*1.02,s*1.02,c,Lt))}x0+=w} + return out} +// the pack on the back (the same box as the plain suit's air tank), so no outfit is drawn smaller than the plain suit +const PACK=[.42,.52,.2,0,1.26,.31]; +const pack=(c,extra)=>[[...PACK,c],...(extra||[])]; +// an eye patch over the left half of the visor, with its strap round the head +const PATCH=[[.19,.2,.03,-.105,.03,-.305,INK],[.6,.035,.02,0,.13,-.28,INK,0,0,-.42],[.025,.035,.56,-.28,.2,0,INK],[.025,.035,.56,.28,.06,0,INK],[.56,.035,.02,0,.13,.285,INK]]; +// the list itself: home is the [main, trim] colours used in practice; base sets the colours of the plain boxes (leg, +// boot, torso, hood, sleeve, glove; visor: false for an outfit that draws its own eyes); hat: hides Turkey Week's +// pilgrim hat (it would sit inside this one) +const OUTFITS=[null, +// ---------------- sports ---------------- +{id:'striker',home:[0x1f9e5a,0x0d4a2a],base:{leg:T,boot:0xf4f4f4,sleeve:T,glove:T}, + leg:s=>[[.3,.34,.32,0,-.17,0,W],LB(-.5,.05,W),LB(-.12,.03,T,1),LS(s,-.2,.12,.26,T,1),[.315,.06,.385,0,-.73,-.03,T],[.06,.03,.06,-.08,-.865,-.12,SHOE],[.06,.03,.06,.08,-.865,-.12,SHOE],[.06,.03,.06,0,-.865,.1,SHOE]], + torso:[band(1.555,.05,W),F(0,1.5,.16,.1,W),F(0,1.47,.08,.06,T,1),Sd(-1,1.22,.1,.62,W),Sd(1,1.22,.1,.62,W),band(.9,.1,W),F(-.18,1.38,.12,.12,W),...num(9,0,1.24,.06,W,true),...pack(T,[Bk(0,1.32,.3,.05,W,9),Bk(0,1.2,.3,.05,W,9)])], + head:[hBand(.16,.07,W)], + arms:[...arms2(i=>aBand(i,-.14,.06,W))]}, +{id:'hoops',home:[0xff7a1a,0x7a2e00],base:{leg:L,boot:0xf6f6f6,sleeve:L,glove:L}, + leg:s=>[[.32,.48,.34,0,-.25,0,T],LS(s,-.25,.1,.46,W,2),LB(-.48,.04,W,2),LB(-.6,.16,W),LB(-.56,.03,T,1),[.33,.12,.4,0,-.8,-.02,W],LS(s,-.79,.16,.04,T,2,-.02)], + torso:[band(1.555,.05,W),F(0,1.52,.2,.08,L,1),...num(31,0,1.25,.055,W,false),...num(31,0,1.25,.065,W,true),band(.92,.12,T,1),[.16,.02,.12,-.29,1.585,0,W],[.16,.02,.12,.29,1.585,0,W],...pack(T,[Bk(0,1.26,.06,.5,W,9)])], + head:[hBand(.18,.08,W),hBand(.18,.025,T,1)], + arms:[...arms2(i=>aBand(i,-.15,.07,W)),...arms2(i=>aBand(i,.24,.06,T))]}, +{id:'gridiron',home:[0x6a2bc8,0x2a0f55],hat:1,base:{leg:0xe8e6dc,boot:SHOE,sleeve:T,glove:W}, + leg:s=>[LS(s,-.25,.08,.5,T,0),LB(-.5,.04,T),[.3,.2,.32,0,-.62,0,T],LB(-.58,.03,W,1)], + torso:[[.92,.16,.52,0,1.5,0,T],[.94,.03,.54,0,1.585,0,W],F(0,1.47,.24,.06,W,6),...num(4,0,1.2,.06,W,false),...num(4,0,1.22,.075,W,true),band(.9,.1,T),...pack(K,[Bk(0,1.4,.36,.05,W,9)])], + head:[[.6,.56,.6,0,.02,0,T],[.08,.02,.6,0,.31,0,W],[.03,.4,.04,-.2,-.03,-.33,STEEL],[.03,.4,.04,.2,-.03,-.33,STEEL],[.43,.03,.04,0,-.09,-.335,STEEL],[.43,.03,.04,0,-.17,-.335,STEEL],[.03,.12,.04,0,-.13,-.335,STEEL],[.1,.1,.02,-.31,-.05,0,W],[.1,.1,.02,.31,-.05,0,W]], + arms:[...arms2(i=>aBand(i,.05,.05,W)),...arms2(i=>aBand(i,-.05,.05,W))]}, +{id:'slugger',home:[0x2153b8,0x0c2457],hat:1,base:{leg:0xeceae2,boot:SHOE,sleeve:T,glove:W}, + leg:s=>[LS(s,-.25,.04,.52,T),LB(-.5,.04,0xeceae2,1),[.29,.22,.31,0,-.62,0,T],LF(0,-.66,.08,.14,W,1)], + torso:[F(0,1.22,.04,.7,W),...[1.45,1.3,1.15,1.0].map(y=>F(0,y,.03,.03,0xdedede,1)),band(.9,.08,INK),F(0,.9,.08,.06,SILVER,1),band(1.56,.04,W),...num(27,0,1.25,.06,W,true),F(.18,1.4,.14,.04,W),...pack(T,[Bk(0,1.4,.42,.05,W,9)])], + head:[[.58,.3,.58,0,.14,0,T],[.5,.04,.2,0,.04,-.36,T],[.12,.2,.2,.29,-.04,0,T],[.07,.02,.07,0,.3,0,W]], + arms:[...arms2(i=>aBand(i,-.12,.05,W))]}, +{id:'puck',home:[0xc41f3a,0x55101b],hat:1,base:{leg:T,boot:SHOE,sleeve:T,glove:0x8a2c1c}, + leg:s=>[[.32,.32,.34,0,-.16,0,K],LB(-.12,.03,W,1),LB(-.45,.05,W),LB(-.53,.05,W),[.31,.14,.36,0,-.74,-.02,SHOE],[.03,.05,.4,0,-.835,-.02,SILVER]], + torso:[[.8,.74,.5,0,1.2,0,T],[.82,.06,.52,0,1.0,0,W],[.82,.04,.52,0,.92,0,W],[.82,.05,.52,0,1.5,0,W],...num(17,0,1.26,.055,W,true),...pack(K,[Bk(0,1.1,.42,.06,W,9)])], + head:[[.58,.3,.58,0,.13,0,T],[.03,.32,.04,-.18,-.05,-.31,SILVER],[.03,.32,.04,.18,-.05,-.31,SILVER],[.03,.32,.04,0,-.05,-.31,SILVER],[.39,.03,.04,0,-.06,-.315,SILVER],[.39,.03,.04,0,-.16,-.315,SILVER],[.39,.03,.04,0,.1,-.315,SILVER]], + arms:[...arms2(i=>onArm(i,0,0,0,.2,.2,.5,T)),...arms2(i=>aBand(i,-.02,.05,W,2)),...arms2(i=>aBand(i,-.1,.04,W,2))]}, +{id:'ace',home:[0x18b4a6,0x0a5a52],base:{leg:L,boot:W,sleeve:T,glove:L}, + leg:s=>[[.3,.3,.32,0,-.15,0,W],LB(-.66,.12,W),[.32,.06,.39,0,-.84,-.03,T]], + torso:[F(0,1.5,.12,.16,W),[.3,.05,.46,-.1,1.58,0,W,0,0,.25],[.3,.05,.46,.1,1.58,0,W,0,0,-.25],F(0,1.47,.03,.03,T,1),F(0,1.42,.03,.03,T,1),band(.9,.08,W),Bk(0,1.5,.3,.06,W),...pack(W,[Bk(0,1.26,.3,.04,T,9)])], + head:[hBand(.19,.07,W),[.48,.03,.2,0,.17,-.34,W]], + arms:[...arms2(i=>aBand(i,-.16,.08,W)),...arms2(i=>aBand(i,.23,.05,W))]}, +{id:'champ',home:[0xd62828,0x5a0d0d],hat:1,base:{leg:L,boot:T,sleeve:L,glove:T}, + leg:s=>[[.32,.36,.34,0,-.18,0,W],LS(s,-.18,.12,.34,T,2),[.29,.26,.31,0,-.68,0,T],LF(0,-.64,.04,.2,W,1)], + torso:[band(.98,.14,T,2),band(1.22,.72,T),F(0,1.42,.5,.03,W,1),Bk(0,1.42,.5,.03,W,1),...pack(T,[Bk(0,1.5,.34,.05,W,9)])], + head:[hBand(.16,.14,T),[.58,.1,.58,0,.25,0,T],HS(-1,-.06,-.1,.22,.24,T,1),HS(1,-.06,-.1,.22,.24,T,1),[.36,.06,.04,0,-.13,-.3,T],[.24,.06,.06,0,.22,-.3,W]], + arms:[...arms2(i=>onArm(i,0,0,-.245,.25,.25,.22,T)),...arms2(i=>onArm(i,0,0,-.11,.21,.21,.08,W))]}, +{id:'sprinter',home:[0xff3d7f,0x6a0f30],base:{leg:K,boot:0x3ee6d0,sleeve:L,glove:L}, + leg:s=>[[.3,.24,.32,0,-.12,0,D],LS(s,-.12,.08,.22,W,1),[.31,.05,.39,0,-.84,-.03,0x1f7a70]], + torso:[[.86,.09,.02,0,1.22,-.234,W,0,0,.7],[.86,.09,.02,0,1.22,.234,W,0,0,-.7],F(.05,1.12,.3,.2,W,2),...num(42,.05,1.12,.025,INK,false,3),band(.9,.06,D),...pack(T,[Bk(0,1.26,.42,.05,W,9)])], + head:[hBand(.16,.06,T,1)], + arms:[...arms2(i=>aBand(i,.2,.12,T))]}, +{id:'swim',home:[0x1689e0,0x0a3a66],hat:1,visor:false,base:{leg:T,boot:0x39c1e8,sleeve:T,glove:T}, + leg:s=>[LS(s,-.4,.06,.8,W,0),LB(-.62,.03,K,0)], + torso:[Sd(-1,1.22,.06,.7,W),Sd(1,1.22,.06,.7,W),[.8,.2,.5,0,1.5,0,W],[.2,.4,.06,-.2,1.33,-.24,W],...pack(W,[Bk(0,1.3,.3,.06,T,9),Bk(0,1.2,.3,.06,T,9)])], + head:[[.58,.34,.58,0,.12,0,T],[.6,.04,.6,0,.0,0,K],[.16,.14,.04,-.11,.03,-.29,G(0x9ff2ff)],[.16,.14,.04,.11,.03,-.29,G(0x9ff2ff)],[.06,.04,.03,0,.03,-.285,INK],[.6,.04,.6,0,.03,0,INK],[.1,.04,.04,-.03,-.13,-.285,0x234a6a]], + arms:[]}, +{id:'fairway',home:[0x2e8c5a,0x13432a],hat:1,base:{leg:0xcfd3d8,boot:W,sleeve:W,glove:W}, + leg:s=>[LF(0,-.4,.02,.8,0xb5bac0,1),LS(s,-.4,.02,.8,0xb5bac0,1),LB(-.2,.02,0xb5bac0,1),LB(-.5,.02,0xb5bac0,1),[.315,.07,.385,0,-.72,-.03,0x6a4a2c]], + torso:[band(1.2,.7,T),...[-.22,0,.22].flatMap(x=>[F(x,1.06,.12,.12,K,1,.785),F(x,1.32,.12,.12,K,1,.785),Bk(x,1.06,.12,.12,K,1,.785),Bk(x,1.32,.12,.12,K,1,.785)]), + [.8,.025,.02,0,1.19,-.245,W,0,0,.6],[.8,.025,.02,0,1.19,-.245,W,0,0,-.6],[.8,.025,.02,0,1.19,.245,W,0,0,.6],[.8,.025,.02,0,1.19,.245,W,0,0,-.6],F(0,1.52,.2,.1,W,2),...pack(T,[Bk(0,1.4,.42,.04,W,9)])], + head:[[.58,.16,.58,0,.21,0,K],[.56,.05,.24,0,.18,-.36,K],[.06,.04,.06,0,.3,0,K]], + arms:[...arms2(i=>aBand(i,.18,.12,T,1))]}, +{id:'skater',home:[0xe0402a,0x5a160c],hat:1,base:{leg:0x8a9098,boot:SHOE,sleeve:T,glove:L}, + leg:s=>[[.31,.5,.33,0,-.24,0,0x8a9098],LS(s,-.3,.12,.12,0x7a8088,1),LB(-.6,.16,W),LB(-.56,.025,T,1),LB(-.62,.025,T,1),[.32,.04,.39,0,-.85,-.03,W]], + torso:[[.8,.82,.48,0,1.17,0,T],[.07,.2,.02,0,1.24,-.256,W,0,0,.5],[.07,.2,.02,.03,1.12,-.256,W,0,0,-.5],[.06,.03,.02,0,1.18,-.256,W], + ...pack(K,[[.24,.86,.03,0,1.26,.43,0x3a3f48],[.26,.02,.04,0,1.7,.43,W],[.26,.02,.04,0,.82,.43,W],...[[-.09,1.6],[.09,1.6],[-.09,.92],[.09,.92]].map(([x,y])=>[.06,.06,.06,x,y,.47,W,0,0,0,'c'])])], + head:[[.58,.3,.58,0,.14,0,T],hBand(.02,.08,K,1),[.12,.08,.12,0,.32,0,K]], + arms:[...arms2(i=>onArm(i,0,0,.08,.21,.21,.34,T))]}, +{id:'downhill',home:[0x2f6fd8,0x10284f],hat:1,visor:false,base:{leg:K,boot:W,sleeve:T,glove:T}, + leg:s=>[LB(-.3,.02,D,0),LB(-.1,.02,D,0),[.33,.24,.4,0,-.74,-.02,W],[.33,.03,.4,0,-.68,-.02,T,0,0,0],LS(s,-.72,.1,.04,T,3)], + torso:[[.8,.74,.5,0,1.2,0,T],...[1.02,1.18,1.34].map(y=>[.82,.025,.52,0,y,0,K]),[.4,.12,.5,0,1.58,0,T],[.03,.66,.02,0,1.2,-.258,W],...pack(K,[Bk(0,1.3,.42,.04,W,9)])], + head:[[.58,.36,.58,0,.1,0,T],[.5,.2,.07,0,.02,-.3,G(0xffb04a)],[.44,.06,.08,0,.06,-.302,G(0xffe39a)],[.6,.05,.6,0,.02,0,INK]], + arms:[...arms2(i=>onArm(i,0,0,-.245,.22,.22,.18,T))]}, +{id:'racer',home:[0xe8202a,0x5a0a0e],hat:1,visor:false,base:{leg:T,boot:SHOE,sleeve:T,glove:W}, + leg:s=>[LS(s,-.4,.05,.8,W,0),LS(s,-.4,.02,.8,INK,1)], + torso:[Sd(-1,1.22,.05,.7,W),Sd(1,1.22,.05,.7,W),band(1.555,.05,W),F(-.18,1.4,.14,.07,0x3ee6d0),F(.18,1.4,.14,.07,GOLD),F(-.18,1.28,.14,.07,W),F(.18,1.28,.14,.07,0x3a7be8),F(0,1.08,.3,.08,W),band(.9,.08,K),...pack(K,[Bk(0,1.4,.42,.05,W,9)])], + head:[[.6,.6,.6,0,.0,0,W],[.62,.18,.62,0,.18,0,T],[.62,.04,.62,0,.0,0,T],[.46,.12,.04,0,.02,-.31,G(0x7fe4ff)],[.44,.03,.05,0,.06,-.31,G(0xdffaff)]], + arms:[...arms2(i=>aTop(i,0,.62,.04,W))]}, +{id:'referee',home:[0x3f8fe0,0x183a66],hat:1,base:{leg:INK,boot:SHOE,sleeve:T,glove:L}, + leg:s=>[LB(-.6,.16,T),LB(-.53,.025,W,1)], + torso:[...[-.29,-.145,0,.145,.29].map(x=>F(x,1.22,.06,.7,W)),...[-.29,-.145,0,.145,.29].map(x=>Bk(x,1.22,.06,.7,W)),Sd(-1,1.22,.06,.7,W),Sd(1,1.22,.06,.7,W),band(1.555,.05,INK),band(.9,.08,INK), + [.02,.3,.02,-.06,1.42,-.252,INK,0,0,.3],[.02,.3,.02,.06,1.42,-.252,INK,0,0,-.3],[.05,.04,.08,0,1.28,-.27,SILVER],...pack(T,[Bk(0,1.26,.42,.05,W,9)])], + head:[[.58,.16,.58,0,.21,0,INK],[.5,.04,.22,0,.15,-.36,INK]], + arms:[...arms2(i=>aBand(i,-.14,.04,INK))]}, +{id:'coach',home:[0x8a2be2,0x351056],hat:1,base:{leg:K,boot:W,sleeve:T,glove:L}, + leg:s=>[LS(s,-.43,.05,.86,W,0)], + torso:[F(0,1.22,.025,.72,SILVER),band(1.56,.06,K),[.4,.14,.5,0,1.6,0,T],Sd(-1,1.22,.06,.7,W),Sd(1,1.22,.06,.7,W),[.02,.32,.02,-.08,1.43,-.252,W,0,0,.25],[.02,.32,.02,.08,1.43,-.252,W,0,0,-.25],[.05,.05,.09,0,1.28,-.27,SILVER],Bk(0,1.45,.42,.06,W),...pack(T,[Bk(0,1.3,.42,.05,W,9)])], + head:[[.58,.16,.58,0,.21,0,T],[.5,.04,.22,0,.15,-.36,T],[.06,.04,.06,0,.3,0,W],[.5,.03,.03,0,.16,-.47,W]], + arms:[...arms2(i=>aTop(i,0,.62,.035,W))]}, +{id:'mascot',home:[0xc8641e,0x5a2a0a],hat:1,visor:false,base:{leg:T,boot:L,sleeve:T,glove:L}, + leg:s=>[[.34,.2,.42,0,-.76,-.04,L],[.05,.03,.06,-.08,-.66,-.24,D],[.05,.03,.06,.08,-.66,-.24,D]], + torso:[[.8,.76,.5,0,1.2,0,T],[.44,.5,.02,0,1.16,-.26,L],[.2,.2,.2,0,1.05,.27,L],...pack(T,[])], + head:[[.62,.56,.6,0,.02,0,T],[.24,.16,.12,0,-.1,-.34,L],[.1,.06,.04,0,-.06,-.405,INK],[.14,.14,.08,-.24,.29,0,T],[.14,.14,.08,.24,.29,0,T],[.08,.08,.02,-.24,.29,-.045,L],[.08,.08,.02,.24,.29,-.045,L], + [.12,.12,.03,-.13,.08,-.31,G(0xffffff)],[.12,.12,.03,.13,.08,-.31,G(0xffffff)],[.05,.07,.03,-.12,.07,-.325,G(0x1a1a22)],[.05,.07,.03,.14,.07,-.325,G(0x1a1a22)]], + arms:[...arms2(i=>onArm(i,0,0,-.245,.22,.22,.18,L))]}, +{id:'judo',home:[0x2a5fd0,0x0f2558],base:{leg:T,boot:W,sleeve:T,glove:L}, + leg:s=>[[.31,.8,.33,0,-.42,0,T],LB(-.79,.04,K,1)], + torso:[[.78,.74,.48,0,1.2,0,T],[.12,.6,.02,-.06,1.26,-.25,K,0,0,-.35],[.12,.6,.02,.06,1.26,-.25,K,0,0,.35],[.82,.08,.52,0,.98,0,INK],[.08,.08,.04,0,.98,-.27,INK],[.04,.22,.02,-.04,.86,-.275,INK,0,0,.2],[.04,.22,.02,.05,.86,-.275,INK,0,0,-.2],...pack(T,[Bk(0,1.26,.42,.04,K,9)])], + head:[hBand(.12,.07,W),[.04,.18,.03,-.05,.04,.31,W,0,0,.3],[.04,.18,.03,.05,.04,.31,W,0,0,-.3]], + arms:[...arms2(i=>onArm(i,0,0,-.08,.21,.21,.46,T))]}, +{id:'cheer',home:[0xe8327a,0x5e0f30],base:{leg:W,boot:W,sleeve:W,glove:W}, + leg:s=>[[.32,.04,.39,0,-.84,-.03,T],LF(0,-.75,.05,.08,T,1)], + torso:[[.1,.36,.02,-.12,1.3,-.235,W,0,0,.6],[.1,.36,.02,.12,1.3,-.235,W,0,0,-.6],[.1,.36,.02,-.12,1.3,.235,W,0,0,-.6],[.1,.36,.02,.12,1.3,.235,W,0,0,.6], + ...[[0,-1],[0,1]].flatMap(([a,b])=>[]),[.82,.28,.52,0,.8,0,T],[.83,.04,.53,0,.68,0,W],...[-.3,-.15,0,.15,.3].map(x=>[.02,.27,.02,x,.8,-.265,K]),...pack(T,[Bk(0,1.26,.3,.06,W,9)])], + head:[[.2,.12,.08,0,.24,.3,T],[.12,.14,.06,-.13,.24,.3,T,0,0,.4],[.12,.14,.06,.13,.24,.3,T,0,0,-.4]], + arms:[...arms2(i=>onArm(i,0,0,.1,.19,.19,.3,T))]}, +// ---------------- robots ---------------- +{id:'tinbot',home:[0xd04a3a,0x5a1a12],hat:1,visor:false,base:{leg:T,boot:SILVER,sleeve:SILVER,glove:SILVER}, + leg:s=>[LB(-.2,.04,SILVER),LB(-.4,.04,SILVER),LB(-.6,.04,SILVER),[.34,.14,.42,0,-.79,-.04,SILVER]], + torso:[[.78,.74,.48,0,1.22,0,T],F(0,1.25,.4,.3,SILVER,2),F(-.1,1.3,.1,.1,G(0xff5c5c),3),F(.08,1.3,.08,.08,G(0x7dff8a),3),F(.08,1.18,.22,.04,INK,3),...[[-.33,1.53],[.33,1.53],[-.33,.92],[.33,.92]].flatMap(([x,y])=>[F(x,y,.04,.04,SILVER,2),Bk(x,y,.04,.04,SILVER,2)]),...pack(SILVER,[Bk(0,1.26,.3,.06,T,9),Bk(-.08,1.4,.06,.06,G(0xffd23f),10)])], + head:[[.04,.18,.04,0,.36,0,SILVER],[.09,.09,.09,0,.48,0,G(0xff5c5c),0,0,0,'o'],[.14,.12,.04,-.12,.06,-.29,G(0x8ff6ff)],[.14,.12,.04,.12,.06,-.29,G(0x8ff6ff)],[.3,.025,.03,0,-.1,-.285,SILVER],[.3,.025,.03,0,-.15,-.285,SILVER],[.08,.12,.12,-.31,0,0,SILVER,0,0,Math.PI/2,'c'],[.08,.12,.12,.31,0,0,SILVER,0,0,Math.PI/2,'c'],HT(0,0,.4,.4,K)], + arms:[...arms2(i=>[0.22,.1,-.02,-.14].map(u=>aBand(i,u,.05,T))).flat()]}, +{id:'android',home:[0x8a96a8,0x2c3440],hat:1,visor:false,base:{leg:T,boot:W,sleeve:T,glove:W}, + leg:s=>[LF(0,-.43,.18,.8,W,0),LF(0,-.43,.02,.7,G(0x6ff4ff),1),LB(-.43,.06,0xb9c2cc,0),[.31,.17,.38,0,-.78,-.03,W]], + torso:[F(0,1.24,.5,.58,W),F(0,1.24,.02,.5,G(0x6ff4ff),1),F(0,1.36,.3,.02,G(0x6ff4ff),1),Bk(0,1.24,.5,.58,W),Sd(-1,1.22,.2,.6,W),Sd(1,1.22,.2,.6,W),...pack(W,[Bk(0,1.26,.3,.02,G(0x6ff4ff),9),Bk(0,1.36,.3,.02,G(0x6ff4ff),9)])], + head:[[.56,.56,.56,0,0,0,W],HT(0,0,.3,.56,T),[.46,.06,.03,0,.03,-.29,G(0x6ff4ff)],HS(-1,0,0,.2,.2,T,1),HS(1,0,0,.2,.2,T,1)], + arms:[...arms2(i=>aTop(i,0,.5,.02,G(0x6ff4ff),1)),...arms2(i=>aBand(i,.05,.04,0xb9c2cc))]}, +{id:'mech',home:[0xe0a020,0x3a2a08],hat:1,visor:false,base:{leg:T,boot:INK,sleeve:T,glove:INK}, + leg:s=>[LF(0,-.4,.26,.16,SILVER,0),[.3,.08,.34,0,-.08,0,INK],LS(s,-.55,.18,.16,SILVER)], + torso:[F(0,1.32,.6,.34,SILVER),[.06,.72,.02,-.2,1.22,-.25,INK],[.06,.72,.02,.2,1.22,-.25,INK],[.06,.72,.02,-.2,1.22,.25,INK],[.06,.72,.02,.2,1.22,.25,INK],[.26,.18,.54,-.39,1.5,0,SILVER],[.26,.18,.54,.39,1.5,0,SILVER],...num(7,-.39,1.5,.03,T,false,1).map(p=>{p[3]-=0;return p}),band(.9,.1,INK), + ...pack(SILVER,[[.14,.4,.14,-.12,1.2,.47,INK,0,0,0,'c'],[.14,.4,.14,.12,1.2,.47,INK,0,0,0,'c'],[.1,.06,.1,-.12,.98,.47,G(0xff8a3d),0,0,0,'c'],[.1,.06,.1,.12,.98,.47,G(0xff8a3d),0,0,0,'c']])], + head:[[.6,.58,.6,0,.02,0,T],[.5,.24,.05,0,.02,-.31,G(0x8fe0ff)],[.62,.06,.62,0,.17,0,INK],[.04,.04,.24,.26,-.12,-.24,INK],[.06,.06,.06,.26,-.12,-.37,G(0xff5c5c)],HT(0,0,.08,.6,W,1)], + arms:[...arms2(i=>onArm(i,0,.04,.18,.22,.12,.26,SILVER))]}, +{id:'junkbot',home:[0x3a9a7a,0x14382c],hat:1,visor:false,base:{leg:T,boot:0x8a7a6a,sleeve:STEEL,glove:0x8a7a6a}, + leg:s=>[LF(.03*s,-.3,.16,.2,STEEL,0),LB(-.6,.05,0xb5522a)], + torso:[F(-.18,1.4,.26,.24,STEEL),F(.2,1.1,.24,.22,0xb5522a),Bk(.15,1.38,.26,.3,STEEL),...[[-.28,1.5],[-.08,1.5],[-.28,1.3],[.1,1.18],[.3,1.0]].map(([x,y])=>F(x,y,.035,.035,SILVER,1)),band(.9,.08,STEEL), + ...pack(0x8a7a6a,[[.08,.5,.08,.13,1.55,.42,STEEL,0,0,0,'c'],[.1,.06,.1,.13,1.82,.42,INK,0,0,0,'c']])], + head:[[.56,.5,.56,0,-.01,0,STEEL],[.2,.2,.04,-.1,.04,-.29,G(0xffd23f),0,0,0],[.1,.1,.04,.14,.08,-.29,G(0x8ff6ff)],[.24,.03,.03,.05,-.14,-.285,INK],HT(-.1,-.1,.2,.2,0xb5522a),HT(.12,.1,.16,.2,T)], + arms:[...arms2(i=>onArm(i,.02,.02,.1,.2,.14,.22,0xb5522a))]}, +// ---------------- pirates (every one with an eye patch) ---------------- +{id:'pcaptain',home:[0xb3263a,0x4a0e18],hat:1,base:{leg:CREAM,boot:INK,sleeve:T,glove:CREAM}, + leg:s=>[[.31,.4,.33,0,-.66,0,INK],[.34,.08,.36,0,-.43,0,INK]], + torso:[band(1.22,.72,T),[.78,.42,.06,0,.68,.24,T],[.36,.42,.06,-.2,.68,-.24,T],[.36,.42,.06,.2,.68,-.24,T],F(0,1.42,.14,.24,CREAM,1),...[1.42,1.28,1.14,1.0].flatMap(y=>[F(-.15,y,.04,.04,GOLD,1),F(.15,y,.04,.04,GOLD,1)]),band(.94,.08,INK,1),F(0,.94,.1,.1,GOLD,2), + [.5,.03,.02,0,1.2,-.254,GOLD,0,0,.85],...pack(0x7a4a24,[Bk(0,1.26,.42,.04,GOLD,9),Bk(0,1.06,.42,.04,GOLD,9)]), + [.1,.12,.16,-.3,1.66,-.02,0x3fae55],[.08,.08,.1,-.3,1.76,-.08,0x3fae55],[.03,.04,.05,-.3,1.74,-.15,0xffd23f],[.12,.04,.06,-.3,1.72,-.06,0xe8453c],[.04,.1,.14,-.36,1.64,0,0x2f7fe8],[.04,.14,.06,-.3,1.56,.08,0xe8453c,.4]], + head:[[.66,.05,.66,0,.27,0,INK,0,.785],[.62,.05,.62,0,.27,0,INK],[.46,.16,.46,0,.36,0,INK],[.68,.025,.68,0,.3,0,GOLD,0,.785],[.04,.18,.1,.2,.42,.1,W,.4],...PATCH], + arms:[...arms2(i=>aBand(i,-.14,.1,K,1)),...arms2(i=>onArm(i,0,.11,-.14,.04,.03,.04,GOLD))]}, +{id:'deckhand',home:[0x2a6fd0,0x0f2a52],hat:1,base:{leg:0x9aa2ac,boot:0x6a4a2c,sleeve:W,glove:CREAM}, + leg:s=>[LB(-.6,.06,0x8a929c,1)], + torso:[...[1.52,1.38,1.24,1.1,.96].map(y=>band(y,.07,T)),band(.88,.05,0x6a4a2c,1),...pack(0x8a6a44,[Bk(0,1.26,.42,.03,0x6a4a2c,9)])], + head:[[.58,.24,.58,0,.16,0,T],[.1,.1,.1,0,.18,.31,T],[.06,.16,.04,-.04,.08,.33,T,0,0,.3],[.06,.16,.04,.04,.08,.33,T,0,0,-.3],...[[-.15,-.1],[.1,.12],[-.05,.15],[.18,-.12]].map(([x,z])=>HT(x,z,.05,.05,W,1)),...PATCH], + arms:[...arms2(i=>[.2,.06,-.08].map(u=>aBand(i,u,.06,T))).flat()]}, +{id:'firstmate',home:[0x2b8a6e,0x0e3a2c],hat:1,base:{leg:0x5a5f68,boot:INK,sleeve:CREAM,glove:CREAM}, + leg:s=>[[.33,.12,.36,0,-.55,0,INK],LB(-.12,.02,0x4a4f58,1)], + torso:[F(0,1.22,.18,.72,CREAM),[.27,.74,.03,-.24,1.21,-.235,T],[.27,.74,.03,.24,1.21,-.235,T],Bk(0,1.22,.74,.72,T),Sd(-1,1.22,.44,.72,T),Sd(1,1.22,.44,.72,T),band(.95,.12,K,2),[.1,.24,.04,.25,.8,-.24,K],F(-.14,1.48,.04,.04,GOLD,4), + ...pack(0x6a4a2c,[Bk(0,1.34,.42,.05,INK,9)])], + head:[[.58,.2,.58,0,.18,0,0xe8453c],...[[-.12,-.12],[.12,.08],[-.04,.16],[.16,-.14]].map(([x,z])=>HT(x,z,.05,.05,W,1)),[.1,.08,.1,.22,.1,.3,0xe8453c],...PATCH], + arms:[onArm(0,0,0,-.21,.12,.12,.06,SILVER),onArm(0,0,-.01,-.29,.04,.04,.12,SILVER),onArm(0,0,.05,-.355,.04,.12,.04,SILVER),onArm(0,0,.1,-.31,.04,.04,.1,SILVER),onArm(1,0,0,-.15,.2,.2,.06,CREAM)], + noGlove:[1,0]}, +{id:'ghostpirate',home:[0x3a8a8a,0x123838],hat:1,visor:false,base:{leg:0xd6f2ee,boot:0xbfe6e0,sleeve:T,glove:0xd6f2ee}, + leg:s=>[LB(-.3,.03,0xa8dcd4,1),LB(-.55,.03,0xa8dcd4,1)], + torso:[band(1.22,.72,T),...[-.3,-.1,.1,.3].map((x,i)=>[.16,.12+(i%2)*.08,.46,x,.83-(i%2)*.04,0,T]),F(0,1.42,.14,.24,0xd6f2ee,1),...[1.42,1.24,1.06].map(y=>F(-.15,y,.05,.05,0xa8dcd4,1)), + ...pack(0x6f8f8a,[Bk(0,1.26,.42,.04,0xa8dcd4,9)])], + head:[[.56,.56,.56,0,0,0,0xd6f2ee],[.66,.05,.66,0,.27,0,K,0,.785],[.46,.16,.46,0,.36,0,K],[.12,.1,.03,-.12,.04,-.29,G(0x7dffc8)],[.12,.1,.03,.12,.04,-.29,G(0x7dffc8)],[.26,.04,.03,0,-.14,-.285,0x5f8f8a],...PATCH.slice(1)], + arms:[...arms2(i=>aBand(i,-.16,.08,T,1))]}, +// ---------------- mobsters and suits (costume party) ---------------- +{id:'pinstripe',home:[0x4a5a7a,0x1a2232],hat:1,base:{leg:T,boot:INK,sleeve:T,glove:CREAM}, + leg:s=>[...[-.08,0,.08].map(x=>LF(x,-.4,.012,.8,0xe8e8e8)),...[-.08,0,.08].map(x=>LBk(x,-.4,.012,.8,0xe8e8e8)),[.315,.08,.385,0,-.75,-.03,W]], + torso:[...[-.3,-.22,-.14,.14,.22,.3].map(x=>F(x,1.22,.012,.7,0xe8e8e8)),...[-.3,-.2,-.1,0,.1,.2,.3].map(x=>Bk(x,1.22,.012,.7,0xe8e8e8)),F(0,1.42,.16,.32,W,1),F(0,1.36,.06,.28,0xc83a3a,2),[.08,.36,.02,-.1,1.42,-.25,K,0,0,-.35],[.08,.36,.02,.1,1.42,-.25,K,0,0,.35],F(-.2,1.36,.08,.04,W,1),...pack(T,[Bk(0,1.26,.42,.03,0xe8e8e8,9)])], + head:[[.7,.03,.66,0,.26,0,0x5a5a64],[.5,.2,.46,0,.37,0,0x5a5a64],[.52,.06,.48,0,.3,0,INK],[.12,.02,.4,0,.47,0,0x4a4a54]], + arms:[...arms2(i=>aBand(i,-.16,.04,W))]}, +{id:'boss',home:[0x5a3a8a,0x22143a],hat:1,base:{leg:T,boot:INK,sleeve:T,glove:INK}, + leg:s=>[], + torso:[[.82,.76,.5,0,1.2,0,T],[.82,.4,.06,0,.66,.24,T],[.38,.4,.06,-.21,.66,-.24,T],[.38,.4,.06,.21,.66,-.24,T],[.06,.4,.46,-.4,.66,0,T],[.06,.4,.46,.4,.66,0,T],[.9,.16,.58,0,1.56,0,CREAM],...[-.3,-.1,.1,.3].map(x=>[.12,.06,.04,x,1.5,-.29,0xe2dccf]), + [.84,.06,.52,0,.98,0,K],F(-.12,1.3,.04,.04,GOLD,4),F(-.12,1.15,.04,.04,GOLD,4),F(.12,1.3,.04,.04,GOLD,4),F(.12,1.15,.04,.04,GOLD,4),...pack(T,[Bk(0,1.4,.42,.05,CREAM,9)])], + head:[[.6,.34,.6,0,.38,0,CREAM],...[[-.2,-.31],[0,-.31],[.2,-.31]].map(([x,z])=>[.14,.1,.03,x,.48,z,0xe2dccf]),[.62,.06,.62,0,.22,0,0xe2dccf],[.42,.07,.05,0,.04,-.3,G(0x2a3a52)],[.08,.03,.05,-.12,.08,-.305,G(0x9fd6ff)]], + arms:[...arms2(i=>aBand(i,-.13,.08,CREAM,1)),onArm(0,0,.1,-.27,.03,.03,.03,GOLD),onArm(1,0,.1,-.27,.03,.03,.03,GOLD)]}, +{id:'tracksuit',home:[0x2a3a8a,0x10163a],hat:1,base:{leg:T,boot:W,sleeve:T,glove:L}, + leg:s=>[LS(s,-.42,.03,.84,W,0,-.035),LS(s,-.42,.03,.84,W,0,.035),[.31,.05,.38,0,-.835,-.03,T]], + torso:[F(0,1.22,.025,.72,SILVER),Sd(-1,1.22,.03,.7,W,0,-.035),Sd(-1,1.22,.03,.7,W,0,.035),Sd(1,1.22,.03,.7,W,0,-.035),Sd(1,1.22,.03,.7,W,0,.035),[.42,.12,.5,0,1.6,0,T], + ...[[-.18,1.5],[-.15,1.42],[-.1,1.35],[-.04,1.31],[.04,1.31],[.1,1.35],[.15,1.42],[.18,1.5]].map(([x,y])=>[.05,.05,.03,x,y,-.25,GOLD]),[.1,.1,.03,0,1.25,-.26,GOLD,0,0,0,'c'],[.07,.07,.02,0,1.25,-.27,0xfff0a8,0,0,0,'c'],Bk(0,1.45,.5,.08,W), + ...pack(T,[Bk(-.03,1.26,.03,.5,W,9),Bk(.03,1.26,.03,.5,W,9)])], + head:[[.58,.14,.58,0,.22,0,K],[.5,.04,.2,0,.17,-.36,K]], + arms:[...arms2(i=>aTop(i,0,.62,.025,W,0,-.03)),...arms2(i=>aTop(i,0,.62,.025,W,0,.03))]}, +{id:'bodyguard',home:[0x3a4a5a,0x141c24],hat:1,visor:false,base:{leg:T,boot:INK,sleeve:T,glove:CREAM}, + leg:s=>[], + torso:[F(0,1.4,.18,.36,W,1),F(0,1.34,.06,.32,INK,2),[.08,.4,.02,-.11,1.4,-.25,K,0,0,-.35],[.08,.4,.02,.11,1.4,-.25,K,0,0,.35],F(.2,1.4,.06,.03,0xe0e0e0,1),...pack(T,[Bk(0,1.4,.42,.03,K,9)])], + head:[[.44,.1,.05,0,.04,-.3,G(0x34465c)],[.12,.04,.06,-.12,.07,-.31,G(0xaad8ff)],[.6,.025,.6,0,.07,0,INK],[.03,.06,.03,.29,-.04,0,0xe8e8e8],[.02,.24,.02,.28,-.2,.06,0xe8e8e8,.3]], + arms:[...arms2(i=>aBand(i,-.15,.05,W))]}, +{id:'tuxedo',home:[0x2e3a6a,0x0e1430],hat:1,base:{leg:T,boot:INK,sleeve:T,glove:W}, + leg:s=>[LS(s,-.42,.03,.84,K,0)], + torso:[F(0,1.32,.22,.5,W,1),[.12,.44,.02,-.12,1.36,-.255,K,0,0,-.3],[.12,.44,.02,.12,1.36,-.255,K,0,0,.3],F(0,1.5,.14,.06,INK,2),F(0,1.5,.04,.05,INK,3),...[1.4,1.3,1.2].map(y=>F(0,y,.025,.025,INK,2)),band(1.0,.1,K,1),F(-.22,1.42,.08,.04,W,1),...pack(T,[Bk(0,1.26,.42,.03,K,9)])], + head:[[.62,.03,.62,0,.27,0,INK],[.42,.36,.42,0,.45,0,INK],[.44,.06,.44,0,.32,0,T],[.13,.13,.02,.11,.03,-.302,GOLD],[.09,.09,.03,.11,.03,-.302,G(0xdffaff)],[.015,.24,.015,.18,-.1,-.29,GOLD]], + arms:[...arms2(i=>aBand(i,-.16,.04,W))]}, +{id:'detective',home:[0x6a5a8a,0x2a2238],hat:1,base:{leg:T,boot:INK,sleeve:T,glove:CREAM}, + leg:s=>[], + torso:[[.8,.76,.5,0,1.2,0,T],[.8,.38,.06,0,.68,.25,T],[.37,.38,.06,-.215,.68,-.25,T],[.37,.38,.06,.215,.68,-.25,T],[.86,.08,.56,0,1.0,0,K],F(0,1.0,.08,.08,SILVER,3),[.2,.06,.54,-.3,1.57,0,K],[.2,.06,.54,.3,1.57,0,K],[.5,.14,.54,0,1.56,0,K], + ...[1.32,1.16].flatMap(y=>[F(-.14,y,.04,.04,INK,2),F(.14,y,.04,.04,INK,2)]),F(-.24,1.06,.1,.1,K,2),...pack(T,[Bk(0,1.3,.42,.05,K,9)])], + head:[[.7,.03,.66,0,.26,0,K],[.5,.2,.46,0,.37,0,K],[.52,.06,.48,0,.3,0,INK],[.1,.06,.02,.2,.31,-.25,0xe8453c]], + arms:[...arms2(i=>aBand(i,-.15,.08,K,1))]}, +// ---------------- variety ---------------- +{id:'astro',home:[0x3a7ae0,0x14305a],hat:1,visor:false,base:{leg:W,boot:0xb9c2cc,sleeve:W,glove:0xb9c2cc}, + leg:s=>[[.3,.6,.32,0,-.36,0,T],LB(-.42,.07,W,1),LB(-.2,.03,W,1),[.33,.18,.4,0,-.77,-.03,0xb9c2cc]], + torso:[[.78,.74,.48,0,1.22,0,T],F(0,1.3,.34,.2,W,1),F(-.1,1.3,.06,.06,G(0xff5c5c),2),F(0,1.3,.06,.06,G(0x7dff8a),2),F(.1,1.3,.06,.06,G(0x8ff6ff),2),F(.22,1.48,.14,.14,W,1,0),F(.22,1.48,.08,.08,T,2),band(.9,.1,0xb9c2cc), + [.54,.64,.28,0,1.24,.35,W],[.5,.04,.29,0,1.48,.35,T],[.06,.3,.06,-.3,1.3,.18,0xb9c2cc,0,0,0,'c'],[.06,.3,.06,.3,1.3,.18,0xb9c2cc,0,0,0,'c']], + head:[[.64,.62,.64,0,.02,0,W],[.48,.36,.04,0,.02,-.32,G(0x5fd6ff)],[.4,.1,.045,-.03,.12,-.322,G(0xc9f4ff)],[.66,.08,.66,0,-.27,0,0xb9c2cc],[.06,.06,.06,.32,.16,0,0xb9c2cc,0,0,Math.PI/2,'c']], + arms:[...arms2(i=>aBand(i,.0,.07,T,1)),...arms2(i=>aBand(i,-.16,.05,T,1))],packless:1}, +{id:'wizard',home:[0x5a3ad0,0x22145a],hat:1,base:{leg:T,boot:0x6a4a2c,sleeve:T,glove:CREAM}, + leg:s=>[], + torso:[[.8,.76,.5,0,1.2,0,T],[.82,.56,.54,0,.58,0,T],[.84,.04,.56,0,.32,0,GOLD],[.84,.06,.54,0,.98,0,GOLD],...[[-.2,1.3],[.18,1.1],[-.1,.66],[.24,.52],[.05,1.42]].flatMap(([x,y])=>[F(x,y,.05,.05,0xffe27a,2,.785),Bk(-x,y,.05,.05,0xffe27a,2,.785)]), + [.3,.34,.03,0,1.36,-.255,0xeeeeee],[.2,.12,.03,0,1.14,-.255,0xeeeeee],...pack(0x7a5a3a,[Bk(0,1.4,.42,.04,GOLD,9)])], + head:[[.74,.04,.74,0,.27,0,T],[.5,.2,.5,0,.38,0,T],[.38,.18,.38,.02,.56,.02,T],[.26,.14,.26,.04,.7,.05,T],[.14,.12,.14,.06,.82,.08,T],[.52,.05,.52,0,.31,0,GOLD],[.06,.06,.02,-.1,.4,-.26,0xffe27a,0,0,.785],[.05,.05,.02,.08,.6,-.18,0xffe27a,0,0,.785], + [.34,.26,.04,0,-.2,-.29,0xeeeeee],[.2,.1,.04,0,-.36,-.29,0xeeeeee]], + arms:[...arms2(i=>onArm(i,0,-.02,-.17,.25,.24,.12,T)),...arms2(i=>aBand(i,-.2,.04,GOLD,4))]}, +{id:'firefighter',home:[0xd83a1a,0x5a1408],hat:1,base:{leg:T,boot:INK,sleeve:T,glove:0x5a4a3a}, + leg:s=>[LB(-.5,.06,SILVER),LB(-.56,.025,0xffd23f,1),[.33,.3,.38,0,-.72,-.02,INK]], + torso:[[.8,.76,.5,0,1.2,0,T],[.82,.06,.52,0,1.0,0,SILVER],[.82,.025,.52,0,1.0,0,0xffd23f],[.82,.06,.52,0,1.3,0,SILVER],F(0,1.2,.03,.66,INK,2),...[1.42,1.2,1.0].map(y=>F(.06,y,.06,.03,SILVER,3)),Bk(0,1.48,.5,.12,SILVER,1), + ...pack(0xd8dde2,[Bk(0,1.26,.42,.06,T,9),[.08,.12,.08,0,1.56,.31,INK,0,0,0,'c']])], + head:[[.6,.18,.6,0,.2,0,T],[.64,.04,.76,0,.12,.05,T],[.14,.1,.6,0,.3,0,T],[.22,.2,.04,0,.2,-.33,0xf2f0ea],[.12,.08,.02,0,.2,-.355,0xffd23f],[.46,.06,.04,0,-.12,-.29,0xffd23f]], + arms:[...arms2(i=>aBand(i,-.05,.06,SILVER)),...arms2(i=>aBand(i,-.05,.025,0xffd23f,1))]}, +{id:'knight',home:[0x2a5ac8,0x10244f],hat:1,visor:false,base:{leg:SILVER,boot:STEEL,sleeve:SILVER,glove:STEEL}, + leg:s=>[[.3,.14,.32,0,-.42,0,STEEL],[.3,.36,.32,0,-.18,0,T],LS(s,-.18,.04,.34,W,1)], + torso:[[.78,.74,.48,0,1.2,0,T],[.6,.6,.02,0,1.18,-.255,W,0,0,0],[.44,.44,.02,0,1.18,-.27,T,0,0,.785],[.84,.06,.54,0,.98,0,0x6a4a2c],[.3,.16,.54,-.38,1.56,0,SILVER],[.3,.16,.54,.38,1.56,0,SILVER],F(0,.98,.08,.08,GOLD,3), + ...pack(T,[Bk(0,1.26,.3,.36,W,9),Bk(0,1.26,.2,.2,T,10,.785)])], + head:[[.58,.58,.58,0,0,0,SILVER],[.46,.04,.04,0,.05,-.3,G(0x9fd6ff)],[.04,.2,.04,0,-.08,-.3,STEEL],...[-.16,-.08,0,.08,.16].map(x=>[.02,.02,.04,x,-.15,-.3,INK]),[.06,.2,.24,0,.38,.05,T],[.06,.1,.12,0,.5,.12,T],[.6,.04,.6,0,.16,0,STEEL]], + arms:[...arms2(i=>onArm(i,0,.02,.2,.24,.16,.22,SILVER)),...arms2(i=>aBand(i,-.05,.05,STEEL))]} +]; +// ---------------- building an outfit ---------------- +const PRIM={box:new THREE.BoxGeometry(1,1,1).toNonIndexed(),c:new THREE.CylinderGeometry(.5,.5,1,10).toNonIndexed(),o:new THREE.IcosahedronGeometry(.5,1).toNonIndexed()}; +const _m=new THREE.Matrix4(),_q=new THREE.Quaternion(),_e=new THREE.Euler(),_p=new V3(),_s=new V3(),_v=new V3(),_n=new V3(),_nm=new THREE.Matrix3(),_c=new THREE.Color(),_c2=new THREE.Color(); +const mix=(a,b,t)=>_c.setHex(a).lerp(_c2.setHex(b),t).getHex(); +// the colours for a suit key (r, b, me...) and an outfit: [main, dark shade, light shade, trim, visor] +function palette(o,key){const S=X.SUITS[key]||X.SUITS.me;const m=key==='r'||key==='b'?S[0]:o.home[0],t=key==='r'||key==='b'?S[1]:o.home[1],v=key==='r'||key==='b'?S[2]:0x7fd3ff; + return {T:m,K:mix(m,0x000000,.28),L:mix(m,0xffffff,.45),D:t,V:v,W:0xf2f0ea}} +function resolve(c,P){if(typeof c==='string')return c==='V'?{glow:P.V}:{lit:P[c]};if(c>0xffffff)return {glow:c-0x1000000};return {lit:c}} +function bakeParts(list,P){const lit={p:[],n:[],c:[]},glow={p:[],n:[],c:[]}; + for(const q of list){if(!q)continue;const [w,h,d,x,y,z,col,rx,ry,rz,shape]=q;const r=resolve(col,P),B=r.glow!=null?glow:lit,hex=r.glow!=null?r.glow:r.lit; + const geo=PRIM[shape||'box'];_e.set(rx||0,ry||0,rz||0);_q.setFromEuler(_e);_m.compose(_p.set(x,y,z),_q,_s.set(w,h,d));_nm.getNormalMatrix(_m);_c.setHex(hex); + const pos=geo.attributes.position,nor=geo.attributes.normal; + for(let i=0;i{if(!B.p.length)return null;const g=new THREE.BufferGeometry();g.setAttribute('position',new THREE.Float32BufferAttribute(B.p,3));g.setAttribute('normal',new THREE.Float32BufferAttribute(B.n,3));g.setAttribute('color',new THREE.Float32BufferAttribute(B.c,3));g.computeBoundingSphere();SHARED.add(g);return g}; + return {lit:geo(lit),glow:geo(glow)}} +const SHARED=new Set(); +const bodyMat=new THREE.MeshLambertMaterial({vertexColors:true}),glowMat=new THREE.MeshBasicMaterial({vertexColors:true});SHARED.add(bodyMat);SHARED.add(glowMat); +// the plain boxes every outfit is built on (the plain suit's own sizes and places) +function baseParts(o){const b=o.base||{},bc=k=>b[k]!=null?b[k]:{leg:D,boot:SHOE,torso:T,hood:T,sleeve:T,glove:D}[k]; + const leg=[[.28,.86,.3,0,-.43,0,bc('leg')],b.boot===null?null:[.31,.16,.38,0,-.78,-.03,bc('boot')]]; + const torso=[[.74,.72,.44,0,1.22,0,bc('torso')]];if(!o.packless&&!(o.torso||[]).some(p=>p&&p[3]===PACK[3]&&p[4]===PACK[4]&&p[5]===PACK[5]&&p[0]===PACK[0]))torso.push([...PACK,bc('torso')]); + const head=[[.54,.54,.54,0,0,0,bc('hood')]];if(o.visor!==false)head.push([.42,.22,.04,0,.03,-.275,V]); + const ng=o.noGlove||[0,0];const arms=[0,1].flatMap(i=>[onArm(i,0,0,0,.17,.17,.62,bc('sleeve')),ng[i]?null:onArm(i,0,0,-.245,.18,.18,.14,bc('glove'))]); + return {leg,torso,head,arms}} +const bakeCache=new Map(); +function bake(no,key){const id=no+':'+key;if(bakeCache.has(id))return bakeCache.get(id); + const o=OUTFITS[no],P=palette(o,key),B=baseParts(o),out={}; + for(const s of [-1,1])out[s<0?'legL':'legR']=bakeParts(B.leg.concat(o.leg?o.leg(s):[]),P); + out.torso=bakeParts(B.torso.concat(o.torso||[]),P);out.head=bakeParts(B.head.concat(o.head||[]),P);out.arms=bakeParts(B.arms.concat(o.arms||[]),P); + bakeCache.set(id,out);return out} + +// ---------------- putting an outfit on a model (index.html's makeSuit) ---------------- +// u.lk is what the model wears ({o,g,b,e,c}); u.key its suit (r, b, me, entity). The plain suit's meshes (u.base) are +// hidden, not removed, so taking an outfit off is just showing them again. +function dress(m){ + const u=m.userData,o=u.lk&&u.lk.o|0,key=u.key||'me',want=o&&key!=='entity'?o+':'+key:''; + if(u._lkO===want)return;u._lkO=want; + if(u._lkM){for(const x of u._lkM)if(x.parent)x.parent.remove(x);u._lkM=null} + if(!want){for(const b of u.base)b.visible=true;if(u.tk)u.tk.visible=true;return} + const B=bake(o,key),M=[]; + const put=(parent,g)=>{if(g.lit){const x=new THREE.Mesh(g.lit,bodyMat);parent.add(x);M.push(x)}if(g.glow){const x=new THREE.Mesh(g.glow,glowMat);parent.add(x);M.push(x)}}; + put(u.legs[0],B.legL);put(u.legs[1],B.legR);put(m,B.torso);put(u.head,B.head);put(u.arms,B.arms); + for(const b of u.base)b.visible=false;if(u.tk)u.tk.visible=!OUTFITS[o].hat; + u._lkM=M; +} +// a gun's skin changed: setGun picks the new geometry (index.html's setGun skips a gun that is already set, so forget it) +function regun(m){const u=m.userData;if(u._lkG===(u.lk&&u.lk.g|0))return;u._lkG=u.lk&&u.lk.g|0;const wi=u.gunId;u.gunId=-1;X.setGun(m,wi<0?0:wi)} +function wearOn(m,k){const u=m.userData;u.lk=worn(k)?Object.assign({},k):null;u.lkw=wireOf(k);dress(m);regun(m)} + +// ---------------- what this player wears ---------------- +const cat=()=>{const C=window.BackRoomCosmetics;return C&&C.gameItems?C:null}; +const FREE=()=>{const C=cat();return !(C&&C.on&&C.on())}; +function mine(){ + if(!X.on)return parse(''); + if(FREE())return parse(String(X.store.get('kit',''))); + const e=cat().gameEquipped(GAME)||{},k=parse(''); + for(const s of SLOTS){const it=e[CAT_SLOT[s]];if(it&&it.no>=1&&it.no<=N[s])k[s]=it.no} + return k; +} +let myKit=parse(''),myWire=''; +function refreshMine(){myKit=mine();myWire=wireOf(myKit);wearOn(X.player.model,myKit);X.publish()} +function wear(slot,no){ + if(!X.on||!N[slot])return false;no=no|0;if(no<0||no>N[slot])return false; + if(FREE()){const k=parse(String(X.store.get('kit','')));k[slot]=no;X.store.set('kit',wireOf(k))} + else{const C=cat(),it=no?C.gameItems(GAME,CAT_SLOT[slot]).find(i=>i.no===no):null; + if(it){if(C.owned().items.indexOf(it.id)<0)return false;C.equip(it.id)}else C.unequip(GAME+':'+CAT_SLOT[slot])} + refreshMine();return true; +} +// another player's lk (from their node) +function heard(e,w){const u=e.model.userData;w=typeof w==='string'?w:'';if(u.lkw===w&&(u.lk||!w))return;wearOn(e.model,parse(w));u.lkw=w} +// setSuit changed a model's colours: an outfit is rebuilt in the new ones +function suit(m){if(m.userData.lk)dress(m)} + +// ===================================================================== +// Gun skins: each box of the gun recoloured, long ones cut into stripes or patches. The parts come from index.html's +// GUN_SRC and go through the same gunFit, so every skinned gun is exactly as long, and shaped, as the plain one. +// ===================================================================== +const hash=(a,b,c)=>{let h=Math.imul((a*73856093)^(b*19349663)^(c*83492791),0x9E3779B1);h^=h>>>15;return (h>>>0)/4294967296}; +// pal: a colour per part role (steel body, dark barrel and grip, grey parts, wood, tan, amber marker, red shells; the +// sniper's lens is never changed). seg: cut long parts into pieces this long; col(role,x,y,z,i,j): a piece's own colour. +const WRAPS=[null, + {pal:{steel:0xd9a520,grey:0xf2cc58,dark:0x9a6c14,wood:0x4a2c16,tan:0x4a2c16,amber:0xfff2b0,red:0xd9a520}}, + {pal:{steel:0xc4ccd4,grey:0xeef2f6,dark:0x6c747e,wood:0x2c2c32,tan:0x2c2c32,amber:0xffffff,red:0xc4ccd4}}, + {pal:{steel:0x8a5428,grey:0xa86a36,dark:0x5a3418,wood:0x8a5428,tan:0x8a5428,amber:0xd9a520,red:0x6a3c1c},seg:.05,col:(r,x,y,z,i)=>r==='dark'?null:(i%3===1?0x74441e:null)}, + {pal:{steel:0x4f6b3a,grey:0x6b8a4a,dark:0x2e3a24,wood:0x5a4a2e,tan:0x5a4a2e,amber:0x8aa060,red:0x4f6b3a},seg:.06,rows:1,col:(r,x,y,z,i,j,pi)=>{const h=hash(pi,i,j);return h<.3?0x2e3a24:h<.55?0x6b5a3a:h<.75?0x8aa060:null}}, + {pal:{steel:0xc8ad7a,grey:0xd8c294,dark:0x7a6440,wood:0xa88a5a,tan:0xa88a5a,amber:0xe8d6aa,red:0xc8ad7a},seg:.06,rows:1,col:(r,x,y,z,i,j,pi)=>{const h=hash(pi,i,j+7);return h<.3?0x8a6e48:h<.55?0xe0cfa4:null}}, + {pal:{steel:0xe8eef2,grey:0xffffff,dark:0x8a949c,wood:0xc8d2d8,tan:0xc8d2d8,amber:0xffffff,red:0xe8eef2},seg:.06,rows:1,col:(r,x,y,z,i,j,pi)=>{const h=hash(pi,i,j+3);return h<.25?0x9aa6ae:h<.45?0xc4ced6:null}}, + {pal:{steel:0x5a6a7a,grey:0x7a8a9a,dark:0x2e3640,wood:0x4a5a6a,tan:0x4a5a6a,amber:0x9fb0c0,red:0x5a6a7a},seg:.035,rows:1,col:(r,x,y,z,i,j,pi)=>{const h=hash(pi,i,j+11);return h<.25?0x2e3640:h<.5?0x8ea0b0:h<.62?0x3e6a8a:null}}, + {pal:{steel:0xf4f0ea,grey:0xf4f0ea,dark:0xd8282e,wood:0xf4f0ea,tan:0xf4f0ea,amber:0x3aa860,red:0xd8282e},seg:.04,col:(r,x,y,z,i)=>i%2?0xd8282e:null}, + {pal:{steel:0xf2c41a,grey:0xf2c41a,dark:0x24242a,wood:0x24242a,tan:0x24242a,amber:0xf2c41a,red:0xf2c41a},seg:.05,col:(r,x,y,z,i)=>r==='dark'?null:(i%2?0x24242a:null)}, + {pal:{steel:0x2e2624,grey:0x3e3430,dark:0x1e1a18,wood:0x2e2624,tan:0x2e2624,amber:0xff8a1a,red:0xff6a1a},seg:.05,rows:1,col:(r,x,y,z,i,j,pi)=>{const h=hash(pi,i,j+5);return h<.18?0xff7a1a:h<.28?0xffc23a:null}}, + {pal:{steel:0x2f7fe8,grey:0xffd23f,dark:0xff5a2a,wood:0x3fbf5f,tan:0x3fbf5f,amber:0xffffff,red:0xffd23f}}, + {pal:{steel:0x3a2a7a,grey:0x5a3aa8,dark:0x1e1840,wood:0x2a1e5a,tan:0x2a1e5a,amber:0xff7ae0,red:0x5a3aa8},seg:.03,rows:1,col:(r,x,y,z,i,j,pi)=>{const h=hash(pi,i,j+13);return h<.08?0xffffff:h<.2?0x8a5ad8:h<.3?0xd85ab8:null}}, + {pal:{steel:0xf2f2f2,grey:0xf2f2f2,dark:0x24242a,wood:0xf2f2f2,tan:0xf2f2f2,amber:0xe8453c,red:0xf2f2f2},seg:.04,rows:1,col:(r,x,y,z,i,j)=>(i+j)%2?0x24242a:0xf2f2f2}, + {pal:{steel:0xb88a3a,grey:0xd6aa52,dark:0x6a4a24,wood:0x5a3418,tan:0x5a3418,amber:0xffe27a,red:0xb88a3a},seg:.07,col:(r,x,y,z,i)=>(r==='wood'||r==='tan')&&i%2?0x6e4220:null}, + {pal:{steel:0x8a4a22,grey:0xa65a2a,dark:0x5a2e14,wood:0x8a4a22,tan:0x8a4a22,amber:0xf4f0ea,red:0x8a4a22},seg:.04,col:(r,x,y,z,i)=>r==='steel'&&i%2&&y>=0?0xf4f0ea:null} +]; +const rgb=h=>[((h>>16)&255)/255,((h>>8)&255)/255,(h&255)/255]; +const roleOf=c=>{for(const k in X.GC)if(X.GC[k]===c)return k;return null}; +const gunCache=new Map(); +function gunGeo(wi,n){ + n=n|0;if(!(n>=1&&n<=N.g)||!X.GUN_SRC[wi])return null;const id=wi+':'+n;if(gunCache.has(id))return gunCache.get(id); + const S=WRAPS[n],[list,z0,z1]=X.GUN_SRC[wi],out=[]; + list.forEach((p,pi)=>{const [w,h,d,x,y,z,ry,c]=p,role=roleOf(c); + if(role==='lens'||!role){out.push(p);return} + const base=S.pal[role]!=null?S.pal[role]:null,nz=S.seg&&d>S.seg*1.5?Math.round(d/S.seg):1,ny=S.rows&&h>.09?2:1; + for(let i=0;i{g.fillStyle='#c9c7c0';g.fillRect(0,0,w,h);X.noise(g,w,h,22);g.fillStyle='rgba(120,118,112,.5)';for(let i=0;i<14;i++){g.beginPath();g.arc(Math.random()*w,Math.random()*h,1+Math.random()*2,0,7);g.fill()} + g.strokeStyle='rgba(140,138,130,.6)';g.lineWidth=1.5;g.beginPath();g.moveTo(0,64);g.lineTo(w,64);g.moveTo(64,0);g.lineTo(64,h);g.stroke();return ['#6e6c66','rgba(110,108,102,.7)']}, + (g,w,h)=>{const gr=g.createLinearGradient(0,0,w,h);gr.addColorStop(0,'#e4f4fb');gr.addColorStop(1,'#b8dcec');g.fillStyle=gr;g.fillRect(0,0,w,h);X.noise(g,w,h,8); + g.strokeStyle='rgba(255,255,255,.85)';g.lineWidth=1.5;for(let k=0;k<5;k++){let x=Math.random()*w,y=Math.random()*h;g.beginPath();g.moveTo(x,y);for(let i=0;i<4;i++){x+=(Math.random()-.5)*40;y+=(Math.random()-.5)*40;g.lineTo(x,y)}g.stroke()} + g.fillStyle='rgba(255,255,255,.6)';for(let i=0;i<10;i++){g.beginPath();g.arc(Math.random()*w,Math.random()*h,1.5+Math.random()*2,0,7);g.fill()}return ['#6e9cb4','rgba(120,170,196,.75)']}, + (g,w,h)=>{g.fillStyle='#fbe8ef';g.fillRect(0,0,w,h);g.fillStyle='#f27aa8';for(let k=-h;k{g.fillStyle='#a4abb2';g.fillRect(0,0,w,h);const pl=[[6,6,70,56,'#b4bbc2'],[70,10,52,60,'#98a0a8'],[10,62,56,58,'#9ea6ae'],[60,66,62,54,'#b0b7be']]; + for(const [x,y,ww,hh,c] of pl){g.fillStyle=c;g.fillRect(x,y,ww,hh);g.strokeStyle='rgba(60,64,70,.5)';g.lineWidth=2;g.strokeRect(x,y,ww,hh);g.fillStyle='#6a7078';for(const [a,b] of [[x+5,y+5],[x+ww-5,y+5],[x+5,y+hh-5],[x+ww-5,y+hh-5]]){g.beginPath();g.arc(a,b,2.2,0,7);g.fill()}} + g.fillStyle='rgba(176,96,52,.45)';for(let i=0;i<5;i++){g.beginPath();g.arc(Math.random()*w,Math.random()*h,4+Math.random()*7,0,7);g.fill()}X.noise(g,w,h,12);return ['#5a6068','rgba(90,96,104,.7)']}, + (g,w,h)=>{g.fillStyle='#d6b98a';g.fillRect(0,0,w,h);g.strokeStyle='rgba(150,118,72,.35)';g.lineWidth=1;for(let x=2;x{g.fillStyle='#eeece8';g.fillRect(0,0,w,h);g.strokeStyle='rgba(150,150,160,.55)';g.lineWidth=1.4;for(let k=0;k<6;k++){let x=Math.random()*w,y=0;g.beginPath();g.moveTo(x,y);while(y{const [frame,brace]=BUILD_DRAW[n](g,w,h);g.strokeStyle=frame;g.lineWidth=8;g.strokeRect(4,4,120,120);g.strokeStyle=brace;g.lineWidth=5;g.beginPath();g.moveTo(8,120);g.lineTo(120,8);g.stroke()},1,1); + return buildTex[n]=t} +// a new piece takes its builder's build skin (by: the entity that built it, if known) +function piece(pc,by){const k=by&&by.model&&by.model.userData.lk,n=k&&k.b|0;if(!(n>=1&&n<=N.b))return;pc.mat.map=bTex(n);pc.mat.needsUpdate=true;pc.lkb=n} + +// ===================================================================== +// Elimination effects: they play where the eliminated player falls, for everyone who sees it, when the player who got +// them wears one. Every one is over in 1.5 s (the falling body itself takes 2.2 s), keeps within about a metre of the +// body and does not light up the room. Two instanced meshes (lit bits and glowing bits) and a few small pooled meshes, +// drawn only while something is playing. +// ===================================================================== +const FX_MAX=1.5; +function mergeColoured(list){return bakeParts(list,{T:0,K:0,L:0,D:0,V:0,W:0xf2f0ea}).lit} +let ghostGeo=null,cardGeo=null,balloonGeo=null,duckGeo=null,trophyGeo=null; +const GEOS={ + ghost:()=>ghostGeo||(ghostGeo=mergeColoured([[.42,.46,.36,0,.25,0,0xf4f6ff],[.46,.12,.4,0,.04,0,0xf4f6ff],...[-.15,0,.15].map(x=>[.1,.1,.36,x,-.05,0,0xf4f6ff]),[.08,.1,.02,-.09,.32,-.185,0x2a2a38],[.08,.1,.02,.09,.32,-.185,0x2a2a38],[.08,.06,.02,0,.18,-.185,0x6a6a80]])), + card:()=>cardGeo||(cardGeo=mergeColoured([[.3,.42,.02,0,0,0,0xe8262e],[.26,.38,.022,0,0,0,0xf0383e]])), + balloon:()=>balloonGeo||(balloonGeo=mergeColoured([[.26,.32,.26,0,0,0,0xffffff,0,0,0,'o'],[.05,.05,.05,0,-.17,0,0xffffff],[.008,.3,.008,0,-.34,0,0xeeeeee]])), + duck:()=>duckGeo||(duckGeo=mergeColoured([[.2,.14,.26,0,.07,0,0xffd23f],[.13,.13,.13,0,.18,-.08,0xffd23f],[.06,.03,.08,0,.17,-.17,0xff8a1a],[.025,.03,.02,-.05,.21,-.14,0x24242a],[.025,.03,.02,.05,.21,-.14,0x24242a],[.08,.06,.06,0,.12,.14,0xffd23f,.4]])), + trophy:()=>trophyGeo||(trophyGeo=mergeColoured([[.22,.05,.16,0,0,0,0x6a4a2c],[.16,.06,.12,0,.05,0,0xd9a520],[.05,.12,.05,0,.14,0,0xe8b22e,0,0,0,'c'],[.22,.2,.22,0,.3,0,0xf2c41a,0,0,0,'c'],[.18,.03,.18,0,.41,0,0xffe27a,0,0,0,'c'],[.04,.12,.04,-.14,.31,0,0xe8b22e],[.04,.12,.04,.14,.31,0,0xe8b22e]])) +}; +const ZM=new THREE.Matrix4().makeScale(0,0,0),_o=new THREE.Object3D(),_col=new THREE.Color(); +function makeFx(Wd){ + function pool(n,mat){const m=new THREE.InstancedMesh(new THREE.BoxGeometry(1,1,1),mat,n);m.frustumCulled=false;m.instanceMatrix.setUsage(THREE.DynamicDrawUsage); + for(let i=0;inew V3(p.x+dx,p.y+dy,p.z+dz); + // p: where the body stands (its feet); tc: the eliminated player's team colour + function play(n,p,tc){ + if(n===1){const cols=[0xff5c8a,0x58b4ff,0xffd23f,0x36b37e,0xb46cff,0xff8a3d,0xffffff]; + for(let i=0;i<46;i++){const a=Math.random()*TAU,sp=rnd(.6,1.8);add(lit,cols[i%7],at(p,rnd(-.2,.2),1.2+Math.random()*.5,rnd(-.2,.2)),{v:new V3(Math.cos(a)*sp,rnd(1.5,3.2),Math.sin(a)*sp),life:rnd(1.1,1.45),sc:new V3(.08,.08,.008),g:5,drag:2.4,k:1})}} + else if(n===2){for(let i=0;i<40;i++){const c=[tc,0x6ff4ff,0xff4fd8,0xffffff][i%4];add(glo,c,at(p,rnd(-.35,.35),rnd(.1,1.9),rnd(-.3,.3)),{v:new V3(rnd(-.3,.3),rnd(-.2,.6),rnd(-.3,.3)),life:rnd(.5,1.1),s:rnd(.05,.12),k:2,spin:0})}} + else if(n===3){const o=obj('ghost');o.position.copy(at(p,0,.9,0));objs.push({o,kind:'ghost',t:0,life:1.5,y:p.y+.9,x:p.x,z:p.z})} + else if(n===4){const o=obj('card');o.position.copy(at(p,0,1.6,0));o.scale.setScalar(.2);objs.push({o,kind:'card',t:0,life:1.3,y:p.y+1.6})} + else if(n===5){for(let i=0;i<16;i++){const a=Math.random()*TAU,sp=rnd(.6,1.6);add(lit,i%3?0xf2c41a:0xffe27a,at(p,0,1.1,0),{v:new V3(Math.cos(a)*sp,rnd(2.4,3.6),Math.sin(a)*sp),life:rnd(1.2,1.45),sc:new V3(.1,.02,.1),g:11,bounce:.45,spin:.8})}} + else if(n===6){for(let i=0;i<18;i++){const a=Math.random()*TAU,sp=rnd(.7,1.8),hx=i%3===0;add(lit,hx?0x9aa3ab:i%3===1?0xc9d0d6:0x6a7078,at(p,0,1.1,0),{v:new V3(Math.cos(a)*sp,rnd(2,3.4),Math.sin(a)*sp),life:rnd(1.1,1.45),sc:hx?new V3(.09,.04,.09):new V3(.03,.11,.03),g:11,bounce:.35})}} + else if(n===7){const cols=[0xff5c5c,0xffd23f,0x58b4ff];for(let i=0;i<3;i++){const o=obj('balloon');o.material=bodyMat;const a=i/3*TAU;o.position.copy(at(p,Math.cos(a)*.3,1.3,Math.sin(a)*.3)); + objs.push({o,kind:'balloon',t:0,life:1.4,y:p.y+1.3,col:cols[i],vy:rnd(1,1.25),ph:a})}} + else if(n===8){for(let i=0;i<5;i++){const o=obj('duck');const a=i/5*TAU+Math.random();o.position.copy(at(p,0,.8,0));o.rotation.y=a; + objs.push({o,kind:'duck',t:0,life:1.45,x:p.x,y:p.y+.8,z:p.z,vx:Math.sin(a)*rnd(.8,1.3),vz:Math.cos(a)*rnd(.8,1.3),vy:rnd(2,3),fl:Wd.floor(p.x,p.z,p.y+.5)})}} + } + function stepPool(Pl,dt){if(!Pl.m.visible)return;let any=false; + for(let i=0;i=q.life){q.on=false;Pl.m.setMatrixAt(i,ZM);continue}any=true; + q.v.y-=q.g*dt;if(q.drag){const k=Math.max(0,1-q.drag*dt);q.v.x*=k;q.v.z*=k;if(q.k===1&&q.v.y<-1.1)q.v.y=-1.1} + q.P.addScaledVector(q.v,dt);if(q.P.y.7?(1-u)/.3:1;if(q.k===2)s=(u<.15?u/.15:1)*(1-u)*(Math.random()<.15?0:1); + _o.position.copy(q.P);_o.rotation.set(q.r.x,q.r.y,q.r.z);_o.scale.copy(q.sc).multiplyScalar(Math.max(.001,s));_o.updateMatrix();Pl.m.setMatrixAt(i,_o.matrix)} + Pl.m.instanceMatrix.needsUpdate=true;if(!any)Pl.m.visible=false} + function step(dt){ + stepPool(lit,dt);stepPool(glo,dt); + for(let i=objs.length-1;i>=0;i--){const q=objs[i],o=q.o;q.t+=dt;const u=q.t/q.life; + if(q.kind==='ghost'){o.position.set(q.x+Math.sin(q.t*5)*.12,q.y+q.t*.9,q.z);o.rotation.y=Math.sin(q.t*3)*.4;o.scale.setScalar(u<.15?u/.15:u>.7?(1-u)/.3:1)} + else if(q.kind==='card'){o.position.y=q.y+Math.min(.6,q.t*2.5);o.rotation.y=q.t*7;o.scale.setScalar(u<.15?.2+u/.15*.8:u>.75?(1-u)/.25:1)} + else if(q.kind==='balloon'){if(!q.done){q.done=1;o.geometry=balloonFor(q.col)}o.position.y=q.y+q.t*q.vy;o.position.x+=Math.sin(q.t*4+q.ph)*.004;if(q.t>q.life-.12){o.scale.setScalar(1.25);} + if(q.t>=q.life-.05&&!q.popped){q.popped=1;for(let k=0;k<8;k++)add(glo,q.col,o.position.clone(),{v:new V3(rnd(-1.5,1.5),rnd(-1,1.5),rnd(-1.5,1.5)),life:.25,s:.05,k:0})}} + else if(q.kind==='duck'){q.vy-=10*dt;q.x+=q.vx*dt;q.z+=q.vz*dt;q.y+=q.vy*dt;if(q.y.8?(1-u)/.2:1)} + if(q.t>=q.life){o.visible=false;(spare[q.kind]||(spare[q.kind]=[])).push(o);objs.splice(i,1)}} + } + function clear(){for(const q of objs){q.o.visible=false;spare[q.kind].push(q.o)}objs.length=0;for(const Pl of [lit,glo]){for(let i=0;iobjs.length>0||lit.m.visible||glo.m.visible,add,lit,glo,objs,obj}; +} +// balloons come in three colours: one geometry each (the string stays white) +const balloonGeos={}; +function balloonFor(col){if(balloonGeos[col])return balloonGeos[col];return balloonGeos[col]=mergeColoured([[.26,.32,.26,0,0,0,col,0,0,0,'o'],[.05,.05,.05,0,-.17,0,col],[.008,.3,.008,0,-.34,0,0xeeeeee]])} +let mainFx=null; +const fxMain=()=>mainFx||(mainFx=makeFx({scene:X.scene,floor:(x,z,y)=>X.floorAt(x,z,y)})); +const teamHex=e=>{const k=e.model&&e.model.userData.key;const S=X.SUITS[k]||X.SUITS.me;return S[0]}; +// victim was eliminated by killer: the killer's effect plays once where the victim fell +function elim(victim,killer){ + if(!victim||!killer||killer===victim)return;const k=killer.model&&killer.model.userData.lk,n=k&&k.e|0;if(!(n>=1&&n<=N.e))return; + const T=now();if(victim._lkFx&&T-victim._lkFx<2)return;victim._lkFx=T; + fxMain().play(n,victim.pos.clone(),teamHex(victim)); +} + +// ===================================================================== +// Round-win celebrations: while the round is over and this player's team won it (every enemy is out), a player who +// wears one plays it, from where they stand (it only moves the picture: the body's position is never changed), and +// stops as soon as they move or shoot. +// ===================================================================== +function winning(e){ + if(!e.alive||!e.present)return false; + if(X.online){const R=X.RD;return !!R&&R.ph==='over'&&!!R.rw&&X.teamOf(e)===R.rw} + return X.state==='playing'&&X.phase==='over'&&e===X.player; +} +const ease=t=>t<0?0:t>1?1:t*t*(3-2*t); +// pose(u,t,m,w): u the model's parts, t seconds into it, m the model, w how far in (0..1, it eases in and out) +const POSES=[null, + (u,t,m,w)=>{const a=Math.abs(Math.sin(t*6));u.arms.rotation.x+=w*(1.2+.5*a-u.arms.rotation.x);u.arms.position.y+=w*(.12*a);m.position.y+=w*.04*a}, + (u,t,m,w)=>{const h=Math.abs(Math.sin(t*5.5));m.position.y+=w*h*.3;u.legs[0].rotation.x=u.legs[0].rotation.x*(1-w)+w*-.4*h;u.legs[1].rotation.x=u.legs[1].rotation.x*(1-w)+w*-.4*h;u.arms.rotation.x+=w*(1.1-u.arms.rotation.x)}, + (u,t,m,w)=>{m.rotation.y+=w*ease(t/1.1)*TAU+(t>1.1?w*(t-1.1)*0:0);u.arms.rotation.x+=w*(.6-u.arms.rotation.x);u.legs[0].rotation.x*=1-w;u.legs[1].rotation.x*=1-w}, + (u,t,m,w)=>{const b=Math.floor(t*4)%4;u.head.rotation.y=w*[.5,0,-.5,0][b];u.arms.rotation.x+=w*([.8,.2,.8,-.2][b]-u.arms.rotation.x);m.rotation.y+=w*[.25,0,-.25,0][b];u.legs[0].rotation.x=w*(b===1?-.3:0);u.legs[1].rotation.x=w*(b===3?-.3:0)}, + (u,t,m,w)=>{const s=Math.sin(t*9);m.position.y+=w*Math.abs(s)*.14;m.rotation.z=w*s*.12;u.legs[0].rotation.x=w*(s>0?-.7*s:0);u.legs[1].rotation.x=w*(s<0?.7*s:0);u.arms.rotation.x+=w*(.9+.3*s-u.arms.rotation.x)}, + (u,t,m,w)=>{const b=ease(t/.6)*(t<2?1:ease((2.6-t)/.6));m.rotation.x=w*b*.65;u.head.rotation.x+=w*b*.3;u.arms.rotation.x+=w*(-.5*b-u.arms.rotation.x*b)}, + (u,t,m,w)=>{u.arms.rotation.x+=w*(1.35-u.arms.rotation.x);u.arms.position.y+=w*.1;m.position.y+=w*Math.abs(Math.sin(t*4))*.05}, + (u,t,m,w)=>{u.arms.rotation.x+=w*(1.25-u.arms.rotation.x);u.head.rotation.x+=w*.4} +]; +const CEL_FIRE=8,CEL_TROPHY=7; +function anim(e,dt){ + const m=e.model,u=m.userData,n=u.lk&&u.lk.c|0; + if(!(n>=1&&n<=N.c)){if(u._celP)u._celP.visible=false;return} + const on=winning(e)&&!(Math.hypot(e.vel.x,e.vel.z)>.8)&&!(e.cd>0&&e.cd<.05); + if(on){u._celT=(u._celT||0)+dt;u._celW=Math.min(1,(u._celW||0)+dt*5)} + else{u._celW=Math.max(0,(u._celW||0)-dt*6);if(!u._celW)u._celT=0} + const w=ease(u._celW||0); + if(n===CEL_TROPHY){if(!u._celP&&w>0){u._celP=new THREE.Mesh(GEOS.trophy(),bodyMat);u._celP.position.set(.05,2.18,-.25);m.add(u._celP)}if(u._celP){u._celP.visible=w>.05;u._celP.scale.setScalar(Math.max(.001,w))}} + if(!w){if(u._celH){u.head.rotation.y=0;u._celH=0}return} + u._celH=1; + POSES[n](u,u._celT,m,w); + if(n===CEL_FIRE&&on&&!X.RM){u._celF=(u._celF||0)-dt;if(u._celF<=0){u._celF=.7;const p=e.pos.clone().add(new V3(rnd(-.6,.6),3.2+Math.random()*.6,rnd(-.6,.6)));const cols=[0xff5c8a,0x58b4ff,0xffd23f,0x7dff8a,0xffffff],c=cols[Math.floor(Math.random()*5)]; + const F=fxMain();for(let i=0;i<22;i++){const a=Math.random()*TAU,b=Math.acos(rnd(-1,1)),sp=rnd(1.4,2.2);F.add(F.glo,c,p,{v:new V3(Math.sin(b)*Math.cos(a)*sp,Math.cos(b)*sp,Math.sin(b)*Math.sin(a)*sp),life:rnd(.6,.9),s:.06,g:2,drag:1.5,k:0})}}} +} + +// ===================================================================== +// The Locker's pictures: a small scene of its own, drawn by the game's renderer into an off-screen target and copied +// into a canvas (only while the Locker is open, and only for a player who may see it) +// ===================================================================== +let pv=null; +function pvInit(){ + if(pv)return pv;const scene=new THREE.Scene(); + scene.add(new THREE.AmbientLight(0xfff0c4,.42));const sun=new THREE.DirectionalLight(0xfff0c8,.42);sun.position.set(-.7,.6,-.35);scene.add(sun); + const fill=new THREE.DirectionalLight(0xc4d2c4,.18);fill.position.set(.3,.25,.9);scene.add(fill); + const cam=new THREE.PerspectiveCamera(30,1,.05,60); + const model=X.makeSuit(...X.SUITS.me);scene.add(model);model.userData.key='me'; + const floor=new THREE.Mesh(new THREE.CircleGeometry(1.1,40),new THREE.MeshLambertMaterial({color:0x8a7a4c}));floor.rotation.x=-Math.PI/2;floor.position.y=-.005;scene.add(floor); + const wallMat=X.plyTex?new THREE.MeshLambertMaterial({map:X.plyTex}):new THREE.MeshLambertMaterial({color:0xcaa979}); + const wall=new THREE.Mesh(new THREE.BoxGeometry(4,4,.25),wallMat);wall.visible=false;scene.add(wall); + const fx=makeFx({scene,floor:()=>0}); + const gun=new THREE.Mesh(new THREE.BufferGeometry(),X.gunVMat);gun.visible=false;scene.add(gun); + return pv={scene,cam,model,floor,wall,wallMat,fx,gun,rt:null,buf:null}; +} +// dress the preview figure in kit k with suit colours key +function pvDress(k,key){const p=pvInit(),m=p.model,u=m.userData; + if(u.key!==key){const S=X.SUITS[key]||X.SUITS.me;u.ms.color.setHex(S[0]);u.mt.color.setHex(S[1]);u.mv.color.setHex(S[2]);u.key=key;u._lkO=null} + wearOn(m,k);X.setGun(m,u.gunId<0?0:u.gunId); + m.position.set(0,0,0);m.rotation.set(0,0,0);m.visible=true; + u.legs[0].rotation.x=u.legs[1].rotation.x=0;u.arms.rotation.x=0;u.arms.position.y=1.44;u.head.rotation.set(0,0,0);u.gun.position.z=-.62; + if(u._celP)u._celP.visible=false; +} +function pvRender(w,h,cv){ + const p=pvInit(),R=X.renderer; + if(!p.rt||p.rt.width!==w||p.rt.height!==h){if(p.rt)p.rt.dispose();p.rt=new THREE.WebGLRenderTarget(w,h);p.buf=new Uint8Array(w*h*4)} + p.cam.aspect=w/h;p.cam.updateProjectionMatrix(); + const cc=R.getClearColor(new THREE.Color()),ca=R.getClearAlpha(); + R.setRenderTarget(p.rt);R.setClearColor(0x000000,0);R.clear();R.render(p.scene,p.cam);R.readRenderTargetPixels(p.rt,0,0,w,h,p.buf); + R.setRenderTarget(null);R.setClearColor(cc,ca); + cv=cv||document.createElement('canvas');if(cv.width!==w)cv.width=w;if(cv.height!==h)cv.height=h; + const g=cv.getContext('2d'),img=g.createImageData(w,h),row=w*4;for(let y=0;yx.no===i);out.push({no:i,name:LISTS[slot][i-1],rarity:it?it.rarity:'',desc:it?it.desc:''})}return out} +function css(){ + const st=document.createElement('style');st.id='lkCss';st.textContent=` +#lkLocker{z-index:6;padding:12px} +#lkLocker .lk-card{width:min(960px,100%);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);display:flex;flex-direction:column;gap:10px;padding:16px 18px;background:#1c1809;border:1px solid rgba(244,234,208,.24);box-shadow:6px 6px 0 rgba(0,0,0,.45)} +.lk-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap} +.lk-head h2{margin:0;font-family:var(--f-osd);font-weight:400;font-size:44px;line-height:.9;color:#f6e7a6;text-shadow:2px 0 rgba(255,50,50,.5),-2px 0 rgba(40,200,255,.4)} +.lk-head .seg{flex:0 1 auto;flex-wrap:wrap} +.lk-head .seg button{padding:7px 12px;font-size:15px} +.lk-head .cta{margin-left:auto;padding:8px 18px;font-size:17px} +.lk-body{display:grid;grid-template-columns:minmax(0,290px) minmax(0,1fr);gap:16px;min-height:0;flex:1 1 auto} +.lk-pv{display:flex;flex-direction:column;gap:8px;min-height:0} +.lk-stage{position:relative;border:1px solid var(--line);background:radial-gradient(ellipse at 50% 35%,#e8d68a,#b8a052 60%,#6e5e2c);aspect-ratio:1;width:100%;overflow:hidden} +.lk-stage canvas{position:absolute;inset:0;width:100%;height:100%} +.lk-team button{padding:5px 10px;font-size:13px} +.lk-info{margin:0;font-size:15px;line-height:1.35;color:var(--ink-dim);min-height:2.7em} +.lk-info b{color:var(--ink);font-weight:800} +.lk-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:8px;overflow:auto;align-content:start;padding:2px 6px 10px 2px;min-height:0} +.lk-tile{display:flex;flex-direction:column;align-items:center;gap:2px;border:1px solid var(--line);background:rgba(0,0,0,.35);padding:4px 4px 6px;cursor:pointer;font-weight:700;font-size:13px;line-height:1.1;text-align:center;color:var(--ink)} +.lk-tile img{width:100%;aspect-ratio:1;display:block;background:radial-gradient(ellipse at 50% 35%,#d9c46e,#9c8a44 70%,#5e5026)} +.lk-tile i{font-style:normal;font-size:10px;font-weight:800;color:var(--rc);text-transform:uppercase;letter-spacing:.1em} +.lk-tile[aria-pressed="true"]{border-color:var(--mustard);box-shadow:inset 0 0 0 2px var(--mustard);background:rgba(60,48,14,.82)} +.lk-tile:hover{border-color:var(--mustard)} +.lk-note{margin:0;font-size:13px;color:var(--ink-dim)} +#lkRow small{color:var(--ink-dim);font-size:15px} +@media (max-width:640px){ + #lkLocker{padding:8px} + #lkLocker .lk-card{padding:10px;gap:8px;max-height:calc(100dvh - 16px)} + .lk-head{gap:8px} + .lk-head h2{font-size:34px} + .lk-head .seg{order:3;flex-basis:100%;width:100%} + .lk-head .seg button{padding:6px 7px;font-size:12.5px;flex:1 1 auto} + .lk-body{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);gap:8px} + .lk-pv{display:grid;grid-template-columns:140px minmax(0,1fr);gap:4px 10px;align-items:start} + .lk-stage{grid-row:span 2} + .lk-info{font-size:13px;min-height:0} + .lk-grid{grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:6px} + .lk-tile{font-size:12px} + .lk-note{display:none} +} +@media (max-height:520px) and (min-width:641px){ + #lkLocker{padding:6px} + #lkLocker .lk-card{padding:8px 12px;gap:6px;max-height:calc(100dvh - 12px)} + .lk-head h2{font-size:30px} + .lk-head .seg button{padding:5px 8px;font-size:13px} + .lk-head .cta{padding:6px 14px;font-size:15px} + .lk-body{grid-template-columns:minmax(0,180px) minmax(0,1fr);gap:10px} + .lk-info{font-size:12.5px;min-height:0} + .lk-note{display:none} + .lk-grid{grid-template-columns:repeat(auto-fill,minmax(86px,1fr));gap:6px} +}`;document.head.appendChild(st); +} +const $=X.$; +function build(){ + if(ui)return ui;css(); + if(!window.BackRoomCosmetics&&!document.querySelector('script[src$="/cosmetics.js"]')){const s=document.createElement('script');s.src='/e63334287a3deaa3/cosmetics.js';s.onload=()=>{thumbs.clear();if(ui&&!ui.sec.hidden)draw()};document.head.appendChild(s)} + const row=document.createElement('div');row.className='group';row.id='lkRow'; + row.innerHTML=''+X.esc(TX('Locker · captains only'))+'
'+X.esc(TX('Outfits, gun skins, build skins, eliminations and celebrations. Looks only.'))+'
'; + const pg=$('play').closest('.group');pg.insertAdjacentElement('afterend',row); + const sec=document.createElement('section');sec.id='lkLocker';sec.className='overlay center';sec.hidden=true;sec.setAttribute('role','dialog');sec.setAttribute('aria-label',TX('Locker')); + sec.innerHTML='

LOCKER

'+ + TABS.map(t=>'').join('')+'
'+ + '
'+ + '
'+ + '

'+ + '

'+X.esc(TX('Free to wear while the Locker is captains only. Looks only: every outfit is the same size as the plain suit and online it is always in your team colour.'))+'

'; + $('menu').insertAdjacentElement('afterend',sec); + $('lkOpen').addEventListener('click',open);$('lkClose').addEventListener('click',close); + sec.addEventListener('click',e=>{if(e.target===sec)close()}); + sec.addEventListener('keydown',e=>{e.stopPropagation();if(e.key==='Escape')close()}); + $('lkTabs').addEventListener('click',e=>{const b=e.target.closest('button');if(b){tab=b.dataset.t;playT=0;draw()}}); + $('lkTeam').addEventListener('click',e=>{const b=e.target.closest('button');if(b){pvKey=b.dataset.k;draw()}}); + return ui={row,sec}; +} +function info(slot,no){const it=no?items(slot)[no-1]:null,el=$('lkInfo');el.textContent=''; + const b=document.createElement('b');b.textContent=it?TX(it.name):TX('Plain');el.append(b,document.createTextNode(' '+(it?(it.desc?TX(it.desc):''):TX(PLAIN[slot]))))} +function draw(){ + if(!ui)return;for(const b of $('lkTabs').children)b.setAttribute('aria-checked',String(b.dataset.t===tab)); + for(const b of $('lkTeam').children)b.setAttribute('aria-checked',String(b.dataset.k===pvKey)); + $('lkTeam').style.visibility=tab==='g'||tab==='b'?'hidden':''; + const grid=$('lkGrid');grid.textContent='';const cur=myKit[tab]|0; + for(const it of [{no:0,name:'Plain',rarity:''}].concat(items(tab))){const b=document.createElement('button');b.type='button';b.className='lk-tile';b.setAttribute('aria-pressed',String(it.no===cur));if(it.desc)b.title=TX(it.desc); + const img=document.createElement('img');img.alt='';img.src=thumb(tab,it.no,tab==='g'||tab==='b'?'me':pvKey);const n=document.createElement('span');n.textContent=TX(it.name);b.append(img,n); + if(it.rarity){const r=document.createElement('i');r.style.setProperty('--rc',RAR[it.rarity]||'#b7ad8f');r.textContent=TX(it.rarity);b.append(r)} + b.addEventListener('click',()=>{wear(tab,it.no);playT=0;draw()});grid.appendChild(b)} + info(tab,cur);bigPv(); +} +function bigPv(){ + if(!ui||ui.sec.hidden)return;const p=pvInit(),cv=$('lkCv'),r=Math.min(2,devicePixelRatio||1),w=Math.min(420,Math.max(140,Math.round(cv.clientWidth*r)))||300; + const key=tab==='g'||tab==='b'?'me':pvKey;pvDress(myKit,key);const m=p.model,u=m.userData; + if(tab==='o')pvShot('fig',spin); + else if(tab==='g')pvShot('gun'); + else if(tab==='b'){p.wallMat.map=myKit.b?bTex(myKit.b):X.plyTex;p.wallMat.needsUpdate=true;pvShot('build');p.wall.rotation.y=-.55+Math.sin(spin*.7)*.35} + else if(tab==='e'){pvShot('fx',.6);const t=playT%2.6;m_die(m,t)} + else{pvShot('fig',.6+Math.sin(spin*.5)*.3);const n=myKit.c|0,t=playT%3;if(n){POSES[n](u,t,m,ease(Math.min(t*5,(3-t)*5,1)));if(n===CEL_TROPHY){if(!u._celP){u._celP=new THREE.Mesh(GEOS.trophy(),bodyMat);u._celP.position.set(.05,2.18,-.25);m.add(u._celP)}u._celP.visible=true;u._celP.scale.setScalar(1)}}} + pvRender(w,w,cv); +} +function open(){if(!X.on||X.state!=='menu')return;build();ui.sec.hidden=false;spin=0;playT=0;draw();const f=$('lkGrid').querySelector('[aria-pressed="true"]');if(f)f.focus({preventScroll:false})} +function close(){if(!ui)return;ui.sec.hidden=true;if(pv)pv.fx.clear();const b=$('lkOpen');if(b)b.focus()} +// Called by index.html when who may see the Locker may have changed, and once when this file arrives. +function access(){ + refreshMine(); + if(X.on){build();ui.row.hidden=false} + else if(ui){ui.row.hidden=true;if(!ui.sec.hidden)close()} +} +let fireT=0; +function update(dt){ + if(mainFx)mainFx.step(dt); + if(ui&&!ui.sec.hidden){ + if(X.state!=='menu'){close();return} + spin+=dt*.6;pvT+=dt;const was=playT;playT+=dt; + if(tab==='e'&&myKit.e&&(was===0||Math.floor(was/2.6)!==Math.floor(playT/2.6))){pv.fx.clear();pv.fx.play(myKit.e,new V3(0,0,0),(X.SUITS[pvKey]||X.SUITS.me)[0])} + if(tab==='c'&&myKit.c===CEL_FIRE&&!X.RM){fireT-=dt;if(fireT<=0){fireT=.7;const c=[0xff5c8a,0x58b4ff,0xffd23f,0x7dff8a][Math.floor(Math.random()*4)],q=new V3(rnd(-.5,.5),3,rnd(-.3,.3));for(let i=0;i<22;i++){const a=Math.random()*TAU,b=Math.acos(rnd(-1,1)),sp=rnd(1.4,2.2);pv.fx.add(pv.fx.glo,c,q,{v:new V3(Math.sin(b)*Math.cos(a)*sp,Math.cos(b)*sp,Math.sin(b)*Math.sin(a)*sp),life:rnd(.6,.9),s:.06,g:2,drag:1.5})}}} + if(pv)pv.fx.step(dt); + if(pvT>1/20){pvT=0;bigPv()} + } +} +const shared=o=>SHARED.has(o.geometry)||SHARED.has(o.material)||(o.isMesh&&o.geometry===ghostGeo); + +// ===================================================================== +// Test hook (automated browsers only): contact sheets drawn by the real code, and the fairness numbers +// ===================================================================== +if(navigator.webdriver)window.__lk={parse,wireOf,wear,heard,get mine(){return Object.assign({},myKit)},get wire(){return myWire},N,LISTS,OUTFITS,WRAPS,open,close,thumbs,fxMain,elim,gunGeo,bTex,bake,dress,pvInit,pvDress,pvShot,pvRender,POSES,makeFx,winning, + get tab(){return tab},set tab(v){tab=v},get pvKey(){return pvKey},set pvKey(v){pvKey=v},draw,m_die, + // one picture per item (outfits front and back, in the given suit colours; gun skins; build skins; effects and + // celebrations at three moments) + sheet(slot,opt){opt=opt||{};const key=opt.key||'r',cell=opt.cell||180,shots=[],p=pvInit(),lo=opt.from||0,hi=opt.to==null?N[slot]:opt.to; + for(let i=lo;i<=hi;i++){const k=parse('');k[slot]=i;const name=i?LISTS[slot][i-1]:'Plain'; + if(slot==='o'){for(const yaw of [.35,Math.PI+.35]){pvDress(k,key);pvShot(opt.far?'far':'fig',yaw);shots.push([pvRender(cell,Math.round(cell*1.3)),name+(yaw>1?' (back)':'')])}} + else if(slot==='g'){for(const wi of [0,1,2]){pvDress(k,'me');p.model.userData.gunId=-1;X.setGun(p.model,wi);pvShot('gun');shots.push([pvRender(cell,cell),name+' '+['rifle','shotgun','sniper'][wi]])}p.model.userData.gunId=-1;X.setGun(p.model,0)} + else if(slot==='b'){p.wallMat.map=i?bTex(i):X.plyTex;p.wallMat.needsUpdate=true;pvShot('build');shots.push([pvRender(cell,cell),name])} + else if(slot==='e'){for(const t of [.15,.5,1.0]){pvDress(parse(''),key);pvShot('fx');p.fx.clear();if(i)p.fx.play(i,new V3(0,0,0),X.SUITS[key][0]);let s=0;while(s{const x=(j%cols)*w,y=Math.floor(j/cols)*h;g.fillStyle='#cfb95f';g.fillRect(x+1,y+1,w-2,h-22);g.drawImage(cv,x,y);g.fillStyle='#f4ead0';g.fillText(label,x+w/2,y+h-5)}); + return out.toDataURL('image/png')}, + // fairness: each outfit drawn flat (its true colours, no lighting) from the front, back and both sides, against the + // plain suit in the same team colours: outline area, height and width, brightness, distance from the wall and carpet + // colours, how much of it is close to them, and how much is in the team colour + fair(keys){keys=keys||['r','b'];const p=pvInit(),m=p.model,R=X.renderer,S=160,Hm=2.8; + const cam=new THREE.OrthographicCamera(-Hm/2,Hm/2,Hm,0,.1,20);const rt=new THREE.WebGLRenderTarget(S,S*2),buf=new Uint8Array(S*S*2*4); + const WALL=[.812,.725,.373],CARPET=[.459,.404,.247],CARPET_LIT=[.62,.56,.4],lum=c=>.2126*c[0]+.7152*c[1]+.0722*c[2],dist=(a,b)=>Math.hypot(a[0]-b[0],a[1]-b[1],a[2]-b[2]); + function views(){const swap=[];m.traverse(o=>{if(o.isMesh&&o.visible&&o!==p.floor){swap.push([o,o.material]);o.material=new THREE.MeshBasicMaterial({color:o.material.color,vertexColors:!!o.material.vertexColors})}}); + p.floor.visible=false;p.wall.visible=false;const res=[]; + for(const [vx,vz] of [[0,-6],[0,6],[-6,0],[6,0]]){cam.position.set(vx,0,vz);cam.lookAt(0,0,0);cam.position.y=0;cam.updateProjectionMatrix(); + R.setRenderTarget(rt);R.setClearColor(0x000000,0);R.clear();R.render(p.scene,cam);R.readRenderTargetPixels(rt,0,0,S,S*2,buf); + let n=0,L=0,Dm=0,camo=0,x0=S,x1=-1,y1=-1;const px=[]; + for(let y=0;yx1)x1=x;if(y>y1)y1=y} + res.push({area:n,lum:L/n,dist:Dm/n,camo:camo/n,w:(x1-x0+1)/S*Hm,top:(y1+1)/(S*2)*Hm,px})} + R.setRenderTarget(null);for(const [o,mt] of swap){o.material.dispose();o.material=mt}return res} + const rows=[]; + for(const key of keys){const P=X.SUITS[key],team=[P[0],mix(P[0],0,.28),mix(P[0],0xffffff,.45),P[1]].map(rgb); + const base=(()=>{pvDress(parse(''),key);m.rotation.set(0,0,0);return views()})(); + for(let i=0;i<=N.o;i++){const k=parse('');k.o=i;pvDress(k,key);m.rotation.set(0,0,0);const v=i?views():base; + const share=V=>V.px.filter(c=>team.some(t=>dist(c,t)<.1)).length/V.px.length; + const sum=V=>({area:V.reduce((t,a)=>t+a.area,0)/V.reduce((t,a)=>t,0)}); + const row={key,i,name:i?LISTS.o[i-1]:'Plain',front:v[0].area/base[0].area,back:v[1].area/base[1].area,side:(v[2].area+v[3].area)/(base[2].area+base[3].area), + width:Math.max(v[0].w,v[1].w)-Math.max(base[0].w,base[1].w),depth:Math.max(v[2].w,v[3].w)-Math.max(base[2].w,base[3].w),top:Math.max(...v.map(a=>a.top))-Math.max(...base.map(a=>a.top)), + lum:v.reduce((t,a)=>t+a.lum*a.area,0)/v.reduce((t,a)=>t+a.area,0),blum:base.reduce((t,a)=>t+a.lum*a.area,0)/base.reduce((t,a)=>t+a.area,0), + dist:v.reduce((t,a)=>t+a.dist*a.area,0)/v.reduce((t,a)=>t+a.area,0),bdist:base.reduce((t,a)=>t+a.dist*a.area,0)/base.reduce((t,a)=>t+a.area,0), + camo:Math.max(...v.map(a=>a.camo)),bcamo:Math.max(...base.map(a=>a.camo)),team:v.reduce((t,a)=>t+share(a)*a.area,0)/v.reduce((t,a)=>t+a.area,0),bteam:base.reduce((t,a)=>t+share(a)*a.area,0)/base.reduce((t,a)=>t+a.area,0)}; + for(const a of v)delete a.px;rows.push(row)}} + rt.dispose();pvDress(myKit,'me');return rows}, + // build skins: mean colour of each picture against plywood (distance from the walls, carpet and both team colours) + buildFair(){const out=[],read=t=>{const c=t.image,g=c.getContext('2d'),d=g.getImageData(0,0,c.width,c.height).data;let r=0,gg=0,b=0,n=d.length/4;for(let i=0;iMath.hypot(a[0]-b[0],a[1]-b[1],a[2]-b[2]),TEAMS=[X.SUITS.r[0],X.SUITS.b[0],X.SUITS.r[1],X.SUITS.b[1]].map(rgb); + for(let i=0;i<=N.b;i++){const c=read(i?bTex(i):X.plyTex);out.push({i,name:i?LISTS.b[i-1]:'Plywood',col:c.map(v=>+v.toFixed(3)),lum:+(.2126*c[0]+.7152*c[1]+.0722*c[2]).toFixed(3),wall:+dist(c,WALL).toFixed(3),carpet:+dist(c,CARPET).toFixed(3),team:+Math.min(...TEAMS.map(t=>dist(c,t))).toFixed(3),opaque:true})}return out} +}; + +return {wire:()=>X.on?myWire:'',heard,suit,gunGeo,piece,elim,anim,update,access,open,close,shared}; +}; diff --git a/e63334287a3deaa3/cosmetics.js b/e63334287a3deaa3/cosmetics.js index dbdea3e5..a111ae52 100644 --- a/e63334287a3deaa3/cosmetics.js +++ b/e63334287a3deaa3/cosmetics.js @@ -253,7 +253,7 @@ rampline: { name: 'Rampline', prefix: 'rl', slots: [['car', 'Cars'], ['paint', 'Paints'], ['wheels', 'Wheels'], ['smoke', 'Tyre smoke'], ['horn', 'Horns']] }, chromaflage: { name: 'Chromaflage', prefix: 'cf', slots: [['hat', 'Seeker hats'], ['tool', 'Seeker tools'], ['splash', 'Catch splashes'], ['caught', 'Caught animations']] }, 'odd-one-out': { name: 'Odd One Out', prefix: 'oo', slots: [['outfit', 'Hunter outfits'], ['tool', 'Hunter tools'], ['taunt', 'Prop taunts'], ['poof', 'Catch poofs']] }, - 'drop-zone': { name: 'Driftfall', prefix: 'dz', slots: [['outfit', 'Outfits'], ['pack', 'Backpacks'], ['glider', 'Gliders'], ['trail', 'Glider trails'], ['wrap', 'Gun skins'], ['build', 'Build skins'], ['emote', 'Emotes'], ['victory', 'Victory poses']] }, + 'drop-zone': { name: 'Driftfall', prefix: 'dz', slots: [['outfit', 'Outfits'], ['pack', 'Backpacks'], ['glider', 'Gliders'], ['trail', 'Glider trails'], ['wrap', 'Gun skins'], ['build', 'Build skins'], ['emote', 'Emotes'], ['victory', 'Victory poses']] }, 'backrooms-1v1': { name: 'Backrooms 1v1–4v4', prefix: 'br', slots: [['outfit', 'Outfits'], ['wrap', 'Gun skins'], ['build', 'Build skins'], ['elim', 'Elimination effects'], ['celebrate', 'Round-win celebrations']] }, }; var GAME_ITEMS = [], ITEM_BY_ID = {}; function I(game, slot, no, name, rarity, c1, c2, desc) { @@ -1012,6 +1012,82 @@ I('drop-zone', 'victory', 2, 'Flex', 'uncommon', '#E8742A', '#FFFFFF', 'Show those arms.'); I('drop-zone', 'victory', 3, 'Take a Bow', 'rare', '#8A5A2B', '#F2EFE8', 'A deep, slow bow to the crowd.'); I('drop-zone', 'victory', 4, 'Jump for Joy', 'epic', '#5FD068', '#FFD23F', 'Jumping up and down with arms wide.'); + // ---- Backrooms 1v1 items ---- + // Backrooms 1v1–4v4's Locker (backrooms-1v1/locker.js draws them, by slot and number). Online every outfit is in the + // player's team colour; c1 and c2 here are only the shop picture (and the outfit's colours in practice). + I('backrooms-1v1', 'outfit', 1, 'Striker', 'common', '#1F9E5A', '#FFFFFF', 'A football kit with white shorts, side panels and a number on the back.'); + I('backrooms-1v1', 'outfit', 2, 'Hoops', 'common', '#FF7A1A', '#FFFFFF', 'A basketball vest, long shorts, a headband and high-top trainers.'); + I('backrooms-1v1', 'outfit', 3, 'Gridiron', 'uncommon', '#6A2BC8', '#E8E6DC', 'Helmet with a face cage, big shoulder pads and a number on each side.'); + I('backrooms-1v1', 'outfit', 4, 'Slugger', 'common', '#2153B8', '#ECEAE2', 'A batting helmet, button-up jersey and knee-length baseball trousers.'); + I('backrooms-1v1', 'outfit', 5, 'Puck', 'common', '#C41F3A', '#FFFFFF', 'A roomy hockey jersey, caged helmet, striped socks and skates.'); + I('backrooms-1v1', 'outfit', 6, 'Ace', 'common', '#18B4A6', '#FFFFFF', 'A tennis polo with a collar, white shorts and a sun visor.'); + I('backrooms-1v1', 'outfit', 7, 'Champ', 'uncommon', '#D62828', '#FFFFFF', 'Head guard, big gloves and shiny boxing shorts.'); + I('backrooms-1v1', 'outfit', 8, 'Sprinter', 'common', '#FF3D7F', '#3EE6D0', 'A running vest with a sash, a race number and bright spikes.'); + I('backrooms-1v1', 'outfit', 9, 'Lap Swimmer', 'common', '#1689E0', '#9FF2FF', 'Swim cap, goggles and a racing suit with a towel round the neck.'); + I('backrooms-1v1', 'outfit', 10, 'Fairway', 'uncommon', '#2E8C5A', '#CFD3D8', 'A flat cap, a diamond-pattern jumper and checked golf trousers.'); + I('backrooms-1v1', 'outfit', 11, 'Skater', 'common', '#E0402A', '#8A9098', 'A beanie, a baggy tee with a bolt on it, and a board on the back.'); + I('backrooms-1v1', 'outfit', 12, 'Downhill', 'uncommon', '#2F6FD8', '#FFB04A', 'A quilted ski jacket, helmet and big orange goggles.'); + I('backrooms-1v1', 'outfit', 13, 'Pit Racer', 'rare', '#E8202A', '#FFFFFF', 'A racing suit with stripes and patches and a full-face helmet.'); + I('backrooms-1v1', 'outfit', 14, 'Referee', 'common', '#3F8FE0', '#FFFFFF', 'A striped shirt, a whistle and a cap. Still in your team colour.'); + I('backrooms-1v1', 'outfit', 15, 'Coach', 'uncommon', '#8A2BE2', '#FFFFFF', 'A track jacket, a cap and a whistle for the big talk.'); + I('backrooms-1v1', 'outfit', 16, 'Bear Mascot', 'rare', '#C8641E', '#F0B87A', 'A big friendly bear head, round ears and furry paws.'); + I('backrooms-1v1', 'outfit', 17, 'Martial Artist', 'common', '#2A5FD0', '#24242A', 'A coloured training suit, a dark belt and a headband.'); + I('backrooms-1v1', 'outfit', 18, 'Cheer Captain', 'uncommon', '#E8327A', '#FFFFFF', 'A chevron top, a pleated skirt and a big bow.'); + I('backrooms-1v1', 'outfit', 19, 'Tin Bot', 'rare', '#D04A3A', '#C9D0D6', 'A painted tin robot with an antenna, square eyes and a chest of dials.'); + I('backrooms-1v1', 'outfit', 20, 'Sleek Android', 'epic', '#8A96A8', '#6FF4FF', 'Smooth white panels with glowing seams and one long eye.'); + I('backrooms-1v1', 'outfit', 21, 'Mech Pilot', 'epic', '#E0A020', '#8FE0FF', 'Armour plates, a big visor with a microphone and twin thrusters.'); + I('backrooms-1v1', 'outfit', 22, 'Junkyard Bot', 'rare', '#3A9A7A', '#B5522A', 'Patched plates, rusty bits, mismatched eyes and an exhaust pipe.'); + I('backrooms-1v1', 'outfit', 23, 'Pirate Captain', 'legendary', '#B3263A', '#E8B22E', 'Tricorn hat, long coat with gold buttons, an eye patch and a parrot.'); + I('backrooms-1v1', 'outfit', 24, 'Deckhand', 'common', '#2A6FD0', '#FFFFFF', 'A striped shirt, a spotty bandana and an eye patch.'); + I('backrooms-1v1', 'outfit', 25, 'First Mate', 'uncommon', '#2B8A6E', '#C9D0D6', 'A waistcoat and sash, an eye patch and a hook for a hand.'); + I('backrooms-1v1', 'outfit', 26, 'Ghost Pirate', 'epic', '#3A8A8A', '#7DFFC8', 'A pale sea spook in a ragged coat, with glowing green eyes.'); + I('backrooms-1v1', 'outfit', 27, 'Pinstripe Suit', 'rare', '#4A5A7A', '#E8E8E8', 'A 1920s pinstripe suit, a fedora and white spats.'); + I('backrooms-1v1', 'outfit', 28, 'The Boss', 'legendary', '#5A3A8A', '#ECE6DA', 'A long coat with a fur collar, a tall fur hat and dark glasses.'); + I('backrooms-1v1', 'outfit', 29, 'Tracksuit and Chain', 'uncommon', '#2A3A8A', '#E8B22E', 'A two-stripe tracksuit, a flat cap and a big gold chain.'); + I('backrooms-1v1', 'outfit', 30, 'Bodyguard', 'uncommon', '#3A4A5A', '#34465C', 'A sharp suit and tie, dark glasses and an earpiece.'); + I('backrooms-1v1', 'outfit', 31, 'Tuxedo', 'rare', '#2E3A6A', '#FFFFFF', 'A tuxedo with a bow tie, a top hat and a monocle.'); + I('backrooms-1v1', 'outfit', 32, 'Detective', 'uncommon', '#6A5A8A', '#24242A', 'A belted trench coat with the collar up and a hat with a feather.'); + I('backrooms-1v1', 'outfit', 33, 'Astronaut', 'rare', '#3A7AE0', '#FFFFFF', 'A space suit with a round helmet and a life-support pack.'); + I('backrooms-1v1', 'outfit', 34, 'Wizard', 'epic', '#5A3AD0', '#FFE27A', 'A starry robe, a tall pointed hat and a long white beard.'); + I('backrooms-1v1', 'outfit', 35, 'Firefighter', 'uncommon', '#D83A1A', '#C9D0D6', 'A helmet with a badge, a coat with shiny bands and big boots.'); + I('backrooms-1v1', 'outfit', 36, 'Knight', 'epic', '#2A5AC8', '#C9D0D6', 'Costume armour, a plumed helmet and a tabard with a diamond.'); + I('backrooms-1v1', 'wrap', 1, 'Gold', 'legendary', '#D9A520', '#F2CC58', 'Every gun in shining gold with dark wood.'); + I('backrooms-1v1', 'wrap', 2, 'Chrome', 'epic', '#C4CCD4', '#2C2C32', 'Mirror-bright metal with black rubber grips.'); + I('backrooms-1v1', 'wrap', 3, 'Wood Grain', 'common', '#8A5428', '#5A3418', 'Warm wood all over, with darker grain.'); + I('backrooms-1v1', 'wrap', 4, 'Forest Camo', 'common', '#4F6B3A', '#2E3A24', 'Green and brown patches.'); + I('backrooms-1v1', 'wrap', 5, 'Desert Camo', 'common', '#C8AD7A', '#8A6E48', 'Sand and dust patches.'); + I('backrooms-1v1', 'wrap', 6, 'Arctic Camo', 'common', '#E8EEF2', '#9AA6AE', 'White and cold grey patches.'); + I('backrooms-1v1', 'wrap', 7, 'Pixel Camo', 'uncommon', '#5A6A7A', '#3E6A8A', 'Small blocky patches in slate and blue.'); + I('backrooms-1v1', 'wrap', 8, 'Candy Cane', 'uncommon', '#F4F0EA', '#D8282E', 'Red and white stripes the whole way along.'); + I('backrooms-1v1', 'wrap', 9, 'Hazard Stripes', 'common', '#F2C41A', '#24242A', 'Yellow and black warning stripes.'); + I('backrooms-1v1', 'wrap', 10, 'Lava', 'rare', '#2E2624', '#FF7A1A', 'Cooled black rock with orange cracks.'); + I('backrooms-1v1', 'wrap', 11, 'Toy Blaster', 'uncommon', '#2F7FE8', '#FFD23F', 'Bright toy-box plastic in blue, yellow and orange.'); + I('backrooms-1v1', 'wrap', 12, 'Galaxy', 'epic', '#3A2A7A', '#FF7AE0', 'Deep purple space with pink clouds and tiny stars.'); + I('backrooms-1v1', 'wrap', 13, 'Checkered Flag', 'rare', '#F2F2F2', '#24242A', 'Black and white checks, like the end of a race.'); + I('backrooms-1v1', 'wrap', 14, 'Pirate Brass', 'rare', '#B88A3A', '#5A3418', 'Old brass fittings and dark ship timber.'); + I('backrooms-1v1', 'wrap', 15, 'Football Leather', 'uncommon', '#8A4A22', '#F4F0EA', 'Brown leather with white lacing along the top.'); + I('backrooms-1v1', 'build', 1, 'Concrete', 'common', '#C9C7C0', '#6E6C66', 'Pale grey slabs with little air holes.'); + I('backrooms-1v1', 'build', 2, 'Ice Block', 'uncommon', '#E4F4FB', '#6E9CB4', 'Frosted ice with cracks. You still cannot see through it.'); + I('backrooms-1v1', 'build', 3, 'Candy Stripes', 'rare', '#F27AA8', '#FBE8EF', 'Pink and white stripes with sprinkles.'); + I('backrooms-1v1', 'build', 4, 'Scrap Metal', 'uncommon', '#A4ABB2', '#5A6068', 'Bolted grey plates with a little rust.'); + I('backrooms-1v1', 'build', 5, 'Cardboard', 'common', '#D6B98A', '#8A6A40', 'A flattened box, tape and all.'); + I('backrooms-1v1', 'build', 6, 'Marble', 'rare', '#EEECE8', '#8A8A94', 'White stone with grey veins.'); + I('backrooms-1v1', 'elim', 1, 'Confetti Pop', 'common', '#FF5C8A', '#58B4FF', 'A small burst of paper confetti where they fall.'); + I('backrooms-1v1', 'elim', 2, 'Noclip Glitch', 'epic', '#6FF4FF', '#FF4FD8', 'They flicker into glowing blocks, as if they slipped out of the level.'); + I('backrooms-1v1', 'elim', 3, 'Ghost Away', 'rare', '#F4F6FF', '#2A2A38', 'A little ghost floats up and fades.'); + I('backrooms-1v1', 'elim', 4, 'Red Card', 'uncommon', '#E8262E', '#FFFFFF', 'A red card pops up over them. Off you go.'); + I('backrooms-1v1', 'elim', 5, 'Treasure Coins', 'rare', '#F2C41A', '#FFE27A', 'Gold coins jump out and bounce on the carpet.'); + I('backrooms-1v1', 'elim', 6, 'Nuts and Bolts', 'uncommon', '#9AA3AB', '#C9D0D6', 'Bolts and washers rattle out across the floor.'); + I('backrooms-1v1', 'elim', 7, 'Balloon Pop', 'common', '#FF5C5C', '#FFD23F', 'Three balloons float up and pop.'); + I('backrooms-1v1', 'elim', 8, 'Rubber Ducks', 'legendary', '#FFD23F', '#FF8A1A', 'Five rubber ducks hop out in every direction.'); + I('backrooms-1v1', 'celebrate', 1, 'Fist Pump', 'common', '#FFD23F', '#E8453C', 'Arms up and pumping when your team takes the round.'); + I('backrooms-1v1', 'celebrate', 2, 'Victory Hop', 'common', '#5FD068', '#FFFFFF', 'Little jumps on the spot.'); + I('backrooms-1v1', 'celebrate', 3, 'Spin Move', 'uncommon', '#58B4FF', '#FFFFFF', 'One smooth turn on the spot.'); + I('backrooms-1v1', 'celebrate', 4, 'Robot Dance', 'rare', '#B9C2CC', '#3A7AD0', 'Stiff arms, sharp turns, beep boop.'); + I('backrooms-1v1', 'celebrate', 5, 'Pirate Jig', 'uncommon', '#8A5A2B', '#E8B22E', 'A hopping, rocking sea dance.'); + I('backrooms-1v1', 'celebrate', 6, 'Take a Bow', 'common', '#8A5A2B', '#F2EFE8', 'A slow bow to an empty room.'); + I('backrooms-1v1', 'celebrate', 7, 'Trophy Lift', 'epic', '#F2C41A', '#6A4A2C', 'A gold cup appears over your head.'); + I('backrooms-1v1', 'celebrate', 8, 'Fireworks', 'legendary', '#FF5C8A', '#FFD23F', 'Little fireworks pop over your head.'); // Items a game hands over itself are in no pack: give is 'free' (anyone may wear it; the game grants it the first time it // is worn) or 'earned' (the game grants it when it is won). grant(id), below, only adds these. GAME_ITEMS.forEach(function (it) { if (it.game !== 'slipstream') return; if (it.slot === 'sponsor' || (it.slot === 'helmet' && it.no <= 8)) it.give = 'free'; else if (it.slot === 'livery' && it.no > 8) it.give = 'earned'; }); From be66ddfae2942afd12521dabc56bf2c5090a81fd Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 07:30:28 +0000 Subject: [PATCH 46/63] Boostball: 83 new Kit items (24 decals, 17 boost trails, 18 goal explosions, 24 antenna toppers), appended after the existing ones Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn --- e63334287a3deaa3/boostball/es.js | 15 + e63334287a3deaa3/boostball/kit.js | 724 +++++++++++++++++++++++++++++- e63334287a3deaa3/cosmetics.js | 84 ++++ 3 files changed, 819 insertions(+), 4 deletions(-) diff --git a/e63334287a3deaa3/boostball/es.js b/e63334287a3deaa3/boostball/es.js index ae405ee2..c63a4d3c 100644 --- a/e63334287a3deaa3/boostball/es.js +++ b/e63334287a3deaa3/boostball/es.js @@ -38,6 +38,21 @@ 'Ticker Tape Parade': 'Desfile de serpentinas', 'Treasure Chest': 'Cofre del tesoro', 'Floodlights': 'Reflectores', 'Soccer Ball': 'Pelota de fútbol', 'Basketball': 'Pelota de básquet', 'Baseball': 'Pelota de béisbol', 'Anchor': 'Ancla', 'Robot Head': 'Cabeza de robot', 'Parrot': 'Loro', 'Pirate Tricorn': 'Tricornio pirata', 'Fedora': 'Fedora', 'Football Helmet': 'Casco de fútbol americano', "Captain's Cap": 'Gorra de capitán', 'Robot Dome': 'Cúpula de robot', 'Ref Cap': 'Gorra de árbitro', 'Black Chrome': 'Cromo negro', + // third-wave Kit items (Nov 2026) + 'Number Eight': 'Número ocho', 'Speed Slashes': 'Rayas de velocidad', 'Baseball Stitches': 'Costuras de béisbol', 'Pitch Lines': 'Líneas de cancha', 'Vintage Racer': 'Carrera clásica', + 'Pinstriping': 'Filetes', 'Low Poly': 'Facetas', 'Chevrons': 'Galones', 'Leopard Spots': 'Manchas de leopardo', 'Paw Prints': 'Huellas', 'Big Waves': 'Olas grandes', 'Sunburst': 'Rayos de sol', + 'Treasure Map': 'Mapa del tesoro', 'Eye Patch': 'Parche en el ojo', 'Tracksuit and Chain': 'Chándal y cadena', 'Suit and Tie': 'Traje y corbata', 'Hazard Stripes': 'Franjas de peligro', + 'Barcode': 'Código de barras', 'Synthwave Sunset': 'Atardecer retro', 'Polka Dots': 'Lunares', 'Music Staff': 'Pentagrama', 'Paisley': 'Cachemira', 'Golf Argyle': 'Rombos de golf', 'Title Belt': 'Cinturón de campeón', + 'Green Flame': 'Llama verde', 'Violet Flame': 'Llama violeta', 'Afterburner': 'Posquemador', 'Sports Balls': 'Pelotas deportivas', 'Cannon Smoke': 'Humo de cañón', 'Gems': 'Gemas', + 'Paper Planes': 'Aviones de papel', 'Spare Parts': 'Repuestos', 'Pizza Slices': 'Porciones de pizza', 'Comet Tail': 'Cola de cometa', 'Cherry Blossoms': 'Flores de cerezo', 'Ghosts': 'Fantasmas', + 'Pixel Fire': 'Fuego de píxeles', 'Ice Shards': 'Esquirlas de hielo', 'Hockey Pucks': 'Discos de hockey', 'Fire and Ice': 'Fuego y hielo', + 'Giant Trophy': 'Trofeo gigante', 'Stadium Wave': 'Ola en el estadio', 'Robot Salute': 'Saludo del robot', 'Tidal Wave': 'Maremoto', 'Aurora': 'Aurora', 'Light Dragon': 'Dragón de luz', + 'Disco Floor': 'Pista de baile', 'Piano Keys': 'Teclas de piano', 'Bubble Pop': 'Burbuja reventada', 'Balloon Release': 'Suelta de globos', 'Paint Splash': 'Salpicón de pintura', 'Thunderclap': 'Trueno', + 'Kraken': 'Kraken', 'Rocket Launch': 'Lanzamiento del cohete', 'Red Carpet': 'Alfombra roja', 'Snow Globe': 'Bola de nieve', 'Slam Dunk': 'Clavada', 'High Striker': 'Martillo de feria', + 'Foam Finger': 'Mano de espuma', 'Trophy': 'Trofeo', 'Whistle': 'Silbato', 'Tricorn': 'Tricornio', 'Eye Patch Flag': 'Bandera con parche', 'Halo': 'Aureola', 'Pizza Slice': 'Porción de pizza', + 'Flying Saucer': 'Platillo volador', 'Cactus': 'Cactus', 'Wizard Hat': 'Sombrero de mago', 'Smiley Ball': 'Bola sonriente', 'Racing Helmet': 'Casco de carreras', 'Baseball Cap': 'Gorra de béisbol', + 'Boxing Glove': 'Guante de boxeo', 'Golf Ball': 'Pelota de golf', 'Mini Fedora': 'Mini fedora', 'Mini Top Hat': 'Mini galera', 'Mini Cone': 'Mini cono', 'Propeller Cap': 'Gorra con hélice', + 'Little Chef Hat': 'Gorrito de chef', 'Royal Crown': 'Corona real', 'American Football': 'Balón de fútbol americano', 'Bowling Pin': 'Bolo', 'Satellite Dish': 'Antena parabólica', 'No decal: plain team paint.': 'Sin calcomanía: el color del equipo, liso.', 'No trail: the usual boost flame.': 'Sin estela: la llama de turbo de siempre.', 'No goal explosion: the usual fireball.': 'Sin explosión de gol: la bola de fuego de siempre.', 'No topper.': 'Sin adorno.', 'No hat.': 'Sin sombrero.', 'The usual wheels.': 'Las ruedas de siempre.', 'The usual engine sound.': 'El sonido de motor de siempre.', 'is not in your locker yet.': 'todavía no está en tu casillero.', 'Shop': 'Tienda', diff --git a/e63334287a3deaa3/boostball/kit.js b/e63334287a3deaa3/boostball/kit.js index 0f8bd315..bd509154 100644 --- a/e63334287a3deaa3/boostball/kit.js +++ b/e63334287a3deaa3/boostball/kit.js @@ -491,6 +491,226 @@ const DECALS=[null, if(P.panel==='side'){rect(g,-1.5,.78,3,.05,'#c89a3c');rect(g,-1.5,-.36,3,.05,'#c89a3c');dot(g,.15,.25,.42,'#1d1f27');pair(.15,.25,.42)} else if(P.panel==='top'){for(const y of[-.94,.89])rect(g,-1.5,y,3,.05,'#c89a3c');dot(g,-.3,0,.6,'#1d1f27');pair(-.3,0,.6)} else{dot(g,0,.24,.36,'#1d1f27');pair(0,.24,.34)} + }, + // ---- third wave (Nov 2026): more sports, pirates, suits, robots and shapes ---- + // 39 Number Eight: a big jersey number (an 8 reads the same from either side of the car) and sleeve stripes + (g,P)=>{ + const eight=(x,y,h,w)=>{for(const [c,lw] of [[P.ac,w*1.8],['#f4f6ff',w]]){g.lineWidth=lw;g.strokeStyle=c;g.beginPath();g.ellipse(x,y+h*.24,h*.18,h*.22,0,0,TAU);g.stroke();g.beginPath();g.ellipse(x,y-h*.24,h*.22,h*.26,0,0,TAU);g.stroke()}}; + const sleeve=(x0,x1,y)=>{rect(g,x0,y,x1-x0,.05,'#f4f6ff');rect(g,x0,y+.05,x1-x0,.05,P.ac);rect(g,x0,y+.1,x1-x0,.05,'#f4f6ff')}; + if(P.panel==='side'){eight(-.05,.22,.66,.075);sleeve(-1.5,1.5,-.36)} + else if(P.panel==='top'){g.save();g.transform(0,-1,1,0,-.15,0);eight(0,0,.95,.1);g.restore();for(const s of[-1,1])sleeve(-1.5,1.5,s*.86-.075)} + else if(P.panel==='rear')eight(0,.28,.5,.06); + else sleeve(-1,1,-.36); + }, + // 40 Speed Slashes: three slanted bars near the nose, white, accent, white + (g,P)=>{ + const slash=(x,y0,y1,w,lean,c)=>{poly(g,[[x,y0],[x+w,y0],[x+w+lean,y1],[x+lean,y1]]);g.fillStyle=c;g.fill()}; + const set=(x,y0,y1,k)=>{slash(x,y0,y1,.16*k,-.32*k,'#f4f6ff');slash(x+.24*k,y0,y1,.12*k,-.32*k,P.ac);slash(x+.42*k,y0,y1,.08*k,-.32*k,'#f4f6ff')}; + if(P.panel==='side'){set(.55,-.3,.55,1);set(-1.35,-.3,-.05,.6)} + else if(P.panel==='top'){for(const s of[-1,1]){g.save();g.scale(1,s);set(.6,.15,.95,1);g.restore()}} + else if(P.panel==='rear'){for(const x of[-.7,.45])set(x,-.3,.45,.7)} + }, + // 41 Baseball Stitches: the two curved seams of a baseball, red stitches on a white thread + (g,P)=>{ + const seam=(f,x0,x1)=>{const pts=[];for(let x=x0;x<=x1+1e-6;x+=.02)pts.push([x,f(x)]);line(g,pts,.05,'rgba(255,255,255,.92)'); + for(let i=2;i.22+.3*Math.sin(x*1.5+.4),-1.5,1.5); + else if(P.panel==='top'){seam(y=>.5*Math.sin(y*1.6)+.12,-1.5,1.5);seam(y=>.5*Math.sin(y*1.6+Math.PI)-.12,-1.5,1.5)} + else seam(x=>.25+.25*Math.cos(x*2),-1,1); + }, + // 42 Pitch Lines: mown stripes in your own shades and white pitch markings + (g,P)=>{ + g.globalAlpha=.22;for(let x=P.u0;x{g.lineWidth=lw;g.strokeStyle=W;g.strokeRect(Math.min(x0,x1),-y,Math.abs(x1-x0),y*2)}; + if(P.panel==='top'){line(g,[[0,-1],[0,1]],lw,W);g.beginPath();g.arc(0,0,.42,0,TAU);g.lineWidth=lw;g.strokeStyle=W;g.stroke();dot(g,0,0,.045,W); + for(const s of[-1,1]){box(s*1.5,s*.95,.62);box(s*1.5,s*1.28,.3);g.beginPath();g.arc(s*.95,0,.2,s>0?Math.PI*.5:-Math.PI*.5,s>0?Math.PI*1.5:Math.PI*.5);g.stroke()}} + else if(P.panel==='side'){line(g,[[-1.5,-.22],[1.5,-.22]],lw,W);g.beginPath();g.arc(1.5,-.22,.16,Math.PI*.5,Math.PI);g.lineWidth=lw;g.strokeStyle=W;g.stroke();g.beginPath();g.arc(-1.5,-.22,.16,0,Math.PI*.5);g.stroke();line(g,[[0,-.22],[0,.9]],lw,W)} + else{g.lineWidth=lw;g.strokeStyle=W;g.strokeRect(-.6,-.3,1.2,.62);g.globalAlpha=.4;for(let x=-.55;x<.6;x+=.1)line(g,[[x,-.28],[x,.3]],.008,W);for(let y=-.25;y<.3;y+=.1)line(g,[[-.58,y],[.58,y]],.008,W);g.globalAlpha=1} + }, + // 43 Vintage Racer: a white number disc with a double zero and a thin pinstripe, like an old race car + (g,P)=>{ + const disc=(x,y,r)=>{dot(g,x,y,r,'#f4f1e6');g.beginPath();g.arc(x,y,r,0,TAU);g.lineWidth=r*.09;g.strokeStyle='#14161f';g.stroke(); + for(const s of[-1,1]){g.beginPath();g.ellipse(x+s*r*.3,y,r*.2,r*.46,0,0,TAU);g.lineWidth=r*.15;g.stroke()}}; + if(P.panel==='side'){rect(g,-1.5,-.11,3,.05,'#f4f1e6');rect(g,-1.5,-.095,3,.02,P.ac);disc(-.05,.18,.27)} + else if(P.panel==='top'){for(const y of[-.12,.12])rect(g,-1.5,y-.02,3,.04,'#f4f1e6');disc(.95,0,.3)} + else if(P.panel==='front'){g.beginPath();g.ellipse(0,.0,.5,.3,0,0,TAU);g.fillStyle='#f4f1e6';g.fill();g.lineWidth=.03;g.strokeStyle='#14161f';g.stroke()} + else disc(0,.25,.2); + }, + // 44 Pinstriping: thin hand-painted curls over the bonnet and along the sides + (g,P)=>{ + const curl=(pts,c,w)=>{g.beginPath();g.moveTo(pts[0][0],pts[0][1]);for(let i=1;i+2{curl(pts,P.ac,.04);curl(pts,'#f4f6ff',.014)}; + if(P.panel==='top'){for(const s of[-1,1]){both([[1.42,0],[1.1,s*.05],[.85,s*.45],[.55,s*.38],[.3,s*.3],[.35,s*.12],[.5,s*.16],[.6,s*.2],[.55,s*.3],[.45,s*.28]]);both([[-1.4,s*.72],[-.6,s*.74],[.2,s*.72],[.7,s*.6]])}} + else if(P.panel==='side'){both([[-1.35,.3],[-.5,.34],[.4,.34],[.9,.22],[1.1,.14],[1.25,.24],[1.18,.32],[1.1,.36],[1.02,.3],[1.06,.26]]);both([[-1.3,-.18],[-.3,-.2],[.5,-.2],[1.2,-.16]])} + else if(P.panel==='rear'){for(const s of[-1,1])both([[0,.15],[s*.2,.35],[s*.55,.3],[s*.45,.1],[s*.35,-.05],[s*.2,.05],[s*.28,.15]])} + }, + // 45 Low Poly: the paint broken into big flat facets in lighter and darker shades of your team colour + (g,P)=>{ + const c=.42,nx=Math.ceil((P.u1-P.u0)/c),ny=Math.ceil((P.v1-P.v0)/c),pt=[]; + for(let j=0;j<=ny;j++){pt.push([]);for(let i=0;i<=nx;i++)pt[j].push([P.u0+i*c+(i&&i.5?[[q[0],q[1],q[2]],[q[0],q[2],q[3]]]:[[q[0],q[1],q[3]],[q[1],q[2],q[3]]])){const k=P.r();poly(g,t);g.fillStyle=k<.45?P.lt:P.dk;g.globalAlpha=.12+P.r()*.3;g.fill();g.globalAlpha=1}} + }, + // 46 Chevrons: big arrowheads pointing at the nose + (g,P)=>{ + const chev=(x,yc,h,d,w,c)=>{poly(g,[[x,yc-h],[x+d,yc],[x,yc+h],[x+w,yc+h],[x+w+d,yc],[x+w,yc-h]]);g.fillStyle=c;g.fill()}; + if(P.panel==='side'){chev(-.75,.12,.34,.3,.17,'#f4f6ff');chev(-.25,.12,.34,.3,.17,P.ac);chev(.25,.12,.34,.3,.17,'#f4f6ff')} + else if(P.panel==='top'){chev(-.6,0,.55,.45,.2,'#f4f6ff');chev(-.05,0,.55,.45,.2,P.ac);chev(.5,0,.55,.45,.2,'#f4f6ff')} + else if(P.panel==='rear'){g.save();g.transform(0,1,1,0,0,0);chev(-.1,0,.45,.3,.15,'#f4f6ff');chev(.25,0,.45,.3,.15,P.ac);g.restore()} + }, + // 47 Leopard Spots: broken dark rings round darker middles + (g,P)=>{ + const w=P.u1-P.u0,h=P.v1-P.v0,n=Math.round(22*w*h/4),ink='#1b140e'; + for(let i=0;i{ + const paw=(x,y,s,a)=>{g.save();g.translate(x,y);g.rotate(a);g.fillStyle='rgba(255,255,255,.95)';g.beginPath();g.ellipse(-s*.25,0,s*.42,s*.48,0,0,TAU);g.fill(); + for(const [tx,ty] of[[.42,-.5],[.66,-.17],[.66,.17],[.42,.5]]){g.beginPath();g.ellipse(tx*s,ty*s,s*.17,s*.14,0,0,TAU);g.fill()}g.restore()}; + if(P.panel==='side')for(let i=0;i<7;i++)paw(-1.35+i*.45,.12+(i%2?.13:-.05),.13,.15); + else if(P.panel==='top')for(let i=0;i<7;i++)paw(-1.35+i*.45,(i%2?.18:-.18)+Math.sin(i*.9)*.25,.15,(i%2?-.1:.1)); + else if(P.panel==='rear'){paw(-.3,.1,.14,Math.PI/2);paw(.3,.3,.14,Math.PI/2)} + }, + // 49 Big Waves: rolling waves along the bottom of the car, in pale shades of your team colour with white curls of foam + (g,P)=>{ + const band=(x0,x1,base,amp,flip)=>{ + const f=x=>base+amp*Math.sin(x*4.4)+amp*.3*Math.sin(x*9.1+1),S=flip?-1:1; + g.fillStyle=P.lt;g.globalAlpha=.8;g.beginPath();g.moveTo(x0,S*-1.2);for(let x=x0;x<=x1;x+=.03)g.lineTo(x,S*f(x));g.lineTo(x1,S*-1.2);g.closePath();g.fill();g.globalAlpha=1; + g.fillStyle=P.dk;g.globalAlpha=.55;g.beginPath();g.moveTo(x0,S*-1.2);for(let x=x0;x<=x1;x+=.03)g.lineTo(x,S*(f(x+.4)-amp*2.2));g.lineTo(x1,S*-1.2);g.closePath();g.fill();g.globalAlpha=1; + const pts=[];for(let x=x0;x<=x1;x+=.03)pts.push([x,S*f(x)]);line(g,pts,.035,'#f4f6ff'); + for(let k=Math.ceil((x0*4.4/Math.PI-.5)/2);;k++){const xc=(Math.PI*(2*k+.5))/4.4;if(xc>x1)break;if(xc0?-.3:.3,S>0?Math.PI*1.4:-Math.PI*1.4,S<0);g.lineWidth=.03;g.strokeStyle='#f4f6ff';g.stroke();dot(g,xc+.06,yc+S*.03,.02,'#f4f6ff')} + }; + if(P.panel==='side')band(-1.5,1.5,-.12,.07,0); + else if(P.panel==='top'){band(-1.5,1.5,-.7,.06,0);band(-1.5,1.5,-.7,.06,1)} + else band(-1,1,-.18,.06,0); + }, + // 50 Sunburst: pale rays fanning out from the nose + (g,P)=>{ + const fan=(x,y,n,r,a0,a1)=>{for(let i=0;i{ + const map=(x0,y0,x1,y1)=>{ + const pts=[],n=26;for(let i=0;i{for(let i=0;i<8;i++){const a=i*Math.PI/4,rr=i%2?r*.55:r;poly(g,[[x,y],[x+Math.cos(a-.2)*rr*.32,y+Math.sin(a-.2)*rr*.32],[x+Math.cos(a)*rr,y+Math.sin(a)*rr],[x+Math.cos(a+.2)*rr*.32,y+Math.sin(a+.2)*rr*.32]]);g.fillStyle=i%2?'#ecdcaa':'#e0b54a';g.fill();g.lineWidth=.012;g.strokeStyle='#6b4d1c';g.stroke()} + g.beginPath();g.arc(x,y,r*.75,0,TAU);g.lineWidth=.018;g.strokeStyle='#ecdcaa';g.stroke();dot(g,x,y,r*.08,'#6b4d1c')}; + if(P.panel==='side')map(-.7,-.2,.55,.55); + else if(P.panel==='top')rose(-.1,0,.5); + else if(P.panel==='rear'){line(g,[[-.12,.12],[.12,.36]],.05,'#ecdcaa');line(g,[[-.12,.36],[.12,.12]],.05,'#ecdcaa')} + }, + // 52 Eye Patch: a black patch over one headlight, its strap running back over the bonnet and down the sides + (g,P)=>{ + const K='#121318'; + if(P.panel==='front'){line(g,[[.18,.9],[.42,.42]],.09,K);line(g,[[.82,.4],[1.05,.2]],.09,K);g.beginPath();g.ellipse(.6,.26,.3,.22,-.15,0,TAU);g.fillStyle=K;g.fill();g.lineWidth=.02;g.strokeStyle='#4a4d58';g.setLineDash([.03,.03]);g.beginPath();g.ellipse(.6,.26,.25,.17,-.15,0,TAU);g.stroke();g.setLineDash([]);g.beginPath();g.ellipse(.52,.33,.08,.04,-.4,0,TAU);g.fillStyle='rgba(255,255,255,.22)';g.fill()} + else if(P.panel==='top')line(g,[[1.6,-.18],[.9,-.3],[.1,-1.1]],.11,K); + else if(P.panel==='side')line(g,[[.12,.95],[-.08,.3],[-.12,-.5]],.1,K); + }, + // 53 Tracksuit and Chain: two white stripes down each side, piping on the roof and a gold chain over the nose + (g,P)=>{ + const chain=(pts)=>{for(let i=0;i{ + const tie=(x,yTop,len,w,dir)=>{poly(g,[[x-w*.55,yTop],[x+w*.55,yTop],[x+w*.4,yTop-dir*w*.8],[x-w*.4,yTop-dir*w*.8]]);g.fillStyle=P.ac;g.fill(); + poly(g,[[x-w*.35,yTop-dir*w*.8],[x+w*.35,yTop-dir*w*.8],[x+w*.6,yTop-dir*len*.9],[x,yTop-dir*len],[x-w*.6,yTop-dir*len*.9]]);g.fill(); + g.save();g.clip();for(let k=0;k<8;k++){const yy=yTop-dir*(w+k*len*.12);line(g,[[x-w,yy],[x+w,yy-dir*w*.8]],.02,P.acInk==='#14161f'?'rgba(0,0,0,.25)':'rgba(255,255,255,.3)')}g.restore()}; + if(P.panel==='front'){poly(g,[[-1,.9],[-.45,.9],[0,-.3],[-.35,-.42],[-1,-.42]]);g.fillStyle=P.dkr;g.fill();poly(g,[[1,.9],[.45,.9],[0,-.3],[.35,-.42],[1,-.42]]);g.fill(); + poly(g,[[-.45,.9],[.45,.9],[0,-.3]]);g.fillStyle='#f6f6f6';g.fill();tie(0,.88,1.1,.16,1)} + else if(P.panel==='top'){poly(g,[[.3,-.6],[.3,.6],[1.5,0]]);g.fillStyle='#f6f6f6';g.fill();for(const s of[-1,1]){poly(g,[[.3,s*.6],[.3,s*1],[1.5,s*1],[1.5,s*.05]]);g.fillStyle=P.dkr;g.fill()} + g.save();g.transform(0,-1,1,0,0,0);tie(0,.35,1.15,.18,-1);g.restore()} + else if(P.panel==='side'){rect(g,-1.5,-.42,3,.16,P.dkr);rect(g,-1.5,-.26,3,.018,'#f6f6f6');for(const x of[.15,.35])dot(g,x,-.34,.03,'#c8ccd6')} + else{rect(g,-1,-.42,2,.16,P.dkr);rect(g,-.012,-.42,.024,.4,P.dkr)} + }, + // 55 Hazard Stripes: yellow and black bands along the sills and bumpers + (g,P)=>{ + const band=(x,y,w,h)=>{g.save();g.beginPath();g.rect(x,y,w,h);g.clip();rect(g,x,y,w,h,'#ffd21f');for(let k=x-h-1;k{ + const code=(x,y,w,h)=>{rect(g,x-.03,y-.05,w+.06,h+.1,'#f4f6ff');let k=x;while(k.35)rect(g,k,y+.04,b,h-.04,'#14161f');k+=b+.008}for(let i=0;i<5;i++)rect(g,x+i*w/5+.01,y-.03,w/5-.03,.022,'#14161f')}; + if(P.panel==='side')code(-1.3,.1,.55,.26); + else if(P.panel==='top'){g.save();g.transform(0,-1,1,0,-1,0);code(-.3,-.15,.6,.3);g.restore()} + else if(P.panel==='rear')code(-.25,.1,.5,.2); + }, + // 57 Synthwave Sunset: a striped sun going down behind a glowing pink grid + (g,P)=>{ + const sun=(x,y,r)=>{g.save();g.beginPath();g.arc(x,y,r,Math.PI,TAU);g.closePath();g.clip();const gr=g.createLinearGradient(0,y,0,y+r);gr.addColorStop(0,'#ff3fa4');gr.addColorStop(1,'#ffe45c');g.fillStyle=gr;g.fillRect(x-r,y,r*2,r); + for(let k=0;k<5;k++){const yy=y+r*(.06+k*.13),hh=r*(.075-k*.012);rect(g,x-r,yy,r*2,hh,P.base)}g.restore()}; + const grid=(x0,x1,y0,y1,vx)=>{g.save();g.beginPath();g.rect(x0,y0,x1-x0,y1-y0);g.clip();g.lineWidth=.016;g.strokeStyle='#ff5ce0'; + for(let k=0;k<7;k++){const y=y1-(y1-y0)*Math.pow(k/7,1.6);g.beginPath();g.moveTo(x0,y);g.lineTo(x1,y);g.stroke()} + for(let k=-10;k<=10;k++){g.beginPath();g.moveTo(vx,y1);g.lineTo(vx+k*.35,y0);g.stroke()}g.restore();line(g,[[x0,y1],[x1,y1]],.03,'#ffb0f0')}; + if(P.panel==='side'){sun(0,.02,.46);grid(-1.5,1.5,-.42,.02,0)} + else if(P.panel==='top'){g.save();g.globalAlpha=.75;grid(-1.5,1.5,-1,1,1.6);g.restore()} + else grid(-1,1,-.42,.05,0); + }, + // 58 Polka Dots: white dots, evenly spaced + (g,P)=>{ + const s=.22;for(let j=0;P.v0+j*s*.87{ + const W='rgba(255,255,255,.95)'; + const staff=(x0,x1,y,gap,n,flip)=>{for(let k=0;k<5;k++)rect(g,x0,y+k*gap-.006,x1-x0,.012,W); + const S=flip?-1:1;let last=null;for(let i=0;i{ + const drop=(x,y,s,a)=>{g.save();g.translate(x,y);g.rotate(a);g.scale(s,s); + const path=k=>{g.beginPath();g.moveTo(0,-.5*k);g.bezierCurveTo(.6*k,-.5*k,.65*k,.35*k,.1*k,.42*k);g.bezierCurveTo(-.25*k,.5*k,-.55*k,.85*k,-.2*k,1.25*k);g.bezierCurveTo(-.75*k,1.05*k,-.75*k,.4*k,-.5*k,0);g.bezierCurveTo(-.4*k,-.3*k,-.25*k,-.5*k,0,-.5*k);g.closePath()}; + path(1);g.fillStyle=P.lt;g.globalAlpha=.7;g.fill();g.globalAlpha=1;g.lineWidth=.06;g.strokeStyle='#f4f6ff';g.stroke();path(.55);g.fillStyle=P.ac;g.fill(); + dot(g,0,0,.12,'#f4f6ff');for(let i=0;i<9;i++){const t=i/9*TAU;dot(g,Math.cos(t)*.78,Math.sin(t)*.72+.1,.045,'#f4f6ff')}g.restore()}; + const w=P.u1-P.u0,h=P.v1-P.v0,n=Math.max(2,Math.round(7*w*h/4)); + for(let i=0;i{ + const dw=.5,dh=.62; + for(let j=-1;P.v0+j*dh/2{ + const strap=(x0,y0,x1,y1)=>{rect(g,x0,y0,x1-x0,y1-y0,'#17151b');g.setLineDash([.03,.025]);g.lineWidth=.01;g.strokeStyle='#c8ccd6';const vert=y1-y0>x1-x0; + if(vert){for(const x of[x0+.03,x1-.03]){g.beginPath();g.moveTo(x,y0);g.lineTo(x,y1);g.stroke()}}else{for(const y of[y0+.03,y1-.03]){g.beginPath();g.moveTo(x0,y);g.lineTo(x1,y);g.stroke()}}g.setLineDash([])}; + const plate=(x,y,w,h,gem)=>{g.beginPath();g.ellipse(x,y,w,h,0,0,TAU);const gr=g.createRadialGradient(x-w*.3,y+h*.3,.01,x,y,Math.max(w,h));gr.addColorStop(0,'#fff6c2');gr.addColorStop(.5,'#e9b93a');gr.addColorStop(1,'#9a6a14');g.fillStyle=gr;g.fill();g.lineWidth=.02;g.strokeStyle='#6b4a0c';g.stroke(); + g.beginPath();g.ellipse(x,y,w*.8,h*.78,0,0,TAU);g.lineWidth=.012;g.strokeStyle='#fff2b0';g.stroke(); + for(let i=0;i<8;i++){const a=i/8*TAU;starPath(g,x+Math.cos(a)*w*.6,y+Math.sin(a)*h*.58,Math.min(w,h)*.09,5,.45,-Math.PI/2);g.fillStyle='#fff6c2';g.fill()} + dot(g,x,y,Math.min(w,h)*.3,'#6b4a0c');dot(g,x,y,Math.min(w,h)*.26,gem);dot(g,x-Math.min(w,h)*.08,y+Math.min(w,h)*.09,Math.min(w,h)*.08,'rgba(255,255,255,.75)')}; + if(P.panel==='side'){strap(-1.5,-.12,1.5,.18);plate(-.05,.06,.42,.3,'#d8262f');for(const x of[-.85,.75])plate(x,.03,.15,.13,'#2e7bff')} + else if(P.panel==='top'){strap(-.2,-1,.16,1);plate(-.02,0,.3,.34,'#d8262f')} + else strap(-1,-.12,1,.18); } ]; // paints one decal picture: every panel filled with the team colour, then the painter on top of each @@ -590,6 +810,25 @@ function anchor(inner,body){ } let _xl=null,_xs=null; const extraMat=gl=>gl?(_xs||(_xs=new THREE.MeshStandardMaterial({vertexColors:true,roughness:.55,metalness:.15,envMap:G.stadiumEnv(),envMapIntensity:1}))):(_xl||(_xl=new THREE.MeshLambertMaterial({vertexColors:true}))); +// the Tricorn topper's brim: three upturned walls, one point to the front, whose top edges arch up between the points +// (so from the front the hat shows its proper arched outline). R: how far the points are from the middle; h: wall height. +function tricornPt(R,h,k,t,top){ + const a0=Math.PI/2+k*TAU/3,a1=a0+TAU/3,ax=Math.cos(a0)*R,az=Math.sin(a0)*R,bx=Math.cos(a1)*R,bz=Math.sin(a1)*R; + const mx=(ax+bx)/2,mz=(az+bz)/2,ml=Math.hypot(mx,mz),bow=Math.sin(Math.PI*t)*R*.14; + const x=lerp(ax,bx,t)+mx/ml*bow,z=lerp(az,bz,t)+mz/ml*bow; + if(!top)return[x*.9,0,z*.9]; + const s=Math.sin(Math.PI*t),out=1+.08*s;return[x*out,h*(.3+.7*Math.pow(s,.7)),z*out]; +} +function tricornGeo(R,h){ + const N=12,pos=[],idx=[]; + for(const inner of[0,1])for(let k=0;k<3;k++){ + const base=pos.length/3,sh=inner?.985:1; + for(let i=0;i<=N;i++){const t=i/N,b=tricornPt(R,h,k,t,0),u=tricornPt(R,h,k,t,1);pos.push(b[0]*sh,b[1],b[2]*sh,u[0]*sh,u[1],u[2]*sh)} + for(let i=0;i{b.sph(.12,0xd8ff3f,x,y,z);b.tor(.118,.012,0xffffff,x,y,z,.5,0,.4)}, /* 2 Gold Star */ (b,x,y,z)=>{b.sph(.07,0xffd23f,x,y,z,1,1,.6);for(let i=0;i<5;i++){const a=i/5*TAU;b.add(new THREE.ConeGeometry(.055,.13,4),0xffd23f,x+Math.sin(a)*.1,y+Math.cos(a)*.1,z,0,0,-a,1,1,.6)}}, @@ -603,7 +842,45 @@ const TOPPERS=[null, /* 9 Baseball */ (b,x,y,z)=>{b.sph(.12,0xf6f4ea,x,y,z);for(const s of[-1,1])b.tor(.085,.009,0xd8262f,x+s*.06,y,z,0,Math.PI/2,s*.3)}, /* 10 Anchor */ (b,x,y,z)=>{const c=0x5a6170;b.cyl(.014,.014,.24,c,x,y,z,0,0,0,6);b.box(.14,.022,.022,c,x,y+.07,z);b.tor(.08,.014,c,x,y-.04,z,0,0,0);b.tor(.03,.01,c,x,y+.14,z)}, /* 11 Robot Head */ (b,x,y,z)=>{b.box(.2,.16,.16,0xb8bccf,x,y,z);for(const s of[-1,1]){b.sph(.026,0x3fd2ff,x+s*.05,y+.015,z+.08,1,1,.4);b.cyl(.025,.025,.03,0x6b7280,x+s*.11,y,z,0,0,Math.PI/2,8)}b.box(.1,.02,.01,0x15171b,x,y-.04,z+.081);b.cyl(.006,.006,.08,0x6b7280,x,y+.12,z,0,0,0,5);b.sph(.02,0xff3b3b,x,y+.17,z)}, - /* 12 Parrot */ (b,x,y,z)=>{b.sph(.075,0x2ecc5a,x,y,z,1,1.4,1);b.sph(.06,0x2ecc5a,x,y+.12,z+.02);b.add(new THREE.ConeGeometry(.025,.07,6),0xffd23f,x,y+.11,z+.09,Math.PI/2+.4,0,0);for(const s of[-1,1]){b.sph(.035,0xd8262f,x+s*.065,y,z,.5,1.4,1);b.sph(.012,0x14161f,x+s*.035,y+.14,z+.05)}b.add(new THREE.ConeGeometry(.035,.16,4),0x2e7bff,x,y-.13,z-.05,Math.PI-.4,0,0)} + /* 12 Parrot */ (b,x,y,z)=>{b.sph(.075,0x2ecc5a,x,y,z,1,1.4,1);b.sph(.06,0x2ecc5a,x,y+.12,z+.02);b.add(new THREE.ConeGeometry(.025,.07,6),0xffd23f,x,y+.11,z+.09,Math.PI/2+.4,0,0);for(const s of[-1,1]){b.sph(.035,0xd8262f,x+s*.065,y,z,.5,1.4,1);b.sph(.012,0x14161f,x+s*.035,y+.14,z+.05)}b.add(new THREE.ConeGeometry(.035,.16,4),0x2e7bff,x,y-.13,z-.05,Math.PI-.4,0,0)}, + // ---- third wave (Nov 2026). Each stays within about a quarter of a unit of the aerial's tip: small enough not to cover the ball. + /* 13 Foam Finger */ (b,x,y,z,ac)=>{b.box(.17,.13,.08,ac,x,y,z);b.cyl(.038,.042,.16,ac,x+.04,y+.13,z,0,0,0,8);b.sph(.038,ac,x+.04,y+.21,z,1,1,1,8);b.sph(.045,ac,x-.1,y+.03,z,1.1,.75,.9,8); + for(const dx of[-.04,0])b.sph(.034,ac,x+dx,y+.065,z+.035,1,.9,1,8);b.box(.19,.05,.1,0xffffff,x,y-.09,z)}, + /* 14 Trophy */ (b,x,y,z)=>{const G=0xffc83a,D=0xc98a12;b.box(.14,.05,.14,0x3a2a1a,x,y-.1,z);b.cyl(.04,.06,.03,G,x,y-.06,z,0,0,0,10);b.cyl(.016,.02,.08,D,x,y-.01,z,0,0,0,8); + b.cyl(.1,.045,.13,G,x,y+.09,z,0,0,0,14);b.tor(.1,.012,D,x,y+.155,z,Math.PI/2,0,0);for(const s of[-1,1])b.tor(.042,.011,G,x+s*.105,y+.1,z,0,0,0);b.sph(.02,0xffffff,x,y+.09,z+.085,1,1,.4,6)}, + /* 15 Whistle */ (b,x,y,z)=>{const S=0xc8d2dc;b.cyl(.06,.06,.1,S,x,y,z,0,0,Math.PI/2,14);b.box(.11,.045,.05,S,x+.1,y+.035,z);b.box(.035,.012,.03,0x2a2f3a,x+.01,y+.058,z);b.tor(.025,.008,0xd8262f,x-.075,y+.03,z,Math.PI/2,0,0);b.sph(.02,0xffffff,x-.02,y+.03,z+.05,1,1,.4,6)}, + /* 16 Tricorn */ (b,x,y,z)=>{const N=0x2a2440,Au=0xe0b040;b.add(tricornGeo(.2,.15),N,x,y-.04,z);b.sph(.13,N,x,y-.02,z,1,.85,1); + b.add(new THREE.TubeGeometry(tricornRim(.2,.15),48,.011,5,true),Au,x,y-.04,z);b.sph(.03,0xd8262f,x+.1,y+.08,z+.04,1,1,.5,8);b.sph(.016,Au,x+.1,y+.08,z+.055,1,1,.5,6)}, + /* 17 Eye Patch Flag */ (b,x,y,z)=>{b.cyl(.008,.008,.24,0xc8d2dc,x,y+.1,z,0,0,0,5);b.sph(.018,0xe0b040,x,y+.23,z,1,1,1,6);b.box(.012,.17,.27,0x15161c,x,y+.12,z-.14); + for(const s of[-1,1]){b.sph(.05,0xf2ead0,x+s*.007,y+.11,z-.15,.2,1,1.25,10);b.sph(.04,0x15161c,x+s*.011,y+.11,z-.15,.2,1,1.25,10);b.box(.016,.012,.29,0xf2ead0,x+s*.006,y+.12,z-.14,.55,0,0)}}, + /* 18 Halo */ (b,x,y,z)=>{b.sph(.02,0xfff2b0,x,y,z,1,1,1,6);b.tor(.12,.022,0xffe680,x,y+.1,z,Math.PI/2,0,0);b.tor(.12,.008,0xffffff,x,y+.122,z,Math.PI/2,0,0)}, + /* 19 Pizza Slice */ (b,x,y,z)=>{b.add(new THREE.CylinderGeometry(.2,.2,.03,8,1,false,Math.PI-.38,.76),0xffd25a,x,y-.04,z,Math.PI/2,0,0);b.add(new THREE.TorusGeometry(.19,.022,5,8,.8),0xd99a4a,x,y-.04,z,0,0,Math.PI/2-.4); + for(const [dx,dy] of[[-.02,.1],[.015,.065],[-.03,.155],[.035,.145]])for(const s of[-1,1])b.cyl(.022,.022,.008,0xc0392b,x+dx,y-.04+dy,z+s*.017,Math.PI/2,0,0,8)}, + /* 20 Flying Saucer */ (b,x,y,z)=>{b.sph(.17,0xb8c0cc,x,y,z,1,.24,1,18);b.sph(.07,0x8fe6ff,x,y+.035,z,1,.8,1,12);b.sph(.025,0x7be07b,x,y+.05,z,1,1,1,6);for(let i=0;i<8;i++){const a=i/8*TAU;b.sph(.016,i%2?0xffe23f:0xff5c9a,x+Math.cos(a)*.15,y,z+Math.sin(a)*.15,1,1,1,6)}}, + /* 21 Cactus */ (b,x,y,z)=>{b.cyl(.075,.055,.08,0xc0643a,x,y-.06,z,0,0,0,10);b.cyl(.078,.078,.02,0xd9774a,x,y-.02,z,0,0,0,10);b.cyl(.042,.045,.2,0x3e9a4a,x,y+.08,z,0,0,0,10);b.sph(.042,0x3e9a4a,x,y+.18,z,1,1,1,10); + for(const s of[-1,1]){b.cyl(.02,.02,.06,0x3e9a4a,x+s*.06,y+.06+(s>0?.02:0),z,0,0,Math.PI/2,6);b.cyl(.022,.022,.07,0x3e9a4a,x+s*.09,y+.1+(s>0?.02:0),z,0,0,0,8);b.sph(.022,0x3e9a4a,x+s*.09,y+.135+(s>0?.02:0),z,1,1,1,6)}b.sph(.024,0xff6fae,x,y+.225,z,1,.7,1,8)}, + /* 22 Wizard Hat */ (b,x,y,z)=>{const N=0x2a2a7a;b.cyl(.19,.19,.018,N,x,y-.02,z,0,0,0,16);b.cyl(.075,.12,.15,N,x,y+.06,z,0,0,0,12);b.cyl(.122,.122,.025,0xe0b040,x,y,z,0,0,0,12); + b.add(new THREE.ConeGeometry(.076,.17,12),N,x-.03,y+.2,z,0,0,.35);for(const [dx,dy,dz] of[[.08,.06,.07],[-.07,.1,.06],[.02,.14,-.07],[-.03,.03,-.11]])b.sph(.016,0xffe23f,x+dx,y+dy,z+dz,1,1,1,6);b.sph(.018,0xffe23f,x-.09,y+.28,z,1,1,1,6)}, + /* 23 Smiley Ball */ (b,x,y,z)=>{b.sph(.12,0xffe23f,x,y,z);for(const s of[-1,1])b.sph(.016,0x14161f,x+s*.038,y+.03,z+.108,1,1.7,.6,6);b.add(new THREE.TorusGeometry(.05,.009,5,10,Math.PI),0x14161f,x,y-.005,z+.103,-.35,0,Math.PI)}, + /* 24 Racing Helmet */ (b,x,y,z,ac)=>{b.sph(.12,ac,x,y,z,1,.92,1.05);b.sph(.1,0x15171b,x,y+.005,z+.055,.92,.45,.6,12);b.tor(.121,.012,0xffffff,x,y,z,0,Math.PI/2,0);b.box(.14,.03,.08,0x2a2f3a,x,y-.1,z+.03)}, + /* 25 Baseball Cap */ (b,x,y,z,ac)=>{b.add(new THREE.SphereGeometry(.11,14,7,0,TAU,0,Math.PI/2),ac,x,y-.03,z,0,0,0,1,.75,1);b.cyl(.112,.112,.02,ac,x,y-.035,z,0,0,0,14); + b.add(new THREE.CylinderGeometry(.1,.1,.014,12,1,false,-Math.PI/2,Math.PI),mixHex(ac,0,.3),x,y-.03,z+.07,-.12,0,0,1,1,1.2);b.sph(.016,0xffffff,x,y+.055,z,1,.6,1,6)}, + /* 26 Boxing Glove */ (b,x,y,z)=>{const R=0xd8262f;b.sph(.1,R,x,y+.03,z,1,1.15,1.1,12);b.sph(.045,R,x+.085,y+.0,z+.05,1,1.3,1,8);b.cyl(.07,.075,.08,0xffffff,x,y-.1,z,0,0,0,12);b.box(.012,.06,.012,0xffffff,x,y+.04,z+.11)}, + /* 27 Golf Ball */ (b,x,y,z)=>{b.add(new THREE.ConeGeometry(.025,.1,8),0xe8c9a0,x,y-.04,z,Math.PI,0,0);b.cyl(.03,.02,.012,0xe8c9a0,x,y+.01,z,0,0,0,8);b.sph(.085,0xffffff,x,y+.09,z,1,1,1,14); + for(let i=0;i<10;i++){const a=i*2.4,h=(i/10)*1.6-.8,r=Math.sqrt(1-h*h);b.sph(.012,0xdfe3ea,x+Math.cos(a)*r*.083,y+.09+h*.083,z+Math.sin(a)*r*.083,1,1,1,4)}}, + /* 28 Mini Fedora */ (b,x,y,z)=>{b.cyl(.17,.17,.015,0x5f6372,x,y-.03,z,0,0,0,16);b.cyl(.085,.1,.11,0x6b6f7c,x,y+.03,z,0,0,0,12);b.cyl(.102,.102,.028,0x15161c,x,y-.01,z,0,0,0,12);b.box(.025,.02,.14,0x5f6372,x,y+.085,z)}, + /* 29 Mini Top Hat */ (b,x,y,z,ac)=>{b.cyl(.15,.15,.016,0x22232b,x,y-.03,z,0,0,0,16);b.cyl(.09,.085,.18,0x22232b,x,y+.06,z,0,0,0,14);b.cyl(.087,.087,.035,ac,x,y,z,0,0,0,14)}, + /* 30 Mini Cone */ (b,x,y,z)=>{b.box(.16,.02,.16,0xff7a1f,x,y-.04,z);b.cyl(.02,.07,.18,0xff7a1f,x,y+.06,z,0,0,0,12);b.cyl(.044,.054,.04,0xffffff,x,y+.07,z,0,0,0,12)}, + /* 31 Propeller Cap */ (b,x,y,z)=>{[0xd93636,0xffd23f,0x2e7bff,0x46c34a].forEach((c,i)=>b.add(new THREE.SphereGeometry(.11,5,6,i*Math.PI/2,Math.PI/2,0,Math.PI/2),c,x,y-.03,z,0,0,0,1,.8,1)); + b.add(new THREE.CylinderGeometry(.1,.1,.012,12,1,false,-Math.PI/2,Math.PI),0x2e7bff,x,y-.035,z+.07,0,0,0,1,1,1.1);b.cyl(.008,.008,.06,0xc8d2dc,x,y+.08,z,0,0,0,5);b.box(.24,.008,.04,0xffd23f,x,y+.11,z,0,.6,0);b.sph(.016,0xd93636,x,y+.115,z,1,1,1,6)}, + /* 32 Little Chef Hat */ (b,x,y,z)=>{b.cyl(.085,.085,.1,0xffffff,x,y,z,0,0,0,12);for(let i=0;i<6;i++){const a=i/6*TAU;b.sph(.055,0xffffff,x+Math.cos(a)*.06,y+.08,z+Math.sin(a)*.06,1,1,1,8)}b.sph(.07,0xffffff,x,y+.1,z,1,1,1,10);b.cyl(.087,.087,.02,0xe6e8ee,x,y-.04,z,0,0,0,12)}, + /* 33 Royal Crown */ (b,x,y,z)=>{const G=0xffc83a;b.sph(.085,0x8a1030,x,y+.02,z,1,.7,1,12);b.cyl(.105,.095,.07,G,x,y-.01,z,0,0,0,12,true);b.tor(.1,.012,0xc98a12,x,y-.045,z,Math.PI/2,0,0); + for(let i=0;i<6;i++){const a=i/6*TAU;b.add(new THREE.ConeGeometry(.028,.08,4),G,x+Math.cos(a)*.1,y+.06,z+Math.sin(a)*.1);b.sph(.013,0xffffff,x+Math.cos(a)*.1,y+.105,z+Math.sin(a)*.1,1,1,1,6);b.sph(.017,[0xd8262f,0x2e7bff,0x2ecc5a][i%3],x+Math.cos(a)*.105,y-.01,z+Math.sin(a)*.105,1,1,.6,6)} + b.sph(.02,G,x,y+.08,z,1,1,1,6);b.add(new THREE.ConeGeometry(.012,.05,4),G,x,y+.11,z)}, + /* 34 American Football */ (b,x,y,z)=>{b.sph(.065,0x8a4a22,x,y,z,1,1,1.7,14);for(const s of[-1,1])b.tor(.048,.007,0xffffff,x,y,z+s*.075,0,0,0);b.box(.012,.008,.08,0xffffff,x,y+.065,z);for(let i=-2;i<=2;i++)b.box(.03,.008,.008,0xffffff,x,y+.065,z+i*.016)}, + /* 35 Bowling Pin */ (b,x,y,z)=>{b.sph(.06,0xffffff,x,y,z,1,1.35,1,12);b.cyl(.03,.045,.08,0xffffff,x,y+.09,z,0,0,0,10);b.sph(.042,0xffffff,x,y+.16,z,1,1.1,1,10);for(const h of[.1,.115])b.tor(.031,.006,0xd8262f,x,y+h,z,Math.PI/2,0,0)}, + /* 36 Satellite Dish */ (b,x,y,z)=>{b.box(.03,.08,.03,0x8a93a8,x,y,z);b.add(new THREE.SphereGeometry(.13,16,8),0xe6e9ef,x,y+.1,z-.02,-.75,0,0,1,.26,1);b.tor(.128,.008,0x9aa3b0,x,y+.1,z-.02,Math.PI/2-.75,0,0); + b.cyl(.006,.006,.12,0x8a93a8,x,y+.12,z+.03,-.75,0,0,5);b.sph(.018,0xd8262f,x,y+.16,z+.07,1,1,1,6)} ]; const HATS=[null, /* 1 Traffic Cone */ (b,y,z)=>{b.box(.56,.04,.56,0xff7a1f,0,y+.02,z);b.cyl(.05,.24,.58,0xff7a1f,0,y+.33,z,0,0,0,14);b.cyl(.125,.165,.12,0xffffff,0,y+.33,z,0,0,0,14)}, @@ -669,7 +946,8 @@ function engine(){return ENGINES[cur[6]]||null} // sprite. It is one draw call however many are alive, and none while nothing is (the object is hidden). Positions, // speeds and ages live in typed arrays made once, so emitting allocates nothing. // The first TRAIL_SLOTS x TRAIL_MAX sprites belong to boost trails, a fixed share per car; the rest to goal explosions. -const CELL={glow:0,disc:1,ring:2,bubble:3,spark:4,star:5,heart:6,note:7,square:8,flake:9,leaf:10,feather:11,duck:12,popcorn:13,toast:14,bill:15,batA:16,batB:17,zero:18,one:19,drop:20,zap:21,flame:22,birdA:23,birdB:24,candy:25,strip:26,shard:27,puff:28,coin:29,notes:30,seed:31,rainbow:32,splat:33,ice:34,rock:35}; +const CELL={glow:0,disc:1,ring:2,bubble:3,spark:4,star:5,heart:6,note:7,square:8,flake:9,leaf:10,feather:11,duck:12,popcorn:13,toast:14,bill:15,batA:16,batB:17,zero:18,one:19,drop:20,zap:21,flame:22,birdA:23,birdB:24,candy:25,strip:26,shard:27,puff:28,coin:29,notes:30,seed:31,rainbow:32,splat:33,ice:34,rock:35, + soccer:36,basket:37,tennis:38,puck:39,gem:40,paw:41,plane:42,gear:43,nut:44,pizza:45,blossom:46,ghost:47,balloon:48}; let sheetTex=null; function sheet(){ if(sheetTex)return sheetTex; @@ -712,6 +990,25 @@ function sheet(){ cell(33,()=>{const r=rng(33);blob(g,0,0,.62,.2,r,12);fill(W);for(let i=0;i<7;i++){const a=i/7*TAU+.3;circ(Math.cos(a)*.78,Math.sin(a)*.74,.1+r()*.08);fill(W)}}); cell(34,()=>{g.beginPath();g.moveTo(-.15,-.92);g.lineTo(.6,-.1);g.lineTo(.2,.9);g.lineTo(-.6,.3);g.closePath();const gr=g.createLinearGradient(-.6,-.9,.6,.9);gr.addColorStop(0,'#ffffff');gr.addColorStop(1,'#8fd0ff');fill(gr);g.beginPath();g.moveTo(-.15,-.92);g.lineTo(.2,.9);stroke('rgba(255,255,255,.8)',.06)}); cell(35,()=>{g.beginPath();g.moveTo(-.7,-.2);g.lineTo(-.2,-.75);g.lineTo(.55,-.5);g.lineTo(.8,.2);g.lineTo(.2,.75);g.lineTo(-.55,.5);g.closePath();fill('#6b5a52');g.beginPath();g.moveTo(-.2,-.75);g.lineTo(.1,0);g.lineTo(.8,.2);g.moveTo(.1,0);g.lineTo(-.55,.5);stroke('#3a302c',.08)}); + // ---- third wave (Nov 2026): sports balls, a puck, a gem, a paw, a paper plane, spare parts, pizza, a blossom, a ghost and a balloon + cell(36,()=>{circ(0,0,.86);fill('#fafafa');g.save();circ(0,0,.86);g.clip();const pent=(x,y,r,a)=>{g.beginPath();for(let i=0;i<5;i++){const t=a+i*TAU/5;g[i?'lineTo':'moveTo'](x+Math.cos(t)*r,y+Math.sin(t)*r)}g.closePath();fill(K)}; + pent(0,0,.3,-Math.PI/2);for(let i=0;i<5;i++){const t=-Math.PI/2+Math.PI/5+i*TAU/5;pent(Math.cos(t)*.86,Math.sin(t)*.86,.3,t+Math.PI);g.beginPath();g.moveTo(Math.cos(t)*.3,Math.sin(t)*.3);g.lineTo(Math.cos(t)*.6,Math.sin(t)*.6);stroke(K,.06)}g.restore();circ(0,0,.86);stroke('#9aa3b0',.06)}); + cell(37,()=>{circ(0,0,.86);fill('#e8742a');g.save();circ(0,0,.86);g.clip();g.beginPath();g.moveTo(0,-.9);g.lineTo(0,.9);g.moveTo(-.9,0);g.lineTo(.9,0);stroke('#2a1810',.08);for(const s of[-1,1]){g.beginPath();g.arc(s*1.25,0,.85,0,TAU);stroke('#2a1810',.08)}g.restore();g.beginPath();g.arc(-.25,-.3,.45,Math.PI*1.1,Math.PI*1.5);stroke('rgba(255,255,255,.35)',.1)}); + cell(38,()=>{circ(0,0,.8);fill('#d8ff3f');g.save();circ(0,0,.8);g.clip();for(const s of[-1,1]){g.beginPath();g.arc(s*1.15,0,.72,0,TAU);stroke('#ffffff',.11)}g.restore()}); + cell(39,()=>{g.beginPath();g.ellipse(0,.2,.85,.36,0,0,TAU);fill('#14161b');g.fillStyle='#1d2027';g.fillRect(-.85,-.12,1.7,.32);g.beginPath();g.ellipse(0,-.12,.85,.36,0,0,TAU);fill('#2b2f38');g.beginPath();g.ellipse(0,-.12,.85,.36,0,0,TAU);stroke('#5a6070',.05)}); + cell(40,()=>{const P=[[-.8,-.3],[-.48,-.66],[.48,-.66],[.8,-.3],[0,.86]];g.beginPath();P.forEach((p,i)=>g[i?'lineTo':'moveTo'](p[0],p[1]));g.closePath();fill('#e8e8e8'); + g.beginPath();g.moveTo(-.8,-.3);g.lineTo(.8,-.3);g.lineTo(0,.86);g.closePath();fill('#c4c4c4');g.beginPath();g.moveTo(-.28,-.3);g.lineTo(.28,-.3);g.lineTo(0,.86);g.closePath();fill('#f6f6f6'); + g.beginPath();g.moveTo(-.48,-.66);g.lineTo(-.28,-.3);g.lineTo(.28,-.3);g.lineTo(.48,-.66);g.closePath();fill('#ffffff');g.beginPath();P.forEach((p,i)=>g[i?'lineTo':'moveTo'](p[0],p[1]));g.closePath();stroke('#8a8a8a',.05);starPath(g,-.4,-.48,.25,4,.2,0);fill(W)}); + cell(41,()=>{g.beginPath();g.ellipse(0,.3,.42,.36,0,0,TAU);fill(W);for(const [x,y] of[[-.58,-.12],[-.22,-.5],[.22,-.5],[.58,-.12]]){g.beginPath();g.ellipse(x,y,.17,.22,x*.5,0,TAU);fill(W)}}); + cell(42,()=>{g.beginPath();g.moveTo(-.9,.15);g.lineTo(.92,-.2);g.lineTo(-.45,.55);g.closePath();fill(W);g.beginPath();g.moveTo(-.9,.15);g.lineTo(.92,-.2);g.lineTo(-.25,.18);g.closePath();fill('#c8d0dc');g.beginPath();g.moveTo(-.9,.15);g.lineTo(.92,-.2);g.lineTo(-.6,-.12);g.closePath();fill('#e6ebf2')}); + cell(43,()=>{g.fillStyle=W;for(let i=0;i<8;i++){g.save();g.rotate(i*Math.PI/4);g.fillRect(-.14,-.85,.28,.3);g.restore()}circ(0,0,.62);fill(W);circ(0,0,.42);fill('#c8ced8');g.globalCompositeOperation='destination-out';circ(0,0,.2);fill('#000');g.globalCompositeOperation='source-over'}); + cell(44,()=>{g.beginPath();for(let i=0;i<6;i++){const t=i*Math.PI/3;g[i?'lineTo':'moveTo'](Math.cos(t)*.72,Math.sin(t)*.72)}g.closePath();fill('#d6dae2');stroke(W,.08);g.globalCompositeOperation='destination-out';circ(0,0,.3);fill('#000');g.globalCompositeOperation='source-over';circ(0,0,.3);stroke('#9aa3b0',.08)}); + cell(45,()=>{g.beginPath();g.moveTo(0,.9);g.lineTo(-.6,-.55);g.quadraticCurveTo(0,-.78,.6,-.55);g.closePath();fill('#ffd25a');g.beginPath();g.moveTo(-.66,-.5);g.quadraticCurveTo(0,-.95,.66,-.5);stroke('#d99a4a',.22); + for(const [x,y] of[[-.18,-.25],[.2,-.2],[0,.25],[-.05,-.6]]){circ(x,y,.14);fill('#c0392b')}for(const [x,y] of[[.15,.05],[-.25,.0]]){circ(x,y,.05);fill('#3e8a2e')}}); + cell(46,()=>{for(let i=0;i<5;i++){g.save();g.rotate(i*TAU/5);g.beginPath();g.ellipse(0,-.48,.3,.44,0,0,TAU);fill(W);g.beginPath();g.moveTo(-.06,-.9);g.lineTo(0,-.78);g.lineTo(.06,-.9);stroke('rgba(0,0,0,.25)',.05);g.restore()}circ(0,0,.2);fill('#fff3a0')}); + cell(47,()=>{g.beginPath();g.moveTo(-.6,.75);g.lineTo(-.6,-.1);g.arc(0,-.1,.6,Math.PI,TAU);g.lineTo(.6,.75);for(let i=0;i<4;i++){const x=.6-(i+.5)*.3;g.quadraticCurveTo(x+.08,.55,x,.75);g.quadraticCurveTo(x-.08,.95,x-.15,.75)}g.closePath();fill(W); + for(const s of[-1,1]){g.beginPath();g.ellipse(s*.2,-.15,.09,.14,0,0,TAU);fill(K)}g.beginPath();g.ellipse(0,.2,.1,.13,0,0,TAU);fill(K)}); + cell(48,()=>{g.beginPath();g.ellipse(0,-.2,.56,.68,0,0,TAU);fill('#e2e2e2');g.beginPath();g.ellipse(-.2,-.45,.14,.22,-.4,0,TAU);fill(W);g.beginPath();g.moveTo(-.08,.5);g.lineTo(.08,.5);g.lineTo(0,.42);fill('#e2e2e2');g.beginPath();g.moveTo(0,.5);g.quadraticCurveTo(.2,.7,0,.95);stroke(W,.05)}); sheetTex=new THREE.CanvasTexture(cv);sheetTex.flipY=false;sheetTex.generateMipmaps=false;sheetTex.minFilter=THREE.LinearFilter; return sheetTex; } @@ -817,7 +1114,25 @@ const TRAILS=[null, /* 29 Sea Spray */ {rate:80,life:.55,cells:[CELL.drop,CELL.disc,CELL.bubble],cols:[0x5cc8ff,0xffffff,0xbfe9ff],size:[.25,.55],back:5,inh:0.78,spread:2.2,up:2.5,w:.4,o:O({grav:9,a:.85,bounce:0})}, /* 30 Circuit Sparks */ {rate:60,life:.55,cells:[CELL.square,CELL.spark],cols:[0x46e39a,0xffd23f,0xc8ffe0],size:[.25,.45],back:4,inh:0.78,spread:1.2,up:.3,w:.3,o:O({add:1,rot:0,fade:2})}, /* 31 Ticker Tape */ {rate:45,life:1,cells:[CELL.strip],cols:[0xffffff,0xffffff,0xffe9a8],size:[.35,.5],back:3,inh:0.7,spread:2.5,up:1.5,w:.3,o:O({grav:3,spin:6,wob:3,drag:1.2,bounce:0})}, - /* 32 Camera Flashes */ {rate:30,life:.3,cells:[CELL.star,CELL.glow],cols:[0xffffff,0xfff6c8],size:[.5,1.1],back:1.5,inh:0.75,spread:2.5,up:.6,w:.6,o:O({add:1,fade:2,rot:0})} + /* 32 Camera Flashes */ {rate:30,life:.3,cells:[CELL.star,CELL.glow],cols:[0xffffff,0xfff6c8],size:[.5,1.1],back:1.5,inh:0.75,spread:2.5,up:.6,w:.6,o:O({add:1,fade:2,rot:0})}, + // ---- third wave (Nov 2026). Same limits as the others: about a second at most, small or see-through. + /* 33 Green Flame */ {rate:80,life:.32,cells:[CELL.flame,CELL.flame,CELL.glow],cols:[0xd8ff8a,0x46e39a,0x14a870],size:[.7,1.2],back:9,inh:0.8,spread:1.1,up:.3,w:.22,o:O({add:1,grow:-.6,fade:0,rot:0})}, + /* 34 Violet Flame */ {rate:70,life:.4,cells:[CELL.flame,CELL.flame,CELL.spark],cols:[0xffb0f8,0xb46cff,0xffffff],size:[.6,1.15],back:7,inh:0.8,spread:.9,up:.9,w:.2,o:O({add:1,grow:-.5,fade:2,rot:0,wob:2.5})}, + /* 35 Afterburner */ {rate:96,life:.26,cells:[CELL.glow,CELL.glow,CELL.disc,CELL.ring],cols:[0x8fd6ff,0xffffff,0xffffff,0xbfe8ff],size:[.45,.8],back:11,inh:0.9,spread:.25,up:0,w:.06,o:O({add:1,grow:-.55,fade:0,rot:0}),core:.3}, + /* 36 Sports Balls */ {rate:14,life:1.2,cells:[CELL.soccer,CELL.basket,CELL.tennis,CELL.soccer],cols:[0xffffff],size:[.6,.75],back:3,inh:0.72,spread:1.6,up:4,w:.2,o:O({grav:12,bounce:.55,spin:5})}, + /* 37 Cannon Smoke */ {rate:34,life:.75,cells:[CELL.puff,CELL.puff,CELL.glow],cols:[0xd0d4dc,0xb4bac6,0xffa040],size:[.4,.75],back:4,inh:0.7,spread:.9,up:.6,w:.25,o:O({a:.55,grow:1.1,drag:2,fade:0})}, + /* 38 Gems */ {rate:28,life:.95,cells:[CELL.gem,CELL.gem,CELL.gem,CELL.spark],cols:[0xff5c9a,0x5cc8ff,0x46e39a,0xffd23f,0xb46cff],size:[.35,.55],back:3,inh:0.72,spread:1.8,up:3,w:.25,o:O({grav:10,spin:4,bounce:.4})}, + /* 39 Paw Prints */ {rate:12,life:.9,cells:[CELL.paw],cols:[0xffffff,0xfff1e0],size:[.45,.55],back:1,inh:0.25,spread:0,up:.2,w:.35,o:O({rot:0,drag:3,a:.9})}, + /* 40 Paper Planes */ {rate:11,life:1.3,cells:[CELL.plane],cols:[0xffffff,0xeaf2ff,0xffe9a8],size:[.6,.8],back:3,inh:0.72,spread:1.2,up:1.5,w:.25,o:O({grav:-.4,wob:3,rot:0,drag:1})}, + /* 41 Spare Parts */ {rate:30,life:1,cells:[CELL.gear,CELL.nut,CELL.gear],cols:[0xc8d2dc,0x9aa3b0,0xffd23f],size:[.3,.5],back:3,inh:0.72,spread:1.8,up:3,w:.25,o:O({grav:13,spin:8,bounce:.45})}, + /* 42 Pizza Slices */ {rate:13,life:1.2,cells:[CELL.pizza],cols:[0xffffff],size:[.7,.85],back:3,inh:0.75,spread:1.5,up:5,w:.2,o:O({grav:11,spin:6,bounce:.3})}, + /* 43 Comet Tail */ {rate:96,life:.5,cells:[CELL.glow,CELL.glow,CELL.star,CELL.spark],cols:[0xfff2c2,0x8fd6ff,0xffffff,0xb8a6ff],size:[.45,.95],back:4,inh:0.92,spread:.35,up:0,w:.08,o:O({add:1,fade:0,grow:-.75})}, + /* 44 Cherry Blossoms */ {rate:34,life:1.1,cells:[CELL.blossom,CELL.blossom,CELL.seed],cols:[0xffc2dd,0xffffff,0xff9ac8],size:[.35,.6],back:3,inh:0.7,spread:1.8,up:1.2,w:.3,o:O({grav:1.6,spin:3,wob:3.5,drag:1})}, + /* 45 Ghosts */ {rate:9,life:1.3,cells:[CELL.ghost],cols:[0xffffff,0xe6f0ff],size:[.7,.9],back:2,inh:0.7,spread:1.2,up:.8,w:.3,o:O({grav:-2,wob:5,rot:0,drag:1,a:.82})}, + /* 46 Pixel Fire */ {rate:70,life:.45,cells:[CELL.square],cols:[0xffd23f,0xff8a1f,0xff3b1c,0xfff2a8],size:[.25,.45],back:6,inh:0.8,spread:1,up:1.5,w:.2,o:O({grav:-4,grow:-.6,rot:0})}, + /* 47 Ice Shards */ {rate:46,life:.6,cells:[CELL.ice,CELL.ice,CELL.flake],cols:[0xffffff,0xbfe4ff,0xe6f6ff],size:[.3,.55],back:4,inh:0.75,spread:1.4,up:1.5,w:.25,o:O({grav:8,spin:6,bounce:.2})}, + /* 48 Hockey Pucks */ {rate:14,life:1.1,cells:[CELL.puck],cols:[0xffffff],size:[.45,.55],back:5,inh:0.6,spread:1.4,up:2.5,w:.2,o:O({grav:14,bounce:.15,rot:0,drag:.4})}, + /* 49 Fire and Ice */ {rate:90,life:.42,cells:[CELL.flame,CELL.glow],cols:[0xff8a1f,0x8fd6ff],size:[.45,.8],back:7,inh:0.85,spread:.25,up:0,w:0,o:O({add:1,grow:-.5,fade:0,rot:0}),helix:.38} ]; const _f=new V3(),_r=new V3(),_u=new V3(); // emits what a trail owes for dt seconds from a nozzle at the back of a car at p, facing q, moving at v @@ -827,7 +1142,8 @@ function trailEmit(spr,R,st,no,p,q,v,dt,low,wind){ st.acc+=d.rate*(low?.6:1)*dt;let n=Math.floor(st.acc);st.acc-=n;if(n>8)n=8; const big=low?1.3:1,off=1.5+(d.off||0); for(let i=0;i!!(G.reduced&&G.reduced()); +const shk=(S,a)=>{if(!RM())S.shake(a)}; +const fanfare=(A,t,v,notes,len,type,g)=>notes.forEach((f,i)=>{A.tone(t+i*len,len*1.7,type||'square',f,f,(g||.045)*v);A.tone(t+i*len,len*1.7,'sine',f*2,f*2,(g||.045)*.4*v)}); +const fxShader=(vs,fs,u,o)=>new THREE.ShaderMaterial(Object.assign({uniforms:u,vertexShader:vs,fragmentShader:fs,transparent:true,depthWrite:false,side:THREE.DoubleSide},o||{})); +const _im=new THREE.Matrix4(),_iq=new THREE.Quaternion(),_ie=new THREE.Euler(),_is=new V3(),_ip=new V3(); +const inst=(im,i,x,y,z,rx,ry,rz,sx,sy,sz)=>{_iq.setFromEuler(_ie.set(rx||0,ry||0,rz||0));im.setMatrixAt(i,_im.compose(_ip.set(x,y,z),_iq,_is.set(sx==null?1:sx,sy==null?(sx==null?1:sx):sy,sz==null?(sx==null?1:sx):sz)))}; +// how big the arena is for a stage: the real one, or the garage preview's little pitch +const _dp=new V3(),_dq=new V3(),_ds=new V3(); +const area=S=>S.main?{w:G.AW,l:G.AL*2,c:23,k:1}:{w:30,l:60,c:6,k:.36}; +// a soap-film or glass look: bright, rainbow-tinted edges and a clear middle (the Bubble and the Snow Globe) +const FILM_VS='varying vec3 vN,vV;void main(){vec4 mv=modelViewMatrix*vec4(position,1.);vV=-mv.xyz;vN=normalMatrix*normal;gl_Position=projectionMatrix*mv;}'; +const FILM_FS='uniform float uA,uT,uI;uniform vec3 uTint;varying vec3 vN,vV;void main(){float f=1.-abs(dot(normalize(vN),normalize(vV)));float r=pow(f,2.4);'+ + 'vec3 c=mix(uTint,.55+.45*cos(6.2831*(vec3(0.,.33,.67)+f*1.3+uT*.25)),uI);gl_FragColor=vec4(c*(r*1.1+.05)+vec3(1.)*pow(f,7.)*.5,1.)*uA;}'; +const filmMat=(tint,iri)=>fxShader(FILM_VS,FILM_FS,{uA:{value:0},uT:{value:0},uI:{value:iri},uTint:{value:new THREE.Color(tint)}},{blending:THREE.AdditiveBlending}); const GOALS=[null, { // 1 Fireworks: five rockets climb from the goal line and burst into shells of stars dur:2.8, @@ -1380,6 +1713,389 @@ const GOALS=[null, if(S.at(1.25)){S.shake(.7);S.flash(.3);S.ring(S.x0,4,3.5,S.col,1,20,.6);S.ring(S.x0,.2,3.5,0xffffff,1,16,.6,1);S.burst(S.x0,4,3.5,170,8,28,1.5,.6,1.3,[CELL.star,CELL.glow,CELL.spark],[S.col,0xffffff,S.col],oSpark);S.burst(S.x0,4,3.5,10,1,4,.6,3,5,[CELL.glow],[0xffffff],oGlow);S.snd((A,tt,v)=>{boomSnd(A,tt,v,1);A.noise(tt,1.4,1100,.4,.2*v,'bandpass')})} if(t>1.3&&t<2.1&&Math.random()<.6)S.em(rand(-GW,GW),rand(6,14),rand(1,7),0,0,0,.3,rand(.6,1.2),CELL.star,0xffffff,O({add:1,fade:2,rot:0})); } + }, + // ---- third wave (Nov 2026). 27, 29, 31 and 32 are the big ones: each takes over a large part of the arena for about a second. + { // 26 Giant Trophy: a gold cup taller than a car stack rises out of the pitch, turns, and fires streamers in your team colour + dur:2.6, + go(S){ + S.d.m=S.model('trophy',()=>{const b=Build(),Au=0xffc83a,D=0xc98a12,L=0xfff0a8; + b.box(7,1.2,5,0x3a2a1a,0,.6,0);b.box(6.2,.3,4.4,Au,0,1.35,0);b.cyl(1.6,2.4,1.1,Au,0,2,0,0,0,0,20);b.cyl(.5,.75,2.6,D,0,3.8,0,0,0,0,16);b.sph(1,Au,0,5.2,0,1,.6,1); + b.cyl(3.6,1.2,4.4,Au,0,7.6,0,0,0,0,24);b.cyl(3.62,3.62,.3,L,0,9.7,0,0,0,0,24);b.tor(3.6,.3,D,0,9.85,0,Math.PI/2,0,0);b.tor(2.1,.18,L,0,6.4,0,Math.PI/2,0,0); + for(const s of[-1,1])b.tor(1.45,.34,Au,s*3.35,7.5,0,0,0,0);b.cyl(.9,.9,.25,L,0,7.7,2.45,Math.PI/2-.2,0,0,5);return b.mesh()}); + S.d.m.position.set(S.x0,-11,6);S.d.m.rotation.set(0,0,0);S.ball.visible=false; + S.snd((A,t,v)=>{A.noise(t,.7,240,.6,.18*v,'lowpass');fanfare(A,t+.5,v,[523,659,784,1047,1047],.12)}); + }, + step(S,t,dt){ + const m=S.d.m,up=RM()?sm(0,.6,t):backOut(seg(t,0,.6)),dn=seg(t,2.15,2.6);m.position.y=-11+11*up-12*dn*dn;m.rotation.y=Math.sin(t*1.7)*.55; + if(t<.55&&!RM())for(let i=0;i<(S.q<1?1:3);i++)S.em(S.x0+rand(-4,4),.4,6+rand(-3,3),rand(-4,4),rand(3,7),rand(-2,3),.8,rand(.9,1.5),CELL.puff,0xd8c49a,oDust); + for(const tt of[.68,1.32])if(S.at(tt)){const y=m.position.y+10;S.burst(S.x0,y,6,80,8,18,1.7,.45,.8,[CELL.strip,CELL.square],[S.col,S.col,0xffd23f,0xffffff],oConf,.85);S.burst(S.x0,y,6,20,3,9,.8,.4,.8,[CELL.star,CELL.spark],[0xfff0a8,0xffffff],oSpark,.5);S.ring(S.x0,y,6,0xffd23f,1,9,.5,1);shk(S,.3);S.snd((A,t2,v)=>popSnd(A,t2,v,800))} + if(t>.6&&t<2.1&&Math.random()<.6)S.em(S.x0+rand(-3.6,3.6),m.position.y+rand(3,10),6+rand(-1,3.5),0,0,0,.45,rand(.4,.8),CELL.spark,0xffffff,oZap); + } + }, + { // 27 Stadium Wave: cards in your team colour and white jump up all round the stands in a wave that runs from your goal to the far end + dur:2.5, + go(S){ + const A=area(S); + S.d.w=S.model('wave',()=>{ + const gw=S.main?G.GW+2:9,c=A.c,o=S.main?4:0,path=[[gw,1.5-o],[A.w-c,1.5-o],[A.w-1.5+o,c],[A.w-1.5+o,A.l-c],[A.w-c,A.l-1.5+o],[0,A.l-1.5+o]],cards=[]; + let D=0;const sp=4*A.k; + for(let i=0;i{for(let k=0;k<4;k++){const j=i*4+k;C.set([cd[0],(S.main?16:4),cd[1]],j*3);Q.set([k&1?1:-1,k>>1],j*2);Pp.set([cd[4]/D,(Math.floor(i/2)%2)],j*2);N.set([cd[2],0,cd[3]],j*3)}const a=i*4;ix.push(a,a+1,a+2,a+1,a+3,a+2)}); + const g=new THREE.BufferGeometry();g.setAttribute('position',new THREE.BufferAttribute(C,3));g.setAttribute('aQ',new THREE.BufferAttribute(Q,2));g.setAttribute('aP',new THREE.BufferAttribute(Pp,2));g.setAttribute('aN',new THREE.BufferAttribute(N,3));g.setIndex(ix); + const m=new THREE.Mesh(g,fxShader( + 'attribute vec2 aQ,aP;attribute vec3 aN;uniform float uT,uAll,uA,uK;varying vec3 vC;varying float vA;uniform vec3 uCol;'+ + 'void main(){float e=aP.x-uT,h=max(exp(-pow(e/.07,2.))+.35*exp(-pow((e+.12)/.1,2.)),uAll);vec3 sd=vec3(aN.z,0.,-aN.x);'+ + 'vec3 p=position+sd*aQ.x*1.9*uK+vec3(0.,(aQ.y*7.*(.1+.9*h)+h*4.)*uK,0.);'+ + 'vC=mix(vec3(1.),uCol,aP.y)*(.75+.5*h)+vec3(1.,.95,.75)*aQ.y*h*.2;vA=uA*smoothstep(.02,.25,h);gl_Position=projectionMatrix*modelViewMatrix*vec4(p,1.);}', + 'varying vec3 vC;varying float vA;void main(){if(vA<.01)discard;gl_FragColor=vec4(vC,vA);}', + {uT:{value:-1},uAll:{value:0},uA:{value:1},uK:{value:A.k},uCol:{value:new THREE.Color()}})); + m.frustumCulled=false;m.renderOrder=3;m.userData={D,path};return m}); + const u=S.d.w.material.uniforms;u.uCol.value.setHex(S.col);u.uT.value=-1;u.uAll.value=0;u.uA.value=1;S.ball.visible=false; + S.burst(S.x0,3,3,40,6,14,1.2,.4,.7,[CELL.strip,CELL.square],[S.col,0xffffff],oConf,.8); + S.snd((A2,t,v)=>{A2.noise(t,2.3,700,.5,.16*v,'bandpass');A2.noise(t+.3,1.6,1500,.8,.07*v,'bandpass');for(let i=0;i<4;i++)A2.tone(t+.35+i*.32,.25,'triangle',440+i*60,520+i*60,.03*v)}); + }, + step(S,t){ + const u=S.d.w.material.uniforms,A=area(S); + if(RM()){u.uT.value=-1;u.uAll.value=sm(.1,.7,t)*.75*(1-sm(1.8,2.4,t))} + else{u.uT.value=-.06+1.12*(1-Math.abs(1-2*seg(t,.12,2.0)));u.uAll.value=0;u.uA.value=1-sm(2.0,2.45,t)} // out to the far end and back + if(!RM()&&t>.12&&t<2){ // sparkles riding the front of the wave on both sides + const P=S.d.w.userData.path,D=S.d.w.userData.D;let d=u.uT.value*D; + for(let i=0;iL){d-=L;continue}const k=d/L,x=lerp(x0,x1,k),z=lerp(z0,z1,k); + for(const m of[1,-1])if(Math.random()<.7)S.em(x*m,(S.main?20:6)+rand(-2,3)*A.k,z,rand(-2,2),rand(1,4),rand(-2,2),.5,rand(.5,1)*A.k+.2,pick([CELL.star,CELL.spark]),pick([S.col,0xffffff]),oZap);break} + } + } + }, + { // 28 Robot Salute: steel parts fly in and bolt themselves together into a robot, which salutes and then jets off + dur:2.7, + go(S){ + S.d.r=S.model('robot'+S.col,()=>{const st=0xb8bccf,dk=0x4a5060,root=new THREE.Group(),mk=f=>{const b=Build();f(b);const m=b.mesh();root.add(m);return m}; + const legs=mk(b=>{for(const s of[-1,1]){b.box(1.4,3.6,1.6,st,s*1.2,2.2,0);b.box(1.9,.7,2.6,dk,s*1.2,.35,.4);b.sph(.6,dk,s*1.2,2.4,.4)}}); + const body=mk(b=>{b.box(4.8,4,2.8,st,0,6.3,0);b.box(2.8,1.7,.12,S.col,0,6.6,1.42);b.sph(.4,0xffd23f,0,7.75,1.38,1,1,.5);b.box(5,.5,3,dk,0,4.45,0); + for(const s of[-1,1])b.sph(.85,dk,s*2.75,7.8,0);b.box(1,3.2,1.1,st,-3,5.9,0);b.sph(.62,dk,-3,4.05,0);for(let i=0;i<3;i++)b.box(.35,.12,.05,0x3fd2ff,-1.4+i*.5+.0,5.5,1.42)}); + const head=mk(b=>{b.box(2.8,2.1,2.3,st,0,9.45,0);b.box(2.2,.55,.12,0x3fd2ff,0,9.6,1.17);for(const s of[-1,1])b.cyl(.35,.35,.4,dk,s*1.55,9.45,0,0,0,Math.PI/2,10);b.cyl(.08,.08,1,dk,0,11,0,0,0,0,6);b.sph(.25,0xff3b3b,0,11.55,0)}); + const arm=new THREE.Group();arm.position.set(3,7.8,0);root.add(arm);const ab=Build();ab.box(1,3.2,1.1,st,0,-1.75,0);ab.sph(.62,dk,0,-3.6,0);const am=ab.mesh();arm.add(am); + root.userData={legs,body,head,arm};return root}); + const r=S.d.r,U=r.userData;r.position.set(S.x0,0,5);r.rotation.set(0,0,0);r.scale.setScalar(1);for(const k of['legs','body','head'])U[k].position.set(0,-40,0);U.arm.rotation.set(0,0,0);U.arm.position.set(3,-40,0); + S.ball.visible=false;S.burst(S.x0,3,3,30,5,12,.8,.3,.6,[CELL.spark],[0x3fd2ff,0xffffff],oSpark); + }, + step(S,t,dt){ + const r=S.d.r,U=r.userData,fly=(a,b)=>bounceOut(seg(t,a,b)),rm=RM(); + const lk=fly(0,.3),bk=fly(.25,.55),ak=fly(.45,.72),hk=fly(.62,.88); + U.legs.position.set(0,-9*(1-lk),0);U.body.position.set(0,14*(1-bk),0);U.head.position.set(0,16*(1-hk),0);U.arm.position.set(3+12*(1-ak),7.8,0); + for(const [tt,y] of[[.3,1],[.55,4.5],[.72,7.8],[.88,9]])if(S.at(tt)){S.burst(S.x0,y,5.5,18,3,8,.5,.3,.6,[CELL.spark,CELL.square],[0xffd23f,0xffffff,0xb8bccf],oSpark);shk(S,.15);S.snd((A,t2,v)=>{A.tone(t2,.08,'square',220+y*30,90,.08*v);A.noise(t2,.06,3000,1,.12*v,'highpass')})} + if(S.at(.95)){S.burst(S.x0,9.6,6.2,16,1,4,.5,.4,.8,[CELL.glow,CELL.star],[0x3fd2ff,0xffffff],oGlow);S.snd((A,t2,v)=>{A.tone(t2,.12,'sine',660,880,.06*v);A.tone(t2+.14,.25,'sine',990,990,.06*v)})} + const sal=backOut(seg(t,1.05,1.35))*(1-seg(t,1.95,2.1));U.arm.rotation.z=sal*2.45+(t>1.35&&t<1.95?Math.sin((t-1.35)*16)*.12:0);U.arm.rotation.x=-sal*.35; + if(S.at(1.3))S.snd((A,t2,v)=>fanfare(A,t2,v,[392,523,659],.1,'square',.035)); + if(t>2.0){const k=t-2.0;if(rm)r.scale.setScalar(Math.max(.01,1-seg(t,2.05,2.5)));else{r.position.y=k*k*60;for(let i=0;i<(S.q<1?2:4);i++)for(const s of[-1,1])S.em(S.x0+s*1.2+rand(-.3,.3),r.position.y-.2,5.3,rand(-1,1),-rand(8,14),rand(-1,1),.35,rand(.5,.9),pick([CELL.flame,CELL.glow]),pick([0xffd23f,0xff8a1f,0xffffff]),O({add:1,grow:-.5,fade:0,rot:0}))} + if(S.at(2.02))S.snd((A,t2,v)=>{A.noise(t2,.6,500,.6,.2*v,'lowpass');A.tone(t2,.6,'sawtooth',120,600,.04*v)})} + } + }, + { // 29 Tidal Wave: a wall of water rises in the goal mouth, rolls out across half the pitch and crashes down in spray + dur:2.5, + go(S){ + const A=area(S); + S.d.w=S.model('tide',()=>{const m=new THREE.Mesh(new THREE.PlaneGeometry(1,1,56,18),fxShader( + 'uniform float uZ,uH,uL,uW,uT;varying float vS,vF;varying vec2 vU;void main(){float s=uv.y,u=uv.x-.5,x=u*uW;'+ + 'float tp=smoothstep(.5,.36,abs(u)),hx=uH*(.84+.16*sin(x*.09+uT*2.)+.08*sin(x*.23-uT*3.))*(.15+.85*tp);'+ + 'float y=hx*pow(s,.85)-pow(max(s-.86,0.)/.14,2.)*hx*.28;float z=uZ-(1.-s)*(1.-s)*uL*.8+pow(max(s-.55,0.)/.45,2.)*uL;'+ + 'vS=s;vU=vec2(u,s);vF=tp;gl_Position=projectionMatrix*modelViewMatrix*vec4(x,y,z,1.);}', + 'uniform float uA,uT;varying float vS,vF;varying vec2 vU;void main(){float s=vS;vec3 c=mix(vec3(.03,.27,.6),vec3(.32,.8,1.),smoothstep(.1,.85,s));'+ + 'c+=(sin(vU.x*95.+s*14.-uT*5.)*.5+.5)*.07;float fm=smoothstep(.8,.97,s)+(1.-smoothstep(0.,.1,s))*.6;fm*=.7+.3*sin(vU.x*150.+uT*9.);c=mix(c,vec3(.95,.98,1.),clamp(fm,0.,1.));'+ + 'gl_FragColor=vec4(c,uA*.74*clamp(vF*1.7,0.,1.));}', + {uZ:{value:0},uH:{value:0},uL:{value:4},uW:{value:A.w*1.7},uT:{value:0},uA:{value:0}}));m.frustumCulled=false;m.renderOrder=3;return m}); + S.d.w.position.set(0,0,0);S.ball.visible=false;S.d.crash=0; + S.burst(S.x0,2,2,50,6,16,1,.3,.6,[CELL.drop,CELL.disc],[0x5cc8ff,0xffffff],oDrop,.8); + S.snd((A2,t,v)=>{A2.noise(t,1.9,320,.5,.26*v,'lowpass');A2.noise(t+.2,1.6,900,.4,.1*v,'bandpass');A2.noise(t+1.5,1,500,.5,.3*v,'lowpass');A2.noise(t+1.5,.8,2500,.6,.1*v,'highpass')}); + }, + step(S,t){ + const u=S.d.w.material.uniforms,A=area(S),k=A.k,rm=RM();u.uT.value=t; + let Z,H,L; + if(rm){Z=8*k;H=7*k*sm(0,.8,t)*(1-sm(1.6,2.3,t));L=3*k;u.uA.value=1-sm(1.9,2.4,t)} + else{const go=sm(.3,1.55,t),fall=seg(t,1.5,1.85);Z=(2+60*go)*k;H=(15*sm(0,.35,t)+4*go)*k*(1-fall*fall);L=(4+5*go+10*fall)*k;u.uA.value=1-sm(1.75,2.15,t)} + u.uZ.value=Z;u.uH.value=H;u.uL.value=L; + const n=rm?1:(S.q<1?3:6); + if(H>1)for(let i=0;i{const g=new THREE.Group(),mat=fxShader( + 'uniform float uT,uW;varying vec2 vU;varying float vX;void main(){vU=uv;vec3 p=position;float x=p.x*uW;p.z+=sin(x*.08+uT*.9)*2.5+sin(x*.21-uT*1.4)*1.;p.x=x;vX=x;gl_Position=projectionMatrix*modelViewMatrix*vec4(p,1.);}', + 'uniform float uT,uA;varying vec2 vU;varying float vX;void main(){float v=vU.y;float r=.55+.45*sin(vX*.9+uT*1.3)*sin(vX*2.3-uT*.7+1.)+.25*sin(vX*5.1+uT*2.);'+ + 'float a=smoothstep(0.,.12,v)*pow(1.-v,1.3)*smoothstep(.0,.12,vU.x)*smoothstep(1.,.88,vU.x);vec3 c=mix(vec3(.15,1.,.5),vec3(.65,.3,1.),smoothstep(.2,.9,v))+vec3(.6,1.,.8)*(1.-smoothstep(0.,.18,v))*.6;'+ + 'gl_FragColor=vec4(c*a*max(r,0.)*uA*.8,1.);}', + {uT:{value:0},uA:{value:0},uW:{value:1}},{blending:THREE.AdditiveBlending}); + for(let i=0;i<3;i++){const m=new THREE.Mesh(new THREE.PlaneGeometry(1,1,48,1),mat);m.frustumCulled=false;m.renderOrder=3;g.add(m)}g.userData={mat};return g}); + const A=area(S),k=S.main?1:.5;S.d.c.children.forEach((m,i)=>{m.scale.set(1,16*k,1);m.position.set(S.x0*.5+(i-1)*6*k,(16+i*3)*k,(6+i*6)*k)});S.d.c.userData.mat.uniforms.uW.value=50*k;void A; + S.ball.visible=true;S.d.b0=S.ball.position.clone(); + S.snd((A2,t,v)=>{for(const [f,d] of[[220,0],[277,.3],[330,.6],[440,.9]])A2.tone(t+d,2.2-d,'sine',f,f*1.01,.05*v);A2.noise(t,2.5,1800,.3,.03*v,'bandpass')}); + }, + step(S,t){ + const u=S.d.c.userData.mat.uniforms,k=S.main?1:.5;u.uT.value=t;u.uA.value=sm(.5,1.3,t)*(1-sm(2,2.6,t)); + if(t<1.1){const e=sm(0,1.1,t);S.ball.position.set(lerp(S.d.b0.x,S.x0*.5,e),lerp(S.d.b0.y,15*k,e),lerp(S.d.b0.z,8*k,e));S.ball.scale.setScalar(Math.max(.02,1-e*e));S.ball.rotation.y+=.05; + if(Math.random()<.7)S.em(S.ball.position.x+rand(-1,1),S.ball.position.y+rand(-1,1),S.ball.position.z,rand(-1,1),rand(0,2),rand(-1,1),.6,rand(.3,.6),CELL.glow,pick([0x46e39a,0xb46cff]),oGlow)} + else S.ball.visible=false; + if(S.at(1.1))S.burst(S.x0*.5,15*k,8*k,60,3,11,1.3,.3,.7,[CELL.star,CELL.spark,CELL.glow],[0x46e39a,0xb46cff,0xffffff],O({add:1,fade:2,drag:1.2,grav:-.6})); + if(t>1&&t<2.3&&Math.random()<.5)S.em(rand(-30,30)*k,rand(18,32)*k,rand(4,20)*k,0,0,0,.6,rand(.3,.6),CELL.star,0xffffff,O({add:1,fade:2,rot:0})); + } + }, + { // 31 Light Dragon: a dragon made of light bursts out of the net, loops out over the pitch and dives back into the goal + dur:2.6, + go(S){S.ball.visible=false;S.burst(S.x0,4,2,50,6,15,.8,.4,.8,[CELL.glow,CELL.spark],[0xfff2c2,0xffb347,0xff4a6a],oSpark);shk(S,.3); + S.snd((A,t,v)=>{A.tone(t,.9,'sawtooth',230,70,.06*v);A.noise(t,.8,400,.6,.2*v,'lowpass');A.tone(t+2.2,.8,'sawtooth',160,50,.07*v);A.noise(t+2.2,.6,300,.7,.25*v,'lowpass')})}, + step(S,t){ + const A=area(S),k=A.k*(RM()?.4:1),x0=S.x0,NB=S.q<1?18:34,du=(S.q<1?.02:.011)*(RM()?1.6:1); + const P=(u,o)=>{u=clamp(u,0,1);const s=Math.sin(Math.PI*u);o.x=x0*(1-s)+(A.w*.55)*k*Math.sin(2*Math.PI*u);o.y=4+15*k*s+3*k*Math.sin(3*Math.PI*u);o.z=2+16*k*s+6*k*Math.sin(2*Math.PI*u);return o}; // a big loop over the goal end, in view of a camera facing the goal + const uh=sm(0,2.25,t),p=_dp,q=_dq,cols=[0xfff2c2,0xffe08a,0xffb347,0xff8a3d,0xff5c6a,0xd83a8a]; + if(uh<1){ + for(let i=0;i{const g=new THREE.Group(),W=A.w*2-6,L=A.l*.62,geo=new THREE.PlaneGeometry(W,L);geo.rotateX(-Math.PI/2);geo.translate(0,0,L/2); + const fl=new THREE.Mesh(geo,fxShader('varying vec2 vP;void main(){vP=position.xz;gl_Position=projectionMatrix*modelViewMatrix*vec4(position,1.);}', + 'varying vec2 vP;uniform float uR,uA,uB,uTile;uniform vec3 uC[4];float h(vec2 p){return fract(sin(dot(p,vec2(12.9898,78.233)))*43758.5453);}'+ + 'vec3 pk(float k){return k<.25?uC[0]:k<.5?uC[1]:k<.75?uC[2]:uC[3];}'+ + 'void main(){vec2 q=vP/uTile,id=floor(q),f=fract(q);float d=length(vP);float on=1.-smoothstep(uR-uTile*1.5,uR,d);float b0=floor(uB),bf=smoothstep(.7,1.,fract(uB));'+ + 'vec3 c=mix(pk(h(id+b0)),pk(h(id+b0+1.)),bf);float lit=mix(step(.4,h(id*1.7+b0*.37)),step(.4,h(id*1.7+(b0+1.)*.37)),bf)*.75+.25;'+ + 'float e=smoothstep(0.,.07,f.x)*smoothstep(1.,.93,f.x)*smoothstep(0.,.07,f.y)*smoothstep(1.,.93,f.y);float ring=exp(-pow((d-uR)/(uTile*.8),2.))*.6;'+ + 'gl_FragColor=vec4(c*(e*lit*on+ring*on)*uA*.62,1.);}', + {uR:{value:0},uA:{value:0},uB:{value:0},uTile:{value:5*A.k+.6},uC:{value:[new THREE.Color(0xff3fa4),new THREE.Color(0x38e6ff),new THREE.Color(0xffd23f),new THREE.Color(0x9a5cff)]}}, + {blending:THREE.AdditiveBlending,polygonOffset:true,polygonOffsetFactor:-2,polygonOffsetUnits:-2})); + fl.position.y=.06;fl.frustumCulled=false;fl.renderOrder=2;g.add(fl); + const cm=glowMat(0xffffff,.2);const cone=new THREE.ConeGeometry(4*A.k+.5,40*A.k+6,24,1,true);cone.translate(0,-(20*A.k+3),0); + const spots=[0,1].map(i=>{const m=new THREE.Mesh(cone,i?cm:cm.clone());m.frustumCulled=false;m.renderOrder=4;g.add(m);return m});g.userData={fl,spots};return g}); + const U=S.d.f.userData,u=U.fl.material.uniforms;S.d.f.position.set(S.x0,0,0);u.uR.value=0;u.uA.value=0; + U.spots.forEach((m,i)=>{const s=i?1:-1;m.position.set(s*(S.main?G.GW:8)-S.x0,(S.main?G.GH:6)+1,1);m.material.opacity=0}); + S.ball.visible=false;S.burst(S.x0,3,2,60,4,14,1,.25,.5,[CELL.star,CELL.square],[0xff3fa4,0x38e6ff,0xffd23f,0xffffff],oSpark,.5); + S.snd((A2,t,v)=>{for(let i=0;i<5;i++){const tt=t+i*.5;A2.tone(tt,.25,'sine',90,40,.3*v);A2.noise(tt+.25,.05,7000,1,.06*v,'highpass')}for(const [f,d] of[[392,0],[494,0],[587,0],[440,1],[554,1],[659,1]])A2.tone(t+.02+d,.35,'square',f,f,.022*v)}); + }, + step(S,t){ + const U=S.d.f.userData,u=U.fl.material.uniforms,A=area(S),rm=RM(); + u.uR.value=rm?A.l*2:(A.l*1.1)*sm(0,.95,t);u.uA.value=(rm?sm(0,.6,t):1)*(1-sm(1.95,2.45,t));u.uB.value=rm?0:t*2; + U.spots.forEach((m,i)=>{const s=i?1:-1;m.rotation.set(-.9+.25*Math.sin(t*2.4+i),0,s*(.5+.35*Math.sin(t*1.8+i*2)));m.material.opacity=.16*u.uA.value;m.material.color.setHSL(((rm?0:t*.4)+i*.5)%1,.9,.6)}); + if(!rm&&t>.2&&t<2.1&&Math.random()<.8)S.em(rand(-A.w*.8,A.w*.8),rand(.5,6)*A.k+.3,rand(2,A.l*.55),0,0,0,.35,rand(.3,.7)*(A.k+.3),CELL.star,pick([0xff3fa4,0x38e6ff,0xffd23f,0xffffff]),O({add:1,fade:2,rot:0})); + } + }, + { // 33 Piano Keys: a giant keyboard rises across the goal mouth and the ball hops along it playing a tune + dur:2.5, + go(S){ + S.d.k=S.model('piano',()=>{const g=new THREE.Group(),bw=new THREE.BoxGeometry(2.2,.9,6.2),bb=new THREE.BoxGeometry(1.3,1,3.8); + const W=new THREE.InstancedMesh(bw,new THREE.MeshLambertMaterial({color:0xf4f4f0}),14),B=new THREE.InstancedMesh(bb,new THREE.MeshLambertMaterial({color:0x17181d}),10); + const base=Build();base.box(14*2.4+1,.8,7.4,0x2a1c14,0,.1,4.6);base.box(14*2.4+1,.25,.6,0xc98a12,0,.55,1.2);const bm=base.mesh(); + for(const m of[W,B])m.frustumCulled=false;g.add(bm,W,B);g.userData={W,B,bm,press:new Float32Array(24)};return g}); + const U=S.d.k.userData;U.press.fill(0);S.d.k.position.set(0,0,0);S.d.hop=-1; + S.ball.visible=true;S.ball.scale.setScalar(.8);S.d.b0=S.ball.position.clone(); + }, + step(S,t,dt){ + const U=S.d.k.userData,rise=backOut(seg(t,0,.35))*(1-seg(t,2.15,2.5)),y0=-1.6+1.6*rise,BLK=[0,1,3,4,5,7,8,10,11,12],NOTE=[262,294,330,349,392,440,494,523,587,659,698,784,880,988]; + for(let i=0;i<24;i++)U.press[i]=Math.max(0,U.press[i]-dt*4); + const play=(i,v0)=>{U.press[i]=1;const f=NOTE[i]*2;S.snd((A,t2,v)=>{A.tone(t2,.5,'triangle',f,f,.1*v*(v0||1));A.tone(t2,.3,'sine',f*2,f*2,.03*v)})}; + const hops=[1,3,5,7,9,11,13]; + if(t>=.35&&t<1.75){const h=Math.min(6,Math.floor((t-.35)/.2)),f=((t-.35)/.2)-h,a=h?hops[h-1]:-1,b=hops[h],xa=a<0?S.d.b0.x:(a-6.5)*2.4,xb=(b-6.5)*2.4; + S.ball.position.set(lerp(xa,xb,f),y0+.9+1.46+Math.sin(f*Math.PI)*(a<0?2:3.4)+(a<0?(1-f)*(S.d.b0.y-2):0),lerp(a<0?S.d.b0.z:5,5,a<0?f:1));S.ball.rotation.z-=dt*8; + if(h!==S.d.hop){if(S.d.hop>=0){play(hops[S.d.hop]);S.burst(S.ball.position.x,2,5,6,2,5,.8,.4,.6,[CELL.note,CELL.notes],[0xffffff,S.col],oFloat,.7)}S.d.hop=h}} + if(S.at(1.75)){play(13);S.burst(S.ball.position.x,2,5,6,2,5,.8,.4,.6,[CELL.note,CELL.notes],[0xffffff,S.col],oFloat,.7)} + for(let i=0;i<14;i++)if(S.at(1.85+i*.025))play(i,.7); + if(t>1.75&&t<2.05){const f=seg(t,1.75,2.05);S.ball.position.set((13-6.5)*2.4-f*4,y0+2.4+Math.sin(f*Math.PI)*6,5)} + if(S.at(2.05)){S.ball.visible=false;S.burst(S.ball.position.x,S.ball.position.y,5,40,4,11,1.3,.4,.8,[CELL.note,CELL.notes,CELL.star],[0xffffff,S.col,0xffd23f],oFloat,.6);shk(S,.2)} + let bi=0;for(let i=0;i<14;i++){const p=U.press[i];inst(U.W,i,(i-6.5)*2.4,y0+.45-p*.35,4.9,p*.06,0,0)} + for(const i of BLK){const p=Math.max(U.press[i],U.press[i+1])*.6;inst(U.B,bi++,(i-6.5)*2.4+1.2,y0+.95-p*.3,3.6,p*.05,0,0)} + U.W.instanceMatrix.needsUpdate=U.B.instanceMatrix.needsUpdate=true;U.bm.position.y=y0-.4; + } + }, + { // 34 Bubble Pop: a giant soap bubble swallows the ball, wobbles up into the air and pops + dur:2.2, + go(S){S.d.m=S.model('bubble',()=>{const m=new THREE.Mesh(new THREE.SphereGeometry(1,32,20),filmMat(0xffffff,1));m.renderOrder=6;return m}); + S.d.m.material.uniforms.uA.value=0;S.d.c=S.B.clone();S.d.c.x=S.x0;S.d.c.y=Math.max(S.B.y,5);S.ball.visible=true;S.d.v=0; + S.snd((A,t,v)=>{A.tone(t,.5,'sine',300,700,.05*v);A.tone(t+1.25,.12,'sine',1400,300,.12*v);A.noise(t+1.25,.15,2500,1,.15*v,'highpass')})}, + step(S,t,dt){ + const m=S.d.m,c=S.d.c,u=m.material.uniforms,y=c.y+sm(.2,1.25,t)*5;u.uT.value=t; + if(t<1.25){const r=4.6*backOut(seg(t,0,.3)),w=Math.sin(t*10)*.07;m.position.set(c.x,y,c.z);m.scale.set(r*(1+w),r*(1-w),r*(1+w*.5));u.uA.value=sm(0,.2,t);S.ball.position.set(c.x,y,c.z);S.ball.rotation.y+=dt*2} + if(S.at(1.25)){m.visible=false;S.burst(c.x,y,c.z,60,4,13,1,.25,.6,[CELL.bubble,CELL.bubble,CELL.disc],[0xffffff,0xbfe9ff,0xffd9f5],O({grav:2,drag:1.5,wob:2}));S.ring(c.x,y,c.z,0xffffff,4,9,.35);S.d.v=0} + if(t>1.25&&S.ball.visible){S.d.v-=30*dt;S.ball.position.y+=S.d.v*dt;if(S.ball.position.y{popSnd(A,t,v,1200);for(let i=0;i<6;i++)A.tone(t+.1+i*.13,.12,'triangle',500+Math.random()*400,900+Math.random()*500,.04*v)})}, + step(S,t){ + const rel=(n,yb)=>{const m=Math.round(n*S.q);for(let i=0;i{const cv=document.createElement('canvas');cv.width=cv.height=128;const g=cv.getContext('2d'),r=rng(36);g.translate(64,64);g.scale(40,40);g.fillStyle='#fff'; + blob(g,0,0,.8,.28,r,14);g.fill();for(let i=0;i<14;i++){const a=r()*TAU,d=.95+r()*.5;g.beginPath();g.arc(Math.cos(a)*d,Math.sin(a)*d,.05+r()*.1,0,TAU);g.fill()}for(let i=0;i<6;i++){const a=r()*TAU;g.beginPath();g.moveTo(Math.cos(a)*.6,Math.sin(a)*.6);g.lineTo(Math.cos(a+.08)*1.25,Math.sin(a+.08)*1.25);g.lineWidth=.12;g.strokeStyle='#fff';g.lineCap='round';g.stroke()} + const tex=new THREE.CanvasTexture(cv),mat=new THREE.MeshBasicMaterial({map:tex,transparent:true,depthWrite:false,color:0xffffff,polygonOffset:true,polygonOffsetFactor:-2,side:THREE.DoubleSide}),gr=new THREE.Group(),pg=new THREE.PlaneGeometry(1,1); + const back=new THREE.Mesh(pg,mat),floor=new THREE.Mesh(pg,mat);floor.rotation.x=-Math.PI/2;gr.add(back,floor);gr.userData={back,floor,mat};return gr}); + const U=S.d.p.userData;U.mat.color.setHex(S.col);U.mat.opacity=1;U.back.position.set(S.x0,S.main?6:3.5,S.main?-15:-8);U.floor.position.set(S.x0,.07,4);U.back.scale.setScalar(.01);U.floor.scale.setScalar(.01);U.back.rotation.z=rand(0,TAU); + S.ball.visible=false;S.burst(S.B.x,S.B.y,S.B.z,70,8,20,1.2,.3,.6,[CELL.drop,CELL.disc,CELL.splat],[S.col,S.col,0xffffff],oDrop,.4);shk(S,.35); + S.snd((A,t,v)=>{A.noise(t,.35,500,.7,.35*v,'lowpass');A.noise(t,.12,2000,1,.12*v);A.noise(t+.15,.25,700,.8,.12*v,'lowpass')}); + }, + step(S,t){ + const U=S.d.p.userData,k=backOut(seg(t,0,.22)),s=S.main?13:6;U.back.scale.setScalar(Math.max(.01,k*s));U.floor.scale.setScalar(Math.max(.01,backOut(seg(t,.12,.36))*s*1.1));U.mat.opacity=1-sm(1.8,2.25,t); + if(t>.25&&t<1.8&&Math.random()<.5)S.em(S.x0+rand(-.3,.3)*s,U.back.position.y-rand(.1,.35)*s,U.back.position.z+.2*S.sg*0+.3,0,-rand(.5,1.5),0,1.2,rand(.3,.5),CELL.drop,S.col,O({grav:3,rot:Math.PI,drag:.5})); + } + }, + { // 37 Thunderclap: the ball shudders, then a clap of air throws rings along the floor and a cone of pressure out of the goal + dur:2.1, + go(S){S.d.cn=S.model('clap',()=>{const g=new THREE.CylinderGeometry(1,.15,1,32,1,true);g.rotateX(Math.PI/2);g.translate(0,0,.5);const m=new THREE.Mesh(g,glowMat(0xdff3ff,.3));m.renderOrder=4;return m}); + S.d.cn.visible=false;S.ball.visible=true;S.d.b0=S.ball.position.clone();S.snd((A,t,v)=>{A.tone(t,.45,'sawtooth',60,180,.05*v);boomSnd(A,t+.45,v*1.3,1.2);A.noise(t+.45,.08,4000,1,.3*v,'highpass')})}, + step(S,t){ + const b0=S.d.b0,cn=S.d.cn; + if(t<.45){const k=t/.45*.35;S.ball.position.set(b0.x+rand(-k,k),b0.y+rand(-k,k),b0.z+rand(-k,k));S.ball.scale.setScalar(1+t*.3)} + if(S.at(.45)){S.ball.visible=false;shk(S,.9);const c=S.ball.position; + for(const [d,r] of[[.6,30],[.8,22],[1,14]])S.ring(c.x,.25,c.z+1,0xdff3ff,1,r,d,1);S.ring(c.x,c.y,c.z,0xffffff,1,12,.4); + const n=Math.round(36*S.q);for(let i=0;i=.45&&cn.visible){const k=seg(t,.45,1.05);cn.scale.set(1+k*9,1+k*9,1+k*26);cn.material.opacity=.3*(1-k);if(k>=1)cn.visible=false} + } + }, + { // 38 Kraken: a dark pool opens in the goal mouth, tentacles rise, wave, grab the ball and drag it under + dur:2.7, + go(S){ + S.d.k=S.model('kraken',()=>{const g=new THREE.Group(),im=new THREE.InstancedMesh(new THREE.SphereGeometry(1,12,8),new THREE.MeshLambertMaterial({color:0xffffff}),108),c=new THREE.Color(); + for(let i=0;i<108;i++)im.setColorAt(i,c.setHex(i%18>14?0xd06aa0:(i%2?0x8a2f6a:0x9e3a7a)));im.frustumCulled=false; + const pool=new THREE.Mesh(new THREE.CircleGeometry(1,40),new THREE.MeshBasicMaterial({color:0x08262e,transparent:true,opacity:.9,depthWrite:false,polygonOffset:true,polygonOffsetFactor:-2}));pool.rotation.x=-Math.PI/2;g.add(im,pool);g.userData={im,pool};return g}); + const U=S.d.k.userData;S.d.k.position.set(S.x0,0,7);U.pool.position.y=.07;U.pool.scale.setScalar(.01);S.ball.visible=true;S.d.b0=S.ball.position.clone(); + S.snd((A,t,v)=>{A.tone(t,1.4,'sine',55,40,.25*v);A.noise(t,1.2,250,.8,.15*v,'lowpass');A.noise(t+1.75,.6,600,.6,.25*v,'lowpass');for(let i=0;i<5;i++)A.tone(t+1.8+i*.07,.1,'sine',200-i*25,120,.06*v)}); + }, + step(S,t){ + const U=S.d.k.userData,rm=RM(),R=backOut(seg(t,.15,.6))*(1-seg(t,2.0,2.5)),grab=sm(.95,1.25,t)*(1-sm(1.75,2,t)),pull=seg(t,1.7,2); + U.pool.scale.setScalar(Math.max(.01,7.5*backOut(seg(t,0,.25))*(1-seg(t,2.3,2.6)))); + for(let k=0;k<6;k++){const a=k/6*TAU+.3,ca=Math.cos(a),sa=Math.sin(a); + for(let j=0;j<18;j++){const s=j/17,h=s*11*R*(1-pull*.6),bend=4.6*grab*s*s,wv=rm?0:Math.sin(t*4+k*1.3-s*3)*s*1.6*(1-grab*.7),r=lerp(1.1,.28,s)*Math.max(.01,R); + inst(U.im,k*18+j,ca*(4.8-bend)-sa*wv,h-pull*6*s,sa*(4.8-bend)+ca*wv,0,0,0,r,Math.max(r,.75*R),r)}} + U.im.instanceMatrix.needsUpdate=true; + if(t<1.1){const e=sm(.2,1.1,t);S.ball.position.lerpVectors(S.d.b0,_ip.set(S.x0,2,7),e)} + else if(t<1.7)S.ball.position.set(S.x0,lerp(2,10*R,sm(1.1,1.4,t)),7); + else if(t<2){S.ball.position.y=lerp(10*R,-3,sm(1.7,2,t))} + if(S.at(2)){S.ball.visible=false;S.burst(S.x0,1,7,60,6,16,1,.3,.7,[CELL.drop,CELL.disc,CELL.splat],[0x2a7a8a,0xffffff,0x5a2a6a],oDrop,.8);S.ring(S.x0,.25,7,0x9fe0ff,1,14,.6,1);shk(S,.5)} + if(t>.2&&t<2.2&&Math.random()<.4)S.em(S.x0+rand(-5,5),.3,7+rand(-5,5),0,rand(1,3),0,.6,rand(.3,.5),CELL.bubble,0x9fe0ff,oFloat); + } + }, + { // 39 Rocket Launch: a rocket rises on its pad, counts down, and lifts off on a column of smoke, bursting into stars high above + dur:2.7, + go(S){ + S.d.pad=S.model('rpad',()=>{const b=Build();b.box(7,.7,7,0x6b7280,0,.35,0);for(const s of[-1,1])b.box(.5,9,.5,0xd8262f,s*3,4.5,-2.5);b.box(6.5,.4,.4,0xd8262f,0,8.5,-2.5);for(let i=-3;i<=3;i+=2)b.box(.8,.72,6.9,0xffd23f,i,.36,0);return b.mesh()}); + S.d.r=S.model('rocket',()=>{const b=Build(),Wt=0xf4f6ff,R=0xd8262f;b.cyl(1.2,1.2,7,Wt,0,4.6,0,0,0,0,20);b.add(new THREE.ConeGeometry(1.2,2.6,20),R,0,9.4,0);b.cyl(.75,1.05,.8,0x2a2f3a,0,.7,0,0,0,0,14);b.sph(.45,0x5cc8ff,0,6.8,1.1,1,1,.5);b.tor(.48,.08,0xc8d2dc,0,6.8,1.12);b.cyl(1.22,1.22,.4,R,0,3.2,0,0,0,0,20); + for(let i=0;i<4;i++){const a=i*Math.PI/2+Math.PI/4;b.box(.2,2.2,1.4,R,Math.sin(a)*1.6,1.9,Math.cos(a)*1.6,0,a,0)}return b.mesh()}); + S.d.pad.position.set(S.x0,-10,6);S.d.r.position.set(S.x0,-9.3,6);S.ball.visible=false; + S.snd((A,t,v)=>{for(const d of[.5,.8,1.1])A.tone(t+d,.09,'square',d<1?880:1320,d<1?880:1320,.05*v);A.noise(t+1.15,1.4,180,.6,.35*v,'lowpass');A.tone(t+1.2,1.3,'sawtooth',50,90,.05*v)}); + }, + step(S,t,dt){ + const up=backOut(seg(t,0,.4)),r=S.d.r,rm=RM();S.d.pad.position.y=-10+10*up-10*seg(t,2.2,2.7); + const lift=t<1.3?0:rm?(t-1.3)*(t-1.3)*18:(t-1.3)*(t-1.3)*40;r.position.y=-9.3+10*up+lift; + if(t>1.12&&t<2.3){const y=r.position.y+.3;for(let i=0;i<(S.q<1?2:4);i++)S.em(S.x0+rand(-.4,.4),y,6+rand(-.4,.4),rand(-1,1),-rand(10,18),rand(-1,1),.3,rand(.7,1.1),pick([CELL.flame,CELL.glow]),pick([0xffd23f,0xff8a1f,0xffffff]),O({add:1,grow:-.5,fade:0,rot:0})); + if(Math.random()<.6)S.em(S.x0+rand(-.6,.6),y-1,6+rand(-.6,.6),rand(-1,1),rand(-1,0),rand(-1,1),1.1,rand(1,1.6),CELL.puff,0xe6e8ee,oPuff)} + if(S.at(1.15)){shk(S,.5);const n=Math.round(30*S.q);for(let i=0;ipopSnd(A,t2,v,700))} + if(t>2.3)r.visible=false; + } + }, + { // 40 Red Carpet: a red carpet unrolls from the goal, gold posts and ropes pop up beside it, and the ball rolls out to camera flashes + dur:2.5, + go(S){ + S.d.c=S.model('carpet',()=>{const g=new THREE.Group(),b=Build();b.box(7,.08,1,0xb3122a,0,.04,.5);for(const s of[-1,1])b.box(.35,.09,1,0xe0b040,s*3.4,.045,.5);const cp=b.mesh(); + const roll=new THREE.Mesh(new THREE.CylinderGeometry(1,1,7.4,18),new THREE.MeshLambertMaterial({color:0x9a0f22}));roll.rotation.z=Math.PI/2; + const pb=Build();pb.cyl(.18,.25,2.6,0xe0b040,0,1.3,0,0,0,0,10);pb.cyl(.55,.6,.2,0xc98a12,0,.1,0,0,0,0,12);pb.sph(.32,0xffd23f,0,2.7,0); + const posts=new THREE.InstancedMesh(pb.mesh().geometry,vcMat(),16),ropes=new THREE.InstancedMesh(new THREE.CylinderGeometry(.11,.11,1,8),new THREE.MeshLambertMaterial({color:0x8a1030}),14); + posts.frustumCulled=ropes.frustumCulled=false;g.add(cp,roll,posts,ropes);g.userData={cp,roll,posts,ropes};return g}); + const U=S.d.c.userData;S.d.c.position.set(S.x0,0,1);S.ball.visible=true;S.d.b0=S.ball.position.clone(); + S.snd((A,t,v)=>{A.noise(t+.2,1.8,650,.7,.12*v,'bandpass');for(let i=0;i<14;i++)A.noise(t+.4+i*.12+Math.random()*.06,.03,5000,1,.08*v,'highpass');fanfare(A,t+.05,v,[392,523,392,659],.15,'square',.03)});void U; + }, + step(S,t,dt){ + const U=S.d.c.userData,A=area(S),L=36*A.k+6,f=sm(.1,1.1,t),len=Math.max(.01,L*f); + U.cp.scale.set(1,1,len);U.roll.position.set(0,lerp(1,.3,f),len+.2);U.roll.scale.set(lerp(1,.3,f),1,lerp(1,.3,f));U.roll.rotation.x+=dt*10;U.roll.visible=f<.99; + for(let i=0;i<8;i++){const z=(i+1)*L/8.5,k=backOut(seg(len,z-1,z+3)/1),h=Math.max(.01,k);for(const s of[0,1])inst(U.posts,i*2+s,(s?1:-1)*4.8,0,z,0,0,0,1,h,1)} + let ri=0;for(let i=0;i<7;i++){const z0=(i+1)*L/8.5,z1=(i+2)*L/8.5,k=seg(len,z1+1,z1+4);for(const s of[-1,1])inst(U.ropes,ri++,s*4.8,2.3,(z0+z1)/2,Math.PI/2,0,0,Math.max(.01,k),(z1-z0)*k||.01,Math.max(.01,k))} + U.posts.instanceMatrix.needsUpdate=U.ropes.instanceMatrix.needsUpdate=true; + if(t<.5){S.ball.position.lerpVectors(S.d.b0,_ip.set(S.x0,BR,2),sm(0,.5,t))}else if(t<2.05){S.ball.position.set(S.x0,BR,1+Math.min(len-2,lerp(2,L*.8,sm(.5,2,t))));S.ball.rotation.x+=dt*4} + if(S.at(2.05)){S.ball.visible=false;S.burst(S.x0,2,S.ball.position.z,60,5,14,1.3,.3,.6,[CELL.strip,CELL.star],[0xffd23f,0xffffff,0xe0b040],oConf,.85)} + if(t>.3&&t<2.3)for(let i=0;i<(S.q<1?1:2);i++)if(Math.random()<.6){const s=Math.random()<.5?-1:1;S.em(S.x0+s*rand(7,10),rand(2,6),1+rand(2,L),0,0,0,.14,rand(.6,1.1),CELL.star,0xffffff,O({add:1,fade:0,rot:0}))} + } + }, + { // 41 Snow Globe: a glass globe drops over the goal mouth with the ball and a little snowman inside, gets a shake, and snow swirls + dur:2.6, + go(S){ + S.d.g=S.model('globe',()=>{const g=new THREE.Group(),b=Build();b.cyl(7.6,8.6,2.2,0x6b3e1e,0,1.1,0,0,0,0,32);b.tor(7.7,.25,0xe0b040,0,2.1,0,Math.PI/2,0,0);b.cyl(7.3,7.3,.2,0xf4f8ff,0,2.2,0,0,0,0,32); + b.sph(1.6,0xffffff,-3.4,3.6,-1);b.sph(1.15,0xffffff,-3.4,5.6,-1);b.sph(.8,0xffffff,-3.4,7.1,-1);b.add(new THREE.ConeGeometry(.18,.9,8),0xff8a1f,-3.4,7.1,-.1,Math.PI/2,0,0);for(const s of[-1,1])b.sph(.11,0x14161f,-3.4+s*.28,7.35,-.33);b.cyl(.85,.85,.12,0xd8262f,-3.4,6.5,-1,0,0,0,14); + const base=b.mesh(),glass=new THREE.Mesh(new THREE.SphereGeometry(8.6,40,24,0,TAU,0,Math.PI*.86),filmMat(0xcfe8ff,.25));glass.position.y=9.6;glass.renderOrder=6;g.add(base,glass);g.userData={glass};return g}); + const k=S.main?1:.75;S.d.g.position.set(S.x0,30,8*k);S.d.g.scale.setScalar(k);S.d.g.rotation.set(0,0,0);S.ball.visible=true;S.d.b0=S.ball.position.clone(); + S.snd((A,t,v)=>{A.tone(t+.45,.5,'sine',2093,2093,.06*v);[784,988,1175,988,784,1175,1568].forEach((f,i)=>A.tone(t+.7+i*.2,.4,'sine',f,f,.045*v))}); + }, + step(S,t,dt){ + const gl=S.d.g,k=S.main?1:.75,u=gl.userData.glass.material.uniforms,drop=bounceOut(seg(t,0,.5));u.uA.value=sm(0,.2,t);u.uT.value=t; + gl.position.y=30*(1-drop)+seg(t,2.1,2.6)*seg(t,2.1,2.6)*40;gl.rotation.z=(t>.6&&t<1.05&&!RM()?Math.sin((t-.6)*30)*.07*(1-seg(t,.6,1.05)):0); + if(t<2.1){const e=sm(0,.4,t);S.ball.position.lerpVectors(S.d.b0,_ip.set(S.x0+2*k,gl.position.y+(2.3+BR*.8)*k,8*k),e);S.ball.scale.setScalar(lerp(1,.8*k,e))} + if(S.at(2.1)){S.ball.visible=false;S.burst(S.x0,10*k,8*k,40,3,9,1,.3,.6,[CELL.flake,CELL.spark],[0xffffff,0xdff3ff],oFeather)} + if(t>.6&&t<2.15){const n=S.q<1?3:6,cy=gl.position.y+9.6*k;for(let i=0;i{const g=new THREE.Group(),b=Build();b.box(8,5.4,.3,0xf6f6f6,0,2.2,-2.1);for(const [w,h,x,y] of[[2.8,.18,0,1.5],[2.8,.18,0,3.3],[.18,1.9,-1.31,2.4],[.18,1.9,1.31,2.4]])b.box(w,h,.1,0xff5a1f,x,y,-1.9); + b.tor(1.9,.14,0xff5a1f,0,0,0,Math.PI/2,0,0);b.box(.3,.3,2.1,0xc8d2dc,0,-.1,-1.05);const hoop=b.mesh(); + const n=Build();for(let i=0;i<10;i++){const a=i/10*TAU;n.add(new THREE.CylinderGeometry(.04,.04,2.4,4),0xffffff,Math.cos(a)*1.55,-1.2,Math.sin(a)*1.55,Math.sin(a)*.18,0,-Math.cos(a)*.18)}n.tor(1.25,.04,0xffffff,0,-2.3,0,Math.PI/2,0,0);n.tor(1.6,.04,0xffffff,0,-1.1,0,Math.PI/2,0,0); + const net=n.mesh();g.add(hoop,net);g.userData={net};return g}); + const k=S.main?1:.8;S.d.h.position.set(S.x0,(S.main?G.GH:7)+3*k,3.2);S.d.h.scale.setScalar(.01);S.ball.visible=true;S.d.b0=S.ball.position.clone();S.ball.scale.setScalar(.75); + S.snd((A,t,v)=>{A.noise(t+.95,.35,3200,.5,.12*v,'bandpass');A.tone(t+1.2,.6,'square',196,196,.06*v);A.tone(t+1.2,.6,'square',247,247,.04*v)}); + }, + step(S,t,dt){ + const h=S.d.h,net=h.userData.net,k=S.main?1:.8,rim=h.position.clone();h.scale.setScalar(Math.max(.01,backOut(seg(t,0,.35))*k*(1-seg(t,2.05,2.4)))); + const st=_ip.set(S.x0+5*k,BR,14*k); + if(t<.95){const f=seg(t,.15,.95);if(t<.15)S.ball.position.lerpVectors(S.d.b0,st,t/.15);else S.ball.position.set(lerp(st.x,rim.x,f),lerp(st.y,rim.y,f)+Math.sin(f*Math.PI)*10*k+ (f>.8?0:0),lerp(st.z,rim.z,f));S.ball.rotation.x-=dt*8} + else if(t<1.15){const f=seg(t,.95,1.15);S.ball.position.set(rim.x,rim.y-f*4*k,rim.z)} + else if(t<2){const f=seg(t,1.15,2);S.ball.position.set(rim.x,BR*.75+(rim.y-4*k-BR)*(1-bounceOut(f)),rim.z+f*6)} + if(S.at(2)){S.ball.visible=false;S.burst(S.ball.position.x,1.5,S.ball.position.z,20,3,8,.8,.4,.8,[CELL.star],[0xffd23f,0xffffff],oSpark,.7)} + net.scale.y=1+(t>.95&&t<1.4?Math.sin((t-.95)*28)*.3*(1-seg(t,.95,1.4)):0); + if(S.at(1)){S.burst(rim.x,rim.y,rim.z,60,6,15,1.3,.4,.8,[CELL.strip,CELL.star],[S.col,0xffffff,0xff5a1f],oConf,.8);S.ring(rim.x,rim.y,rim.z,0xffffff,1,8,.4,1);shk(S,.3)} + } + }, + { // 43 High Striker: a fairground strength tester rises, the ball lands on its pad, and the puck shoots up and rings the bell + dur:2.5, + go(S){ + S.d.tw=S.model('striker',()=>{const g=new THREE.Group(),b=Build(),C=[0xd8262f,0xff8a1f,0xffd23f,0x46c34a,0x2e7bff,0x9a5cff];b.cyl(2.4,2.6,.6,0xd8262f,0,.3,1.6,0,0,0,20);b.cyl(1.6,1.6,.25,0xf6f6f6,0,.7,1.6,0,0,0,20); + for(let i=0;i<12;i++)b.box(1.4,1.3,.7,C[Math.floor(i/2)],0,1+i*1.3+.65,0);for(let i=0;i<12;i++)b.box(1.6,.08,.75,0xffffff,0,1+i*1.3,0); + b.sph(1.3,0xffc83a,0,17.6,0,1,.9,1);b.tor(1.25,.18,0xc98a12,0,17,0,Math.PI/2,0,0);b.cyl(.15,.15,.6,0x6b7280,0,16.7,0,0,0,0,8);const tw=b.mesh(); + const pb=Build();pb.box(1.9,.7,1.1,0xc8d2dc,0,0,0);pb.sph(.3,0xff3b3b,0,0,.55,1,1,.5);const pk=pb.mesh();g.add(tw,pk);g.userData={pk};return g}); + const k=S.main?1:.65;S.d.tw.position.set(S.x0,-20,3);S.d.tw.scale.setScalar(k);S.ball.visible=true;S.d.b0=S.ball.position.clone(); + S.snd((A,t,v)=>{A.noise(t+.45,.2,200,.8,.35*v,'lowpass');A.tone(t+.5,.4,'sawtooth',200,900,.04*v);for(const [f,g] of[[1319,.1],[2637,.05],[3951,.025]])A.tone(t+.9,1.3,'sine',f,f,g*v)}); + }, + step(S,t,dt){ + const tw=S.d.tw,k=S.main?1:.65,pk=tw.userData.pk,up=backOut(seg(t,0,.35));tw.position.y=-20+20*up-20*seg(t,2.1,2.5); + const ring=t>.9&&t<1.6,py=t<.5?1.6:t<.9?1.6+15*sm(.5,.9,t):t<1.4?16.6:16.6-15*sm(1.4,1.9,t);pk.position.set(0,py,.75); + tw.rotation.z=ring&&!RM()?Math.sin((t-.9)*40)*.012*(1-seg(t,.9,1.6)):0; + const pad=_ip.set(S.x0,tw.position.y+(1+BR*.7)*k,3+1.6*k); + if(t<.45){S.ball.position.lerpVectors(S.d.b0,pad,sm(0,.45,t));S.ball.position.y+=Math.sin(seg(t,0,.45)*Math.PI)*6} + else if(t<1.2){const f=seg(t,.45,1.2);S.ball.position.set(pad.x+f*7,pad.y+Math.sin(f*Math.PI)*5,pad.z+f*5);S.ball.rotation.z-=dt*6} + if(S.at(1.2)){S.ball.visible=false;S.burst(S.ball.position.x,S.ball.position.y,S.ball.position.z,12,2,5,.6,.5,.9,[CELL.puff],[0xffffff],oPuff)} + if(S.at(.45))shk(S,.3); + if(t>.5&&t<.9){const wy=tw.position.y+py*k;S.em(S.x0,wy,3+.8*k,rand(-1,1),-2,rand(-.5,.5),.3,.9*k,CELL.glow,0xffd23f,oGlow)} + if(S.at(.9)){const by=tw.position.y+17.6*k;S.ring(S.x0,by,3,0xffd23f,1,12,.6);S.burst(S.x0,by,3,70,6,16,1.2,.4,.9,[CELL.star,CELL.spark],[0xffd23f,0xffffff,S.col],oSpark);shk(S,.4)} + } } ]; let mainStage=null; diff --git a/e63334287a3deaa3/cosmetics.js b/e63334287a3deaa3/cosmetics.js index 1b637448..87b49b78 100644 --- a/e63334287a3deaa3/cosmetics.js +++ b/e63334287a3deaa3/cosmetics.js @@ -393,6 +393,90 @@ I('boostball', 'hat', 11, 'Robot Dome', 'rare', '#B8BCCF', '#3FD2FF', 'A steel dome with a visor and two antennas.'); I('boostball', 'hat', 12, 'Ref Cap', 'common', '#14161F', '#F6F6F6', 'Black with white stripes.'); I('boostball', 'wheels', 5, 'Black Chrome', 'rare', '#2A2C34', '#C8D2DC', 'Five spokes in dark, shiny chrome.'); + // third wave (Nov 2026): decals 39 to 62, trails 33 to 49, goal explosions 26 to 43, toppers 13 to 36 + I('boostball', 'decal', 39, 'Number Eight', 'common', '#FFFFFF', '#3F8CFF', 'A big jersey eight and striped sleeves in your accent colour.'); + I('boostball', 'decal', 40, 'Speed Slashes', 'common', '#FFFFFF', '#FF8A3D', 'Three slanted bars by the nose.'); + I('boostball', 'decal', 41, 'Baseball Stitches', 'common', '#F6F4EA', '#D8262F', 'Red stitched seams curving over the car.'); + I('boostball', 'decal', 42, 'Pitch Lines', 'uncommon', '#FFFFFF', '#2E8A4A', 'Mown stripes, a centre circle on the roof and both boxes.'); + I('boostball', 'decal', 43, 'Vintage Racer', 'rare', '#F4F1E6', '#14161F', 'A white number disc and a thin pinstripe, like an old race car.'); + I('boostball', 'decal', 44, 'Pinstriping', 'uncommon', '#FFFFFF', '#FFD23F', 'Thin hand-painted curls over the bonnet.'); + I('boostball', 'decal', 45, 'Low Poly', 'uncommon', '#8FB8FF', '#2E5FD9', 'Your paint broken into big flat facets.'); + I('boostball', 'decal', 46, 'Chevrons', 'common', '#FFFFFF', '#FF4FB4', 'Big arrowheads pointing the way.'); + I('boostball', 'decal', 47, 'Leopard Spots', 'rare', '#1B140E', '#E0A050', 'Broken dark rings, very fast cat.'); + I('boostball', 'decal', 48, 'Paw Prints', 'common', '#FFFFFF', '#8FA3B8', 'Someone walked all over your car.'); + I('boostball', 'decal', 49, 'Big Waves', 'rare', '#FFFFFF', '#5CC8FF', 'Rolling waves with curls of foam along the bottom.'); + I('boostball', 'decal', 50, 'Sunburst', 'uncommon', '#FFE45C', '#FF8A3D', 'Pale rays fanning out from the nose.'); + I('boostball', 'decal', 51, 'Treasure Map', 'epic', '#ECDCAA', '#B0302A', 'A scrap of old map on each door and a compass rose on the roof.'); + I('boostball', 'decal', 52, 'Eye Patch', 'rare', '#121318', '#FFFFFF', 'A black patch over one headlight. Arr.'); + I('boostball', 'decal', 53, 'Tracksuit and Chain', 'common', '#FFFFFF', '#E9B93A', 'Two white stripes a side and a gold chain over the nose.'); + I('boostball', 'decal', 54, 'Suit and Tie', 'uncommon', '#2F3140', '#F6F6F6', 'Dark lapels, a white shirt and a long tie in your accent colour.'); + I('boostball', 'decal', 55, 'Hazard Stripes', 'common', '#FFD21F', '#14161F', 'Yellow and black bands on the sills and bumpers.'); + I('boostball', 'decal', 56, 'Barcode', 'common', '#F4F6FF', '#14161F', 'Scan before use.'); + I('boostball', 'decal', 57, 'Synthwave Sunset', 'epic', '#FF3FA4', '#FFE45C', 'A striped sun setting behind a glowing pink grid.'); + I('boostball', 'decal', 58, 'Polka Dots', 'common', '#FFFFFF', '#FF5C9A', 'White dots, evenly spaced.'); + I('boostball', 'decal', 59, 'Music Staff', 'uncommon', '#FFFFFF', '#B46CFF', 'Five lines and a run of notes along each side.'); + I('boostball', 'decal', 60, 'Paisley', 'rare', '#FF8A3D', '#FFFFFF', 'Curled teardrops and dots, like a bandana.'); + I('boostball', 'decal', 61, 'Golf Argyle', 'uncommon', '#3F8CFF', '#FFFFFF', 'Diamonds in two shades with thin crossing lines.'); + I('boostball', 'decal', 62, 'Title Belt', 'legendary', '#E9B93A', '#17151B', 'A black strap round the car with a big gold plate and gems.'); + I('boostball', 'trail', 33, 'Green Flame', 'common', '#46E39A', '#D8FF8A', 'Fire, but green.'); + I('boostball', 'trail', 34, 'Violet Flame', 'uncommon', '#B46CFF', '#FFB0F8', 'Flickering purple fire with white sparks.'); + I('boostball', 'trail', 35, 'Afterburner', 'rare', '#8FD6FF', '#FFFFFF', 'A tight blue-white jet with rings, like a fighter plane.'); + I('boostball', 'trail', 36, 'Sports Balls', 'epic', '#FFFFFF', '#E8742A', 'Footballs, basketballs and tennis balls bouncing out behind.'); + I('boostball', 'trail', 37, 'Cannon Smoke', 'uncommon', '#C8CCD6', '#FFA040', 'Grey puffs with a flash of fire, like a ship firing.'); + I('boostball', 'trail', 38, 'Gems', 'rare', '#FF5C9A', '#5CC8FF', 'Rubies, sapphires and emeralds spilling out.'); + I('boostball', 'trail', 39, 'Paw Prints', 'common', '#FFFFFF', '#FFF1E0', 'Little white paws hanging in the air behind you.'); + I('boostball', 'trail', 40, 'Paper Planes', 'uncommon', '#FFFFFF', '#C8D0DC', 'Folded planes gliding off the back.'); + I('boostball', 'trail', 41, 'Spare Parts', 'rare', '#C8D2DC', '#FFD23F', 'Gears and nuts rattling loose.'); + I('boostball', 'trail', 42, 'Pizza Slices', 'uncommon', '#FFD25A', '#C0392B', 'Lunch, launched.'); + I('boostball', 'trail', 43, 'Comet Tail', 'epic', '#FFF2C2', '#8FD6FF', 'A tight bright streak with stars falling out of it.'); + I('boostball', 'trail', 44, 'Cherry Blossoms', 'common', '#FFC2DD', '#FFFFFF', 'Pink petals drifting behind you.'); + I('boostball', 'trail', 45, 'Ghosts', 'rare', '#FFFFFF', '#E6F0FF', 'Small friendly ghosts floating away.'); + I('boostball', 'trail', 46, 'Pixel Fire', 'uncommon', '#FF8A1F', '#FFD23F', 'Fire made of square blocks.'); + I('boostball', 'trail', 47, 'Ice Shards', 'common', '#BFE4FF', '#FFFFFF', 'Splinters of ice skittering behind.'); + I('boostball', 'trail', 48, 'Hockey Pucks', 'common', '#1D2027', '#5A6070', 'Pucks sliding out across the floor.'); + I('boostball', 'trail', 49, 'Fire and Ice', 'legendary', '#FF8A1F', '#8FD6FF', 'An orange and a blue strand twisting round each other.'); + I('boostball', 'goal', 26, 'Giant Trophy', 'epic', '#FFC83A', '#C98A12', 'A gold cup rises out of the pitch and fires streamers in your colour.'); + I('boostball', 'goal', 27, 'Stadium Wave', 'legendary', '#FFFFFF', '#3F8CFF', 'Cards in your team colour leap up all round the stands in a wave.'); + I('boostball', 'goal', 28, 'Robot Salute', 'epic', '#B8BCCF', '#3FD2FF', 'Parts fly in, bolt together into a robot, it salutes and jets off.'); + I('boostball', 'goal', 29, 'Tidal Wave', 'legendary', '#2E7BFF', '#BFE9FF', 'A wall of water rolls out over half the pitch and crashes down.'); + I('boostball', 'goal', 30, 'Aurora', 'rare', '#46E39A', '#B46CFF', 'The ball melts into curtains of green and violet light.'); + I('boostball', 'goal', 31, 'Light Dragon', 'legendary', '#FFB347', '#FF5C6A', 'A dragon made of light loops out over the pitch and dives back in.'); + I('boostball', 'goal', 32, 'Disco Floor', 'legendary', '#FF3FA4', '#38E6FF', 'The pitch lights up in coloured tiles and pulses to a beat.'); + I('boostball', 'goal', 33, 'Piano Keys', 'rare', '#F4F4F0', '#17181D', 'A giant keyboard rises and the ball hops along it playing a tune.'); + I('boostball', 'goal', 34, 'Bubble Pop', 'common', '#BFE9FF', '#FFD9F5', 'A giant soap bubble swallows the ball and pops.'); + I('boostball', 'goal', 35, 'Balloon Release', 'common', '#FF5C5C', '#FFFFFF', 'A bunch of balloons in your colour floats out of the goal.'); + I('boostball', 'goal', 36, 'Paint Splash', 'common', '#3F8CFF', '#FFFFFF', 'Your team colour splatted over the net and the floor.'); + I('boostball', 'goal', 37, 'Thunderclap', 'common', '#DFF3FF', '#D8D2C4', 'A clap of air throws rings and dust along the floor.'); + I('boostball', 'goal', 38, 'Kraken', 'epic', '#8A2F6A', '#08262E', 'Tentacles rise from a dark pool, grab the ball and drag it under.'); + I('boostball', 'goal', 39, 'Rocket Launch', 'rare', '#F4F6FF', '#D8262F', 'Countdown, lift-off, and a burst of stars high above.'); + I('boostball', 'goal', 40, 'Red Carpet', 'rare', '#B3122A', '#E0B040', 'A red carpet unrolls and the ball rolls out to camera flashes.'); + I('boostball', 'goal', 41, 'Snow Globe', 'epic', '#CFE8FF', '#6B3E1E', 'A glass globe drops over the goal, gets a shake, and it snows.'); + I('boostball', 'goal', 42, 'Slam Dunk', 'uncommon', '#FF5A1F', '#FFFFFF', 'A hoop swings out and the ball drops through with a swish.'); + I('boostball', 'goal', 43, 'High Striker', 'uncommon', '#D8262F', '#FFC83A', 'The puck shoots up the tower and rings the bell.'); + I('boostball', 'topper', 13, 'Foam Finger', 'common', '#3F8CFF', '#FFFFFF', 'Number one, in your accent colour.'); + I('boostball', 'topper', 14, 'Trophy', 'epic', '#FFC83A', '#3A2A1A', 'A tiny gold cup with two handles.'); + I('boostball', 'topper', 15, 'Whistle', 'common', '#C8D2DC', '#D8262F', 'A referee\'s whistle on a red loop.'); + I('boostball', 'topper', 16, 'Tricorn', 'epic', '#2A2440', '#E0B040', 'A little pirate hat with three arched sides and gold trim.'); + I('boostball', 'topper', 17, 'Eye Patch Flag', 'rare', '#15161C', '#F2EAD0', 'A black flag with an eye patch on it. No skull.'); + I('boostball', 'topper', 18, 'Halo', 'rare', '#FFE680', '#FFFFFF', 'Floating just above. Innocent, honest.'); + I('boostball', 'topper', 19, 'Pizza Slice', 'uncommon', '#FFD25A', '#C0392B', 'Extra cheese, two pepperoni a side.'); + I('boostball', 'topper', 20, 'Flying Saucer', 'epic', '#B8C0CC', '#8FE6FF', 'A tiny saucer with a tiny green pilot.'); + I('boostball', 'topper', 21, 'Cactus', 'common', '#3E9A4A', '#C0643A', 'In a pot, with a pink flower.'); + I('boostball', 'topper', 22, 'Wizard Hat', 'rare', '#2A2A7A', '#FFE23F', 'Pointy, bent, with gold stars.'); + I('boostball', 'topper', 23, 'Smiley Ball', 'common', '#FFE23F', '#14161F', 'The classic happy aerial ball.'); + I('boostball', 'topper', 24, 'Racing Helmet', 'uncommon', '#3F8CFF', '#15171B', 'In your accent colour, with a dark visor.'); + I('boostball', 'topper', 25, 'Baseball Cap', 'common', '#3F8CFF', '#FFFFFF', 'A little cap in your accent colour.'); + I('boostball', 'topper', 26, 'Boxing Glove', 'uncommon', '#D8262F', '#FFFFFF', 'Red leather, white cuff.'); + I('boostball', 'topper', 27, 'Golf Ball', 'common', '#FFFFFF', '#E8C9A0', 'On a wooden tee.'); + I('boostball', 'topper', 28, 'Mini Fedora', 'uncommon', '#6B6F7C', '#15161C', 'Grey felt with a black band.'); + I('boostball', 'topper', 29, 'Mini Top Hat', 'uncommon', '#22232B', '#3F8CFF', 'Black silk with a band in your accent colour.'); + I('boostball', 'topper', 30, 'Mini Cone', 'common', '#FF7A1F', '#FFFFFF', 'A traffic cone, but tiny.'); + I('boostball', 'topper', 31, 'Propeller Cap', 'uncommon', '#D93636', '#FFD23F', 'Four colours and a propeller that does not spin you anywhere.'); + I('boostball', 'topper', 32, 'Little Chef Hat', 'common', '#FFFFFF', '#E6E8EE', 'Puffed up and spotless.'); + I('boostball', 'topper', 33, 'Royal Crown', 'legendary', '#FFC83A', '#8A1030', 'Gold points, red velvet and a gem of every colour.'); + I('boostball', 'topper', 34, 'American Football', 'common', '#8A4A22', '#FFFFFF', 'A tiny ball with white laces.'); + I('boostball', 'topper', 35, 'Bowling Pin', 'common', '#FFFFFF', '#D8262F', 'Still standing.'); + I('boostball', 'topper', 36, 'Satellite Dish', 'rare', '#E6E9EF', '#D8262F', 'Picks up every match on the planet.'); // Slipstream sponsors (all made up): signing with one is free, and its sticker goes on the car. c1 and c2 are its colours. I('slipstream', 'sponsor', 1, 'Zoomi Cola', 'common', '#12B5A6', '#FFF3D6', 'Fizzy, fast and slightly too sweet.'); I('slipstream', 'sponsor', 2, 'Burnout Coffee', 'common', '#3B2416', '#FFB347', 'Roasted until the tyres smoke.'); From e6d7747e1567889c4ca958c80f402e37a6b12935 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 07:31:25 +0000 Subject: [PATCH 47/63] Driftfall Locker: 28 more outfits (OUTFITS 84-111): sports, robots, pirates, suits, onesies, food mascots and more Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn --- e63334287a3deaa3/cosmetics.js | 28 +++++ e63334287a3deaa3/drop-zone/es.js | 30 ++++- e63334287a3deaa3/drop-zone/index.html | 172 ++++++++++++++++++++++++++ 3 files changed, 229 insertions(+), 1 deletion(-) diff --git a/e63334287a3deaa3/cosmetics.js b/e63334287a3deaa3/cosmetics.js index 3dd83b70..ff91541a 100644 --- a/e63334287a3deaa3/cosmetics.js +++ b/e63334287a3deaa3/cosmetics.js @@ -1076,6 +1076,34 @@ I('drop-zone', 'emote', 8, 'Tip the Hat', 'common', '#B4BAC6', '#3A9BDC', 'A hand to the brim and a polite nod.'); I('drop-zone', 'emote', 9, 'Pirate Arr', 'uncommon', '#FF6A55', '#FFC93C', 'A fist on your hip, pointing out to sea.'); I('drop-zone', 'emote', 10, 'Power Down', 'rare', '#C9D1DA', '#3EE6FF', 'Slump, hang, then jerk back on like a robot.'); + I('drop-zone', 'outfit', 84, 'Race Car Driver', 'rare', '#F2EFE8', '#E8453C', 'A full helmet with a gold visor, a chevron suit and a big 8.'); + I('drop-zone', 'outfit', 85, 'Beach Volleyball', 'common', '#3A9BDC', '#FFD23F', 'A sleeveless top, a sun visor and a big ball on your back.'); + I('drop-zone', 'outfit', 86, 'Rugby Player', 'common', '#3A9BDC', '#FFD23F', 'Gold hoops, a padded scrum cap and an oval ball.'); + I('drop-zone', 'outfit', 87, 'Baseball Catcher', 'uncommon', '#FF8A1F', '#F2EFE8', 'A chest protector, a cage mask and a huge mitt.'); + I('drop-zone', 'outfit', 88, 'Sprinter', 'common', '#3A9BDC', '#FF6FB5', 'A race bib, pink shorts and a headband with little wings.'); + I('drop-zone', 'outfit', 89, 'Bowler', 'common', '#F1E6CF', '#3A9BDC', 'A two-tone bowling shirt and a ball and pins on your back.'); + I('drop-zone', 'outfit', 90, 'Snowboarder', 'uncommon', '#FF8A1F', '#FF9FC7', 'A baggy orange jacket, a beanie with ears and big goggles.'); + I('drop-zone', 'outfit', 91, 'Hockey Goalie', 'rare', '#F2EFE8', '#FFD23F', 'A painted mask, a blocker, a catching glove and a 30.'); + I('drop-zone', 'outfit', 92, 'Golden Robot', 'epic', '#FFC93C', '#E8453C', 'Shiny gold from head to toe, with a red eye bar.'); + I('drop-zone', 'outfit', 93, 'Arcade Bot', 'rare', '#FF9FC7', '#5CE1FF', 'A TV-screen head with a smile and buttons on its chest.'); + I('drop-zone', 'outfit', 94, 'Wind-Up Robot', 'uncommon', '#FF6A55', '#FFD23F', 'A tin toy in red and white with a big key on its back.'); + I('drop-zone', 'outfit', 95, 'Pirate Queen', 'legendary', '#FF6A55', '#FFC93C', 'A long red coat, an eye patch and a wide hat with a big plume.'); + I('drop-zone', 'outfit', 96, 'Pirate Lookout', 'common', '#E8453C', '#F2EFE8', 'A striped shirt, an eye patch, a bandana and a brass spyglass.'); + I('drop-zone', 'outfit', 97, 'Pirate Cook', 'uncommon', '#F2EFE8', '#FFD23F', 'An eye patch, a floppy cook\'s hat and a pot on your back.'); + I('drop-zone', 'outfit', 98, 'The Don', 'epic', '#C8B4FF', '#FFC93C', 'A lilac double-breasted suit, a red rose and a white fedora.'); + I('drop-zone', 'outfit', 99, 'Getaway Driver', 'common', '#FFC13A', '#FF8A1F', 'A mustard driving jacket, a flat cap and orange shades.'); + I('drop-zone', 'outfit', 100, 'Card Dealer', 'uncommon', '#E8453C', '#FFD23F', 'A red waistcoat, armbands, a gold visor and a fan of cards.'); + I('drop-zone', 'outfit', 101, 'Winter Tracksuit', 'rare', '#F2EFE8', '#FAF6EE', 'A white tracksuit, a gold chain and a fur hat with ear flaps.'); + I('drop-zone', 'outfit', 102, 'Retro Rocketeer', 'rare', '#DFE6EE', '#FF6A55', 'A glass bubble helmet and a rocket pack with fins.'); + I('drop-zone', 'outfit', 103, 'Star Hero', 'epic', '#5CE1FF', '#E8453C', 'A cyan suit, a red mask, a gold star and a red cape.'); + I('drop-zone', 'outfit', 104, 'Golden Knight', 'legendary', '#FFC93C', '#F2EFE8', 'Gold armour, a great helm with a plume and a shield.'); + I('drop-zone', 'outfit', 105, 'Jester', 'uncommon', '#FFD23F', '#FF6A55', 'Patches of colour, a zigzag collar and a two-horned cap with bells.'); + I('drop-zone', 'outfit', 106, 'Disco Star', 'rare', '#FFD23F', '#FF6FB5', 'A sparkly gold shirt, a wide collar, a big hairdo and a mirror ball.'); + I('drop-zone', 'outfit', 107, 'Shark Onesie', 'common', '#7CC8F8', '#F2EFE8', 'A shark hood with teeth and a fin on your back.'); + I('drop-zone', 'outfit', 108, 'Unicorn Onesie', 'uncommon', '#F2EFE8', '#FF9FC7', 'A golden horn and a rainbow mane.'); + I('drop-zone', 'outfit', 109, 'Dino Onesie', 'common', '#FF8A1F', '#5CE1FF', 'An orange dino hood, spikes and a tail.'); + I('drop-zone', 'outfit', 110, 'Burger Mascot', 'common', '#FFD23F', '#F2C27A', 'A bun head with seeds, cheese, tomato and a lettuce frill.'); + I('drop-zone', 'outfit', 111, 'Hot Dog Mascot', 'common', '#FFE4B0', '#FF6A55', 'A bun hood, a sausage and a mustard zigzag.'); // Items a game hands over itself are in no pack: give is 'free' (anyone may wear it; the game grants it the first time it // is worn) or 'earned' (the game grants it when it is won). grant(id), below, only adds these. GAME_ITEMS.forEach(function (it) { if (it.game !== 'slipstream') return; if (it.slot === 'sponsor' || (it.slot === 'helmet' && it.no <= 8)) it.give = 'free'; else if (it.slot === 'livery' && it.no > 8) it.give = 'earned'; }); diff --git a/e63334287a3deaa3/drop-zone/es.js b/e63334287a3deaa3/drop-zone/es.js index 4125ae9a..42542787 100644 --- a/e63334287a3deaa3/drop-zone/es.js +++ b/e63334287a3deaa3/drop-zone/es.js @@ -242,7 +242,35 @@ 'Soccer Goal': 'Arco de fútbol', 'Hockey Stick': 'Palo de hockey', 'Robot Rotor': 'Rotor de robot', 'Briefcase Parachute': 'Paracaídas de maletín', 'Team Stripes': 'Rayas de equipo', 'Pinstripe': 'Raya diplomática', 'Treasure Map': 'Mapa del tesoro', 'Circuit Board': 'Placa de circuitos', 'Basketball': 'Pelota de básquet', 'Goal Celebration': 'Festejo de gol', 'Tip the Hat': 'Saludo con el sombrero', 'Pirate Arr': '¡Arrr pirata!', - 'Power Down': 'Apagón' + 'Power Down': 'Apagón', + 'Race Car Driver': 'Piloto de autos', + 'Beach Volleyball': 'Vóley playero', + 'Rugby Player': 'Jugador de rugby', + 'Baseball Catcher': 'Receptor de béisbol', + 'Sprinter': 'Velocista', + 'Bowler': 'Jugador de bolos', + 'Snowboarder': 'Snowboarder', + 'Hockey Goalie': 'Arquero de hockey', + 'Golden Robot': 'Robot dorado', + 'Arcade Bot': 'Robot arcade', + 'Wind-Up Robot': 'Robot a cuerda', + 'Pirate Queen': 'Reina pirata', + 'Pirate Lookout': 'Vigía pirata', + 'Pirate Cook': 'Cocinero pirata', + 'The Don': 'El Don', + 'Getaway Driver': 'Chofer de la fuga', + 'Card Dealer': 'Crupier', + 'Winter Tracksuit': 'Jogging de invierno', + 'Retro Rocketeer': 'Cohetero retro', + 'Star Hero': 'Héroe estelar', + 'Golden Knight': 'Caballero dorado', + 'Jester': 'Bufón', + 'Disco Star': 'Estrella disco', + 'Shark Onesie': 'Pijama de tiburón', + 'Unicorn Onesie': 'Pijama de unicornio', + 'Dino Onesie': 'Pijama de dino', + 'Burger Mascot': 'Mascota hamburguesa', + 'Hot Dog Mascot': 'Mascota pancho' }; for (var k2 in lk) d[k2] = lk[k2]; diff --git a/e63334287a3deaa3/drop-zone/index.html b/e63334287a3deaa3/drop-zone/index.html index 7a928861..43028139 100644 --- a/e63334287a3deaa3/drop-zone/index.html +++ b/e63334287a3deaa3/drop-zone/index.html @@ -3774,6 +3774,178 @@

{L(B,0,1.24,.31,.44,.5,.2,RD);T(B,0,0,1.85,.36,.04,1.3,.04,0x8d96a0);X(B,0,2.15,.38,.3,.5,.02,c.hex);T(B,0,0,2.15,.395,.12,.12,.02,GOLD,0,0,.785)})}, // a small banner on a pole hat(B,c){R(B,0,1.98,.02,.6,.32,.6,0xff7a68);L(B,0,1.8,.16,.72,.14,.5,0xff7a68);L(B,0,2.02,-.3,.16,.12,.04,GOLD);for(const s of [-1,1])T(B,0,s*.12,2.2,-.28,.04,.3,.03,GOLD,0,0,-s*.5)}}, // helmet, neck guard, a golden crest + // Wave four (19 November 2026): OUTFITS 84 on, each meant to be told apart at 30 m by its outline or its blocks of + // colour. The same rules: something on the back as deep as the backpack, never darker than the standard, no ground + // colours, at least as tall as the standard cap. Sports first, then robots, pirates, suits and the rest. + {id:'racedriver',name:'Race Car Driver',hatFace:{y:1.81,cell:.034,flat:-.401},legs:h=>[1,WHITE,h,WHITE,WHITE,0xe8453c], + body(B,c){const RD=0xe8453c;fitBase(B,c,WHITE,WHITE,RD,WHITE); + for(const s of [-1,1]){T(B,0,s*.12,1.36,-.255,.1,.5,.03,c.hex,0,0,-s*.5);X(B,s*.41,1.1,0,.04,.6,.3,c.hex)}X(B,0,1.26,-.258,.36,.06,.03,RD); // a chevron and side panels in your colour, a red band + L(B,0,.9,0,.74,.1,.46,RD);for(let k=0;k<4;k++)X(B,-.15+k*.1,1.5,-.258,.08,.08,.02,k%2?INK:WHITE); // a red belt, a chequered strip + back(B,c,()=>{R(B,0,1.24,.31,.5,.56,.2,WHITE);num(B,8,0,1.26,.43,.34,c.hex)})}, // a big 8 on the back + hat(B,c){R(B,0,1.83,0,.64,.62,.64,c.hex);if(c.face)X(B,0,1.81,-.365,.46,.37,.06,c.skin);else X(B,0,1.84,-.36,.5,.2,.06,0xffd23f);X(B,0,2.17,0,.14,.06,.62,WHITE);X(B,0,2.0,.33,.4,.08,.04,0xe8453c)}}, // full helmet, a gold visor, a stripe + {id:'volley',name:'Beach Volleyball',legs:(h,sk)=>[1,h,sk,sk,sk,0xffd23f], + body(B,c){fitBase(B,c,c.hex,c.skin,c.skin,c.skin,{hair:'top'});shades(B,c,0xff8a1f); + for(const s of [-1,1]){X(B,s*.3,1.42,-.24,.05,.34,.05,0xffd23f);X(B,s*.3,1.42,.24,.05,.34,.05,0xffd23f)}X(B,0,1.2,-.255,.5,.08,.03,0xffd23f);num(B,4,0,1.36,-.255,.14,WHITE,1); // a sleeveless top with yellow trim + R(B,0,.9,0,.74,.12,.46,0xffd23f);cuffs(B,WHITE); + back(B,c,()=>{R(B,0,1.24,.36,.5,.5,.3,WHITE);for(const [x,y,k] of [[-.12,1.34,0xffd23f],[.12,1.14,0x3fa9f5]])X(B,x,y,.52,.26,.14,.02,k)})}, // a big volleyball + hat(B,c){hairUp(B,c);L(B,0,1.98,0,.57,.08,.57,0xffd23f);L(B,0,1.96,-.31,.52,.05,.24,0xffd23f)}}, // a sun visor + {id:'rugby',name:'Rugby Player',legs:(h,sk)=>[0,WHITE,sk,h,WHITE,INK], + body(B,c){fitBase(B,c,c.hex,c.hex,c.skin,c.hex,{torso:false}); + bagPaint(B,0,1.22,0,.7,.72,.42,[4,6,3],c.hex,(f,i,j)=>f[0]!=='y'&&j%2?0xffd23f:undefined); // gold hoops + L(B,0,1.6,0,.42,.1,.42,WHITE);R(B,0,.9,0,.74,.1,.46,WHITE);bands(B,0xffd23f); + back(B,c,()=>{L(B,0,1.24,.31,.56,.6,.2,c.hex);num(B,10,0,1.26,.43,.3,WHITE);T(B,2,.26,.92,.38,.24,.36,.24,0xf2efe8,0,0,.6)})}, // 10 on the back, an oval ball + hat(B,c){R(B,0,1.98,.02,.58,.36,.58,0xffd23f);for(const s of [-1,1])L(B,s*.3,1.82,0,.08,.22,.22,0xffd23f);X(B,0,2.17,0,.06,.04,.56,c.hex)}}, // a padded scrum cap + {id:'catcher',name:'Baseball Catcher',hatFace:{y:1.79,cell:.03,flat:-.37},legs:h=>[1,WHITE,h,0xff8a1f,0xff8a1f,INK], + body(B,c){const OR=0xff8a1f;fitBase(B,c,WHITE,c.hex,c.skin,WHITE); + L(B,0,1.24,-.2,.6,.66,.16,OR);for(const y of [1.42,1.24,1.06])X(B,0,y,-.29,.5,.03,.03,0xffd23f);for(const s of [-1,1])X(B,s*.17,1.5,-.24,.06,.3,.08,c.hex); // a chest protector and its straps + L(B,-.12,1.36,-.49,.28,.28,.18,0xf08a2a,-.4);L(B,.3,1.355,-.505,.13,.15,.16,WHITE);L(B,0,.9,0,.74,.08,.46,c.hex); // a huge mitt + back(B,c,()=>{L(B,0,1.24,.31,.5,.56,.2,WHITE);num(B,2,0,1.26,.43,.32,OR)})}, + hat(B,c){R(B,0,2.0,.04,.56,.3,.56,c.hex);L(B,0,1.94,.29,.5,.05,.18,c.hex);X(B,0,1.78,-.33,.44,.4,.04,c.skin);if(!c.face)eyes(B,1.83,-.355); + for(const y of [1.64,1.74,1.84])X(B,0,y,-.37,.48,.04,.03,0xff8a1f);for(const x of [-.14,.14])X(B,x,1.76,-.37,.04,.3,.03,0xff8a1f)}}, // cap backwards and a cage mask + {id:'sprinter',name:'Sprinter',legs:(h,sk)=>[1,h,0xff6fb5,sk,sk,0xff6fb5], + body(B,c){fitBase(B,c,c.hex,c.hex,c.skin,c.hex,{hair:'top'}); + for(const s of [-1,1])X(B,s*.41,1.2,0,.04,.7,.3,WHITE); // a running top + X(B,0,1.24,-.26,.4,.3,.02,WHITE);num(B,100,0,1.24,-.265,.14,0xe8453c,1);for(const x of [-.17,.17])X(B,x,1.37,-.272,.03,.03,.02,0xffd23f);R(B,0,.9,0,.74,.12,.46,0xff6fb5); // a race bib, pink shorts + back(B,c,()=>{L(B,0,1.24,.31,.5,.56,.2,c.hex);num(B,100,0,1.24,.43,.16,WHITE)})}, // the bib on the back too + hat(B,c){hairUp(B,c);L(B,0,1.96,0,.56,.08,.56,0xff6fb5);for(const s of [-1,1])T(B,1,s*.34,2.0,.02,.04,.14,.24,WHITE,0,0,-s*.5)}}, // a headband with little wings + {id:'bowler',name:'Bowler',legs:0x8ab4f0, + body(B,c){fitBase(B,c,CREAM,CREAM,c.skin,CREAM,{torso:false});tee(B,c.hex); + bagPaint(B,0,1.22,0,.7,.72,.42,[4,4,3],CREAM,(f,i)=>f[0]==='z'&&(i===1||i===2)?c.hex:undefined); // a two-tone bowling shirt + L(B,-.12,1.57,-.2,.22,.1,.15,WHITE);L(B,.12,1.57,-.2,.22,.1,.15,WHITE);X(B,-.2,1.4,-.255,.12,.08,.02,0xe8453c);R(B,0,.9,0,.74,.08,.46,0xe8453c); // collar, a name patch + back(B,c,()=>{L(B,0,1.22,.31,.5,.56,.2,CREAM);L(B,0,1.24,.43,.4,.4,.06,c.hex);for(const [x,y] of [[-.06,1.32],[.06,1.32],[0,1.22]])X(B,x,y,.465,.06,.06,.02,WHITE);for(const x of [-.25,.25])L(B,x,1.6,.33,.08,.16,.08,WHITE)})}, // a big ball and two pins + hat(B,c){hairUp(B,c);X(B,0,2.17,-.05,.5,.04,.4,shadeOf(c.hair,1.2))}}, + {id:'snowboard',name:'Snowboarder',legs:()=>[1,0xff9fc7,0xff9fc7,0xff9fc7,0xff9fc7,WHITE], + body(B,c){const OR=0xff8a1f;fitBase(B,c,OR,OR,c.hex,OR); + R(B,0,.86,0,.8,.24,.5,OR);for(const s of [-1,1])X(B,s*.42,1.1,0,.04,.7,.34,c.hex);L(B,0,1.58,0,.5,.16,.46,c.hex);X(B,0,1.2,-.27,.04,.6,.03,WHITE); // a baggy jacket, your-colour panels and collar + back(B,c,()=>{pack(B,WHITE);T(B,1,0,1.2,.44,.4,1.24,.06,0x5ce1ff,0,0,0);X(B,0,1.2,.475,.4,.1,.02,c.hex);for(const y of [.88,1.52])X(B,0,y,.48,.2,.08,.04,INK)})}, // a board on the back + hat(B,c){R(B,0,2.02,.04,.58,.34,.58,c.hex);L(B,0,1.94,-.02,.6,.12,.6,WHITE);L(B,0,1.96,-.31,.5,.16,.08,0xff6fb5);X(B,0,1.96,-.355,.4,.1,.02,0xffd23f);for(const s of [-1,1])T(B,1,s*.2,2.24,.04,.12,.16,.12,c.hex,0,0,s*.4)}}, // a beanie with ears and big goggles + {id:'hgoalie',name:'Hockey Goalie',hatFace:{y:1.82,cell:.032,flat:-.37},legs:h=>[1,WHITE,h,WHITE,WHITE,0xb9c2cc], + body(B,c){fitBase(B,c,c.hex,c.hex,WHITE,c.hex); + L(B,0,.86,0,.76,.24,.44,c.hex);X(B,0,.86,-.25,.6,.05,.02,WHITE); // jersey, its hem, a padded yoke + L(B,-.1,1.36,-.5,.28,.32,.14,WHITE,-.4);L(B,.3,1.36,-.5,.26,.3,.2,0xffd23f);X(B,.3,1.36,-.62,.24,.28,.02,c.hex); // a blocker and a catching glove + back(B,c,()=>{pack(B,c.hex);num(B,30,0,1.26,.43,.3,WHITE)})}, + hat(B,c){R(B,0,1.84,0,.62,.62,.64,WHITE);if(c.face)X(B,0,1.81,-.355,.44,.36,.06,c.skin);else{for(const x of [-.1,0,.1])X(B,x,1.76,-.36,.03,.3,.03,INK);X(B,0,1.88,-.36,.3,.03,.03,INK)} + T(B,0,-.18,1.95,-.355,.22,.05,.02,c.hex,0,0,.5);T(B,0,.18,1.95,-.355,.22,.05,.02,c.hex,0,0,-.5);X(B,0,2.17,0,.14,.04,.6,c.hex)}}, // a painted white mask and its cage + // robots + {id:'goldbot',name:'Golden Robot',skin:0xffc93c,hatFace:{y:1.82,box:[1.84,0,.62,.6,.6],flat:-.32},legs:()=>[1,0xffc93c,0xffe98f,0xffc93c,0xffc93c,0xe2a81c], + body(B,c){const G0=0xffc93c,G1=0xffe98f;fitBase(B,c,G0,G0,G1,G0,{hair:false}); + L(B,0,1.3,-.2,.4,.36,.1,G1);for(let k=0;k<3;k++)X(B,-.1+k*.1,1.3,-.26,.06,.06,.02,[0xe8453c,c.hex,0x5ce1ff][k]);for(const y of [1.0,1.14])X(B,0,y,-.255,.5,.03,.02,G1); // a chest plate with lights + L(B,0,.9,0,.74,.1,.46,c.hex); + back(B,c,()=>{R(B,0,1.24,.31,.5,.56,.2,G1);for(const s of [-1,1])L(B,s*.16,1.24,.43,.12,.4,.04,G0);L(B,0,1.62,.31,.14,.14,.14,c.hex)})}, // a power box + hat(B,c){X(B,0,1.84,0,.62,.6,.6,0xffc93c);if(!c.face){X(B,0,1.86,-.305,.46,.1,.02,0xe8453c);X(B,0,1.68,-.305,.3,.06,.02,0xe2a81c)}for(const s of [-1,1])L(B,s*.34,1.84,0,.08,.24,.24,0xffe98f);T(B,0,0,2.3,0,.03,.3,.03,0xe2a81c);L(B,0,2.47,0,.1,.1,.1,0xe8453c)}}, // a box head, a red eye bar, ear bolts, an aerial + {id:'arcadebot',name:'Arcade Bot',skin:0xff9fc7,legs:()=>[1,0xff9fc7,0x5ce1ff,0xff9fc7,0xff9fc7,0xffd23f], + body(B,c){const PK=0xff9fc7,CY=0x5ce1ff;fitBase(B,c,PK,CY,PK,PK,{hair:false}); + for(let k=0;k<4;k++)L(B,-.18+k*.12,1.18,-.23,.08,.08,.06,[0xe8453c,0xffd23f,c.hex,CY][k]);X(B,-.1,1.38,-.255,.12,.04,.02,WHITE);X(B,-.1,1.38,-.255,.04,.12,.02,WHITE); // buttons and a pad + L(B,0,.9,0,.74,.1,.46,CY); + back(B,c,()=>{R(B,0,1.24,.31,.5,.56,.2,CY);X(B,0,1.24,.43,.3,.04,.02,WHITE);X(B,0,1.12,.43,.06,.1,.02,0xffd23f)})}, // a cabinet back with a coin slot + hat(B,c){X(B,0,1.88,0,.7,.62,.6,0xff9fc7);X(B,0,1.88,-.305,.56,.44,.02,0x2a2d4a);if(!c.face){for(const s of [-1,1])X(B,s*.12,1.94,-.32,.08,.1,.02,0x5ce1ff);for(let k=0;k<5;k++)X(B,(k-2)*.06,1.78-(k===0||k===4?0:.03),-.32,.06,.04,.02,0x5ce1ff)} + X(B,0,2.14,0,.08,.04,.4,0xffd23f)}}, // a TV-screen head with a smile on it + {id:'windup',name:'Wind-Up Robot',skin:0xe8eef4,hatFace:{y:1.82,box:[1.84,0,.6,.6,.6]},legs:()=>[1,0xe8453c,0xe8eef4,0xe8453c,0xe8453c,0x5ce1ff], + body(B,c){const RD=0xff6a55,W=0xe8eef4;fitBase(B,c,RD,W,W,W,{hair:false}); + for(const y of [1.08,1.36])X(B,0,y,-.255,.6,.04,.02,0xffd23f);L(B,0,1.22,-.22,.2,.2,.06,c.hex);for(const [x,y] of [[-.25,1.48],[.25,1.48],[-.25,.98],[.25,.98]])X(B,x,y,-.26,.04,.04,.02,W); // stripes, a heart dial, rivets + L(B,0,.9,0,.74,.1,.46,W); + back(B,c,()=>{L(B,0,1.24,.31,.5,.56,.2,RD);T(B,1,0,1.26,.48,.04,.04,.24,0xffd23f,Math.PI/2,0,0);for(const s of [-1,1])T(B,1,s*.14,1.26,.6,.2,.3,.04,0xffd23f,0,0,0)})}, // a big wind-up key + hat(B,c){X(B,0,1.84,0,.6,.6,.6,0xe8eef4);if(!c.face){for(const s of [-1,1])L(B,s*.12,1.88,-.31,.14,.14,.04,0x5ce1ff);X(B,0,1.7,-.305,.3,.05,.02,0xe8453c)}X(B,0,2.15,0,.62,.04,.62,0xff6a55);T(B,0,0,2.28,0,.03,.24,.03,0xffd23f);L(B,0,2.43,0,.1,.1,.1,0xe8453c)}}, + // pirates (each with an eye patch) + {id:'pqueen',name:'Pirate Queen',legs:()=>[1,CREAM,0xff6a55,CREAM,CREAM,0x8a3a2a], + body(B,c){const RC=0xff6a55;fitBase(B,c,RC,RC,c.skin,RC);c.face||eyes(B);patch(B,c); + X(B,0,1.1,-.29,.06,.9,.03,GOLD);for(const y of [1.36,1.18,1.0])for(const s of [-1,1])X(B,s*.12,y,-.29,.06,.06,.02,GOLD); // a long red coat, gold edging and buttons + L(B,0,1.56,-.18,.3,.16,.16,WHITE);L(B,-.184,1.36,-.443,.22,.22,.14,WHITE,-.4);L(B,.3,1.36,-.44,.22,.22,.14,WHITE);R(B,0,.98,0,.76,.1,.48,c.hex); // lace, cuffs, a sash in your colour + back(B,c,()=>{L(B,0,1.12,.32,.6,.84,.16,RC);L(B,0,1.3,.42,.26,.26,.04,GOLD);X(B,0,1.3,.445,.12,.12,.02,c.hex)})}, // the coat's back, a gold medallion + hat(B,c){R(B,0,2.08,0,.72,.06,.6,0xff6a55);R(B,0,2.2,0,.48,.2,.46,0xff6a55);L(B,0,2.12,0,.5,.06,.48,GOLD);for(let k=0;k<3;k++)T(B,0,.2+k*.06,2.32+k*.04,.05,.1,.42,.1,[WHITE,c.hex,0xffd23f][k],0,0,-.6-k*.2);}}, // a wide hat with a big plume, hair down the back + {id:'plookout',name:'Pirate Lookout',legs:0x8ab4f0, + body(B,c){fitBase(B,c,WHITE,WHITE,c.skin,WHITE,{torso:false});c.face||eyes(B);patch(B,c); + bagPaint(B,0,1.22,0,.7,.72,.42,[4,6,3],WHITE,(f,i,j)=>f[0]!=='y'&&j%2?0xe8453c:undefined); // a red and white striped shirt + L(B,0,1.58,0,.46,.12,.44,c.hex);R(B,0,.9,0,.74,.1,.46,0xffd23f); + back(B,c,()=>{L(B,0,1.22,.31,.5,.56,.2,c.hex);T(B,1,.06,1.3,.44,.12,.9,.12,GOLD,0,0,-.3);T(B,1,.16,1.66,.44,.14,.12,.14,0xffe98f,0,0,-.3)})}, // a long brass spyglass across the back + hat(B,c){R(B,0,2.02,.02,.56,.24,.56,0xe8453c);for(const s of [-1,1])T(B,1,s*.06,1.98,.36,.07,.3,.04,0xe8453c,.5,0,s*.4);L(B,0,1.92,0,.58,.06,.58,WHITE)}}, // a red bandana with long tails + {id:'pcook',name:'Pirate Cook',legs:()=>[1,0xffd23f,WHITE,0xffd23f,0xffd23f,0x8a3a2a], + body(B,c){fitBase(B,c,WHITE,WHITE,c.skin,WHITE);c.face||eyes(B);patch(B,c); + L(B,0,1.14,-.2,.6,.66,.12,0xfff4d6);X(B,0,1.24,-.27,.3,.04,.02,c.hex);L(B,0,1.6,0,.46,.1,.44,0xe8453c);R(B,0,.9,0,.74,.08,.46,0xffd23f); // an apron, a red neckerchief + back(B,c,()=>{R(B,0,1.24,.36,.5,.4,.3,0xffd23f);X(B,0,1.44,.36,.52,.06,.32,0xffe14a);T(B,1,.2,1.6,.36,.06,.4,.06,c.hex,0,0,-.4);L(B,.3,1.78,.36,.16,.06,.16,WHITE)})}, // a pot on the back, a ladle in your colour + hat(B,c){R(B,0,2.12,0,.6,.36,.6,WHITE);L(B,0,1.98,0,.56,.1,.56,0xe8453c);T(B,1,-.2,2.12,-.22,.08,.08,.12,0xe8453c,0,0,.785)}}, // a floppy cook's hat + // suits: costume-party style + {id:'don',name:'The Don',legs:()=>[1,0xc8b4ff,0xc8b4ff,0xc8b4ff,0xc8b4ff,WHITE], + body(B,c){const LV=0xc8b4ff;fitBase(B,c,LV,LV,c.skin,LV);c.face||eyes(B); + tie(B,WHITE,0xffd23f);lapels(B,0xb8a0f8);for(const y of [1.3,1.12])for(const s of [-1,1])X(B,s*.1,y,-.275,.05,.05,.02,GOLD);L(B,-.2,1.44,-.27,.12,.12,.06,0xe8453c); // a double-breasted lilac suit, gold tie, a red rose + L(B,0,.9,0,.74,.08,.46,0xb8a0f8);cuffs(B,WHITE);L(B,.3,1.36,-.505,.08,.08,.08,GOLD); // a gold ring + back(B,c,()=>{L(B,0,1.2,.33,.56,.42,.22,0xffd23f);X(B,0,1.2,.455,.4,.06,.02,c.hex);X(B,0,1.44,.33,.18,.06,.06,0xe8453c)})}, // a gold case + hat(B,c){fedora(B,WHITE,0xc8b4ff)}}, + {id:'getaway',name:'Getaway Driver',legs:0x8ab4f0, + body(B,c){const MU=0xffc13a;fitBase(B,c,MU,MU,c.skin,MU);c.face||eyes(B);shades(B,c,0xff8a1f); + L(B,0,1.58,0,.48,.14,.46,WHITE);X(B,0,1.24,-.255,.035,.6,.03,WHITE);for(const s of [-1,1])X(B,s*.425,1.2,0,.04,.7,.08,c.hex);gloves(B,WHITE,1.05); // a mustard driving jacket, white collar, your stripes + L(B,0,.9,0,.74,.08,.46,c.hex); + back(B,c,()=>{L(B,0,1.24,.33,.5,.5,.22,WHITE);for(let k=0;k<4;k++)X(B,-.15+k*.1,1.24,.45,.1,.1,.02,k%2?INK:c.hex);T(B,0,0,1.5,.33,.5,.03,.03,MU)})}, // a bag with a chequered strip + hat(B,c){R(B,0,2.08,0,.56,.15,.58,0xff8a1f);L(B,0,2.02,-.28,.48,.05,.14,0xff8a1f);X(B,0,2.16,0,.08,.04,.5,WHITE)}}, // an orange flat cap + {id:'dealer',name:'Card Dealer',legs:()=>[1,WHITE,WHITE,WHITE,WHITE,0x2a2d34], + body(B,c){const RD=0xe8453c;fitBase(B,c,WHITE,WHITE,c.skin,WHITE);c.face||eyes(B); + L(B,0,1.2,-.2,.56,.6,.1,RD);for(const y of [1.32,1.16,1.0])X(B,0,y,-.26,.05,.05,.02,GOLD);for(const s of [-1,1])T(B,0,s*.07,1.55,-.28,.12,.08,.03,INK,0,0,s*.3); // a red waistcoat, gold buttons, a bow tie + for(const s of [-1,1])L(B,s*.36,1.42,0,.08,.08,.28,RD);cuffs(B,WHITE);L(B,0,.9,0,.74,.08,.46,RD); // red armbands + back(B,c,()=>{L(B,0,1.2,.32,.6,.6,.2,RD);for(const [x,k] of [[-.12,WHITE],[0,0xffd23f],[.12,c.hex]])T(B,0,x,1.22,.43,.14,.2,.02,k,0,0,(x)*1.5)})}, // a fan of big cards + hat(B,c){hairUp(B,c);L(B,0,2.0,-.02,.58,.06,.58,0xe8453c);T(B,0,0,1.98,-.33,.5,.03,.22,0xffd23f,-.3,0,0)}}, // a gold visor + {id:'furtrack',name:'Winter Tracksuit',legs:()=>[1,WHITE,WHITE,WHITE,WHITE,WHITE], + body(B,c){fitBase(B,c,WHITE,WHITE,c.skin,WHITE);c.face||eyes(B); + L(B,0,1.6,0,.44,.1,.4,c.hex);X(B,0,1.24,-.255,.035,.62,.04,c.hex);for(const s of [-1,1])for(const z of [-.06,0,.06])X(B,s*.425,1.2,z,.04,.7,.03,c.hex);cuffs(B,c.hex); // a white tracksuit with stripes in your colour + for(let k=0;k<9;k++){const a=(k/8-.5)*2.2;T(B,0,.2*Math.sin(a)/Math.sin(1.1),1.3+.26*(1-Math.cos(a))/(1-Math.cos(1.1)),-.268,.07,.07,.03,GOLD,0,0,.785)} // a gold chain + back(B,c,()=>{L(B,0,1.24,.33,.5,.5,.22,c.hex);for(const s of [-1,1])X(B,s*.12,1.24,.45,.06,.5,.02,WHITE)})}, // a sports bag + hat(B,c){R(B,0,2.06,0,.6,.34,.58,0xfaf6ee);for(const s of [-1,1])L(B,s*.3,1.84,0,.1,.24,.26,0xfaf6ee)}}, // a fur hat with ear flaps + // and more + {id:'rocketeer',name:'Retro Rocketeer',hatFace:{y:1.8,cell:.03,flat:-.39},legs:()=>[1,0xdfe6ee,0xff6a55,0xdfe6ee,0xdfe6ee,0xff6a55], + body(B,c){const SV=0xdfe6ee,RD=0xff6a55;fitBase(B,c,SV,SV,RD,SV);c.face||eyes(B); + for(const y of [1.04,1.4])L(B,0,y,0,.74,.06,.46,RD);L(B,0,1.24,-.22,.24,.24,.06,c.hex);X(B,0,1.24,-.255,.08,.08,.02,0xffd23f); // a silver suit, red rings, a badge + back(B,c,()=>{for(const s of [-1,1]){L(B,s*.13,1.24,.33,.22,.6,.2,SV);L(B,s*.13,1.62,.33,.16,.16,.16,RD);T(B,1,s*.3,.98,.33,.12,.22,.04,RD,0,0,s*.5)}L(B,0,.9,.36,.3,.08,.2,0xffd23f)})}, // a rocket pack with fins + hat(B,c){R(B,0,1.86,0,.66,.66,.66,0xdff4ff);X(B,0,1.8,-.375,.4,.34,.02,c.skin);if(!c.face)eyes(B,1.83,-.39);X(B,-.18,2.0,-.37,.08,.12,.02,WHITE);L(B,0,1.54,0,.62,.08,.62,0xff6a55);L(B,0,2.24,0,.06,.1,.06,0xffd23f)}}, // a glass bubble helmet + {id:'starhero',name:'Star Hero',legs:()=>[1,0xffd23f,0xffd23f,0xffd23f,0xffd23f,0xffd23f], + body(B,c){const CY=0x5ce1ff;fitBase(B,c,CY,CY,0xffd23f,CY);if(c.face)X(B,0,1.99,-.262,.3,.06,.03,0xe8453c);else{X(B,0,1.83,-.29,.42,.1,.03,0xe8453c);eyes(B,1.83,-.296)} // a cyan suit, a red mask + for(let k=0;k<5;k++){const a=k/5*Math.PI*2;T(B,0,Math.sin(a)*.09,1.3+Math.cos(a)*.09,-.258,.07,.16,.02,0xffd23f,0,0,-a)}L(B,0,1.3,-.24,.1,.1,.04,0xffd23f); // a star + R(B,0,.9,0,.74,.1,.46,0xe8453c);gloves(B,0xffd23f,1.1); + back(B,c,()=>{R(B,0,1.1,.33,.66,.98,.12,0xe8453c);L(B,0,1.58,.2,.6,.12,.24,0xe8453c);X(B,0,1.1,.4,.3,.3,.02,c.hex)})}, // a red cape with your colour + hat(B,c){hairUp(B,c);for(const s of [-1,1])T(B,1,s*.24,2.1,0,.06,.26,.14,0xffd23f,0,0,-s*.5)}}, // little gold wings + {id:'goldknight',name:'Golden Knight',hatFace:{y:1.8,cell:.03,flat:-.33},legs:()=>[1,0xffc93c,0xffe98f,0xffc93c,0xffc93c,0xe2a81c], + body(B,c){const G0=0xffc93c,G1=0xffe98f;fitBase(B,c,G0,G0,G1,G0); + L(B,0,1.24,-.21,.56,.6,.08,c.hex);T(B,0,0,1.26,-.255,.06,.44,.02,WHITE);X(B,0,1.36,-.255,.3,.06,.02,WHITE); // a tabard in your colour with a white cross + for(const s of [-1,1])T(B,1,s*.44,1.5,0,.12,.2,.28,G1,0,0,-s*.3);L(B,0,.88,0,.76,.12,.48,G1); + back(B,c,()=>{R(B,0,1.24,.33,.56,.66,.18,G1);X(B,0,1.24,.44,.36,.46,.02,c.hex);T(B,0,0,1.24,.455,.06,.36,.02,WHITE)})}, // a shield on the back + hat(B,c){R(B,0,1.86,0,.6,.62,.62,0xffc93c);if(!c.face){X(B,0,1.84,-.355,.44,.05,.02,INK);X(B,0,1.74,-.355,.06,.14,.02,INK)}X(B,0,2.17,0,.06,.06,.6,0xffe98f);for(let k=0;k<3;k++)T(B,0,0,2.26+k*.02,-.04+k*.07,.1,.22,.1,k%2?WHITE:c.hex,-.5,0,0)}}, // a great helm and a plume + {id:'jester',name:'Jester',legs:()=>[1,0xffd23f,0xff6a55,0xffd23f,0xffd23f,0xff6a55], + body(B,c){fitBase(B,c,0xffd23f,0xff6a55,c.skin,0xffd23f,{torso:false});c.face||eyes(B); + bagPaint(B,0,1.22,0,.7,.72,.42,[4,4,3],0xffd23f,(f,i,j)=>((i>>1)+(j>>1))%2?c.hex:undefined); // patches of yellow and your colour + for(let k=0;k<6;k++){const a=(k/5-.5)*2.4;T(B,0,Math.sin(a)*.3,1.56,-.12+Math.cos(a)*.0,.14,.14,.14,k%2?WHITE:0xff6a55,0,0,.785)}R(B,0,.9,0,.74,.08,.46,0xff6a55); // a zigzag collar + back(B,c,()=>{L(B,0,1.24,.31,.5,.56,.2,0xff6a55);for(const [x,y] of [[-.12,1.34],[.12,1.14]])X(B,x,y,.43,.12,.12,.02,0xffd23f)})}, + hat(B,c){R(B,0,2.0,.02,.56,.24,.56,c.hex);for(const s of [-1,1]){T(B,1,s*.26,2.24,0,.14,.44,.14,s<0?0xff6a55:0xffd23f,0,0,-s*.7);L(B,s*.44,2.38,0,.12,.12,.12,0xffd23f)}}}, // a two-horned cap with bells + {id:'disco',name:'Disco Star',legs:()=>[1,WHITE,WHITE,WHITE,WHITE,0xffd23f], + body(B,c){fitBase(B,c,0xffd23f,0xffd23f,c.skin,0xffd23f,{torso:false});c.face||eyes(B);shades(B,c,0xff6fb5); + bagPaint(B,0,1.22,0,.7,.72,.42,[6,6,4],0xffd23f,(f,i,j)=>(i+j)%3===0?0xffe98f:(i+j)%3===1?0xffc93c:undefined); // a sparkly gold shirt + for(const s of [-1,1])T(B,0,s*.13,1.5,-.255,.12,.3,.03,WHITE,0,0,s*.6);cuffs(B,WHITE);L(B,0,.9,0,.74,.1,.46,WHITE); // a wide collar + back(B,c,()=>{R(B,0,1.24,.36,.46,.46,.3,0xe8eef4);for(let k=0;k<4;k++)X(B,-.15+k*.1,1.24,.52,.06,.36,.02,k%2?c.hex:0x5ce1ff)})}, // a mirror ball + hat(B,c){R(B,0,2.05,.02,.66,.46,.56,c.hair)}}, // a big round hairdo + {id:'shark',name:'Shark Onesie',hatFace:{y:1.78,cell:.03,flat:-.37},legs:()=>[1,0x7cc8f8,WHITE,0x7cc8f8,0x7cc8f8,0x7cc8f8], + body(B,c){const SB=0x7cc8f8;fitBase(B,c,SB,SB,SB,SB,{hair:false}); + L(B,0,1.18,-.21,.46,.6,.08,WHITE);L(B,0,.9,0,.74,.08,.46,c.hex); + back(B,c,()=>{L(B,0,1.18,.31,.5,.6,.2,SB);T(B,1,0,1.46,.36,.06,.26,.18,SB,0,0,0);T(B,1,0,.82,.42,.06,.22,.2,SB,.6,0,0)})}, // a dorsal fin and a tail + hat(B,c){R(B,0,1.86,0,.62,.62,.62,0x7cc8f8);X(B,0,1.78,-.345,.44,.34,.04,c.skin);if(!c.face)eyes(B,1.82,-.37);for(let k=0;k<6;k++){T(B,0,-.18+k*.072,1.98,-.36,.05,.05,.02,WHITE,0,0,.785);T(B,0,-.18+k*.072,1.6,-.36,.05,.05,.02,WHITE,0,0,.785)} + T(B,1,0,2.2,.0,.06,.22,.18,0x7cc8f8,0,0,0);for(const s of [-1,1])L(B,s*.2,2.04,-.3,.08,.08,.04,INK)}}, // a shark hood with teeth, a fin on top + {id:'unicorn',name:'Unicorn Onesie',hatFace:{y:1.78,cell:.03,flat:-.37},legs:()=>[1,WHITE,0xff9fc7,WHITE,WHITE,0xff9fc7], + body(B,c){fitBase(B,c,WHITE,WHITE,WHITE,WHITE,{hair:false});L(B,0,1.18,-.21,.4,.5,.06,0xff9fc7);L(B,0,.9,0,.74,.08,.46,c.hex); + back(B,c,()=>{L(B,0,1.2,.31,.5,.6,.2,WHITE);for(let k=0;k<4;k++)T(B,1,(k-1.5)*.08,1.4-k*.12,.42,.1,.3,.08,[0xff6fb5,0xffd23f,0x5ce1ff,0xc8b4ff][k],0,0,.3)})}, // a rainbow mane down the back + hat(B,c){R(B,0,1.86,0,.62,.62,.62,WHITE);X(B,0,1.78,-.345,.44,.34,.04,c.skin);if(!c.face)eyes(B,1.82,-.37);T(B,1,0,2.3,-.18,.08,.34,.08,0xffd23f,-.3,0,0);for(const s of [-1,1])T(B,1,s*.2,2.2,0,.08,.16,.06,0xff9fc7,0,0,-s*.3); + for(let k=0;k<3;k++)L(B,0,2.1-k*.14,.33,.12,.14,.1,[0xff6fb5,0xc8b4ff,0x5ce1ff][k])}}, // a golden horn, ears, a mane + {id:'dino',name:'Dino Onesie',hatFace:{y:1.78,cell:.03,flat:-.37},legs:()=>[1,0xff8a1f,0xffd23f,0xff8a1f,0xff8a1f,0xff8a1f], + body(B,c){const OR=0xff8a1f;fitBase(B,c,OR,OR,OR,OR,{hair:false});L(B,0,1.18,-.21,.46,.6,.08,0xffd23f);L(B,0,.9,0,.74,.08,.46,c.hex); + back(B,c,()=>{L(B,0,1.18,.31,.5,.6,.2,OR);for(let k=0;k<4;k++)T(B,1,0,1.56-k*.2,.42,.04,.14,.1,0x5ce1ff,0,0,0);T(B,1,0,.8,.4,.18,.14,.16,OR,.7,0,0)})}, // spikes and a tail + hat(B,c){R(B,0,1.86,0,.62,.62,.62,0xff8a1f);X(B,0,1.78,-.345,.44,.34,.04,c.skin);if(!c.face)eyes(B,1.82,-.37);for(let k=0;k<6;k++){T(B,0,-.18+k*.072,1.98,-.36,.05,.05,.02,WHITE,0,0,.785)} + for(let k=0;k<3;k++)T(B,1,0,2.18-k*.05,-.1+k*.16,.04,.16,.12,0x5ce1ff,0,0,0)}}, // a dino hood with teeth and spikes + {id:'burger',name:'Burger Mascot',skin:0xf2c27a,hatFace:{y:1.84,cell:.032,box:[1.88,0,.66,.6,.66]},legs:()=>[1,0xffd23f,0xe8453c,0xffd23f,0xffd23f,0xe8453c], + body(B,c){fitBase(B,c,0xffd23f,0xffd23f,WHITE,0xffd23f,{hair:false}); + R(B,0,1.2,0,.84,.18,.54,0xffd23f);L(B,0,1.32,0,.8,.06,.52,0xe8453c);L(B,0,1.05,0,.82,.06,.52,0x7fd860); // cheese, tomato, a lettuce frill + L(B,0,.9,0,.74,.1,.46,c.hex); + back(B,c,()=>{L(B,0,1.2,.31,.5,.56,.2,0xffd23f);L(B,0,1.24,.43,.3,.3,.04,c.hex)})}, + hat(B,c){R(B,0,1.94,0,.7,.4,.66,0xf2c27a);L(B,0,1.72,0,.74,.08,.7,0xffe14a);for(const [x,z] of [[-.16,-.2],[.12,-.24],[0,.1],[.2,.2],[-.2,.18]])X(B,x,2.14,z,.05,.03,.03,WHITE);if(!c.face){for(const s of [-1,1])X(B,s*.12,1.9,-.385,.06,.1,.02,INK);X(B,0,1.8,-.385,.16,.04,.02,0xe8453c)}}}, // a bun head with seeds + {id:'hotdog',name:'Hot Dog Mascot',hatFace:{y:1.8,cell:.03,flat:-.35},legs:()=>[1,0xffe4b0,WHITE,0xffe4b0,0xffe4b0,0xff6a55], + body(B,c){const BUN=0xffe4b0,DOG=0xff6a55;fitBase(B,c,BUN,BUN,WHITE,BUN,{hair:false}); + L(B,0,1.24,-.22,.36,.66,.08,DOG);for(let k=0;k<4;k++)T(B,0,(k%2?.06:-.06),1.46-k*.14,-.265,.16,.04,.02,0xffd23f,0,0,k%2?.6:-.6);L(B,0,.9,0,.74,.08,.46,c.hex); // the sausage with a mustard zigzag + back(B,c,()=>{L(B,0,1.24,.31,.5,.56,.2,BUN);X(B,0,1.24,.43,.3,.04,.02,c.hex)})}, + hat(B,c){R(B,0,2.0,0,.58,.46,.58,0xffe4b0);X(B,0,1.78,-.345,.44,.34,.04,c.skin);if(!c.face)eyes(B,1.82,-.37);L(B,0,2.28,0,.24,.2,.24,0xff6a55);X(B,0,2.24,-.12,.2,.03,.02,0xffd23f)}}, // a bun hood, the end of the sausage on top ]; })(); const NOOB=OUTFITS.findIndex(o=>o.id==='noob'); // the look everyone starts with, and the only one for players without the Locker From a757291def1c12130d6c1679165bcba8b642b474 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 07:34:23 +0000 Subject: [PATCH 48/63] Boostball third-wave Kit: fixes from the contact sheets (decals that did not read, smaller pizza and ball trails, bigger wave and dragon) Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn --- e63334287a3deaa3/boostball/kit.js | 40 +++++++++++++++---------------- e63334287a3deaa3/cosmetics.js | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/e63334287a3deaa3/boostball/kit.js b/e63334287a3deaa3/boostball/kit.js index bd509154..d989afc4 100644 --- a/e63334287a3deaa3/boostball/kit.js +++ b/e63334287a3deaa3/boostball/kit.js @@ -540,7 +540,7 @@ const DECALS=[null, // 44 Pinstriping: thin hand-painted curls over the bonnet and along the sides (g,P)=>{ const curl=(pts,c,w)=>{g.beginPath();g.moveTo(pts[0][0],pts[0][1]);for(let i=1;i+2{curl(pts,P.ac,.04);curl(pts,'#f4f6ff',.014)}; + const both=pts=>{curl(pts,P.ac,.07);curl(pts,'#f4f6ff',.026)}; if(P.panel==='top'){for(const s of[-1,1]){both([[1.42,0],[1.1,s*.05],[.85,s*.45],[.55,s*.38],[.3,s*.3],[.35,s*.12],[.5,s*.16],[.6,s*.2],[.55,s*.3],[.45,s*.28]]);both([[-1.4,s*.72],[-.6,s*.74],[.2,s*.72],[.7,s*.6]])}} else if(P.panel==='side'){both([[-1.35,.3],[-.5,.34],[.4,.34],[.9,.22],[1.1,.14],[1.25,.24],[1.18,.32],[1.1,.36],[1.02,.3],[1.06,.26]]);both([[-1.3,-.18],[-.3,-.2],[.5,-.2],[1.2,-.16]])} else if(P.panel==='rear'){for(const s of[-1,1])both([[0,.15],[s*.2,.35],[s*.55,.3],[s*.45,.1],[s*.35,-.05],[s*.2,.05],[s*.28,.15]])} @@ -550,7 +550,7 @@ const DECALS=[null, const c=.42,nx=Math.ceil((P.u1-P.u0)/c),ny=Math.ceil((P.v1-P.v0)/c),pt=[]; for(let j=0;j<=ny;j++){pt.push([]);for(let i=0;i<=nx;i++)pt[j].push([P.u0+i*c+(i&&i.5?[[q[0],q[1],q[2]],[q[0],q[2],q[3]]]:[[q[0],q[1],q[3]],[q[1],q[2],q[3]]])){const k=P.r();poly(g,t);g.fillStyle=k<.45?P.lt:P.dk;g.globalAlpha=.12+P.r()*.3;g.fill();g.globalAlpha=1}} + for(const t of(P.r()>.5?[[q[0],q[1],q[2]],[q[0],q[2],q[3]]]:[[q[0],q[1],q[3]],[q[1],q[2],q[3]]])){const k=P.r();poly(g,t);g.fillStyle=k<.45?P.lt:P.dk;g.globalAlpha=.22+P.r()*.4;g.fill();g.globalAlpha=1}} }, // 46 Chevrons: big arrowheads pointing at the nose (g,P)=>{ @@ -571,8 +571,8 @@ const DECALS=[null, (g,P)=>{ const paw=(x,y,s,a)=>{g.save();g.translate(x,y);g.rotate(a);g.fillStyle='rgba(255,255,255,.95)';g.beginPath();g.ellipse(-s*.25,0,s*.42,s*.48,0,0,TAU);g.fill(); for(const [tx,ty] of[[.42,-.5],[.66,-.17],[.66,.17],[.42,.5]]){g.beginPath();g.ellipse(tx*s,ty*s,s*.17,s*.14,0,0,TAU);g.fill()}g.restore()}; - if(P.panel==='side')for(let i=0;i<7;i++)paw(-1.35+i*.45,.12+(i%2?.13:-.05),.13,.15); - else if(P.panel==='top')for(let i=0;i<7;i++)paw(-1.35+i*.45,(i%2?.18:-.18)+Math.sin(i*.9)*.25,.15,(i%2?-.1:.1)); + if(P.panel==='side')for(let i=0;i<5;i++)paw(-1.2+i*.6,.14+(i%2?.12:-.04),.19,.15); + else if(P.panel==='top')for(let i=0;i<5;i++)paw(-1.2+i*.6,(i%2?.22:-.22)+Math.sin(i*.9)*.2,.22,(i%2?-.1:.1)); else if(P.panel==='rear'){paw(-.3,.1,.14,Math.PI/2);paw(.3,.3,.14,Math.PI/2)} }, // 49 Big Waves: rolling waves along the bottom of the car, in pale shades of your team colour with white curls of foam @@ -581,17 +581,17 @@ const DECALS=[null, const f=x=>base+amp*Math.sin(x*4.4)+amp*.3*Math.sin(x*9.1+1),S=flip?-1:1; g.fillStyle=P.lt;g.globalAlpha=.8;g.beginPath();g.moveTo(x0,S*-1.2);for(let x=x0;x<=x1;x+=.03)g.lineTo(x,S*f(x));g.lineTo(x1,S*-1.2);g.closePath();g.fill();g.globalAlpha=1; g.fillStyle=P.dk;g.globalAlpha=.55;g.beginPath();g.moveTo(x0,S*-1.2);for(let x=x0;x<=x1;x+=.03)g.lineTo(x,S*(f(x+.4)-amp*2.2));g.lineTo(x1,S*-1.2);g.closePath();g.fill();g.globalAlpha=1; - const pts=[];for(let x=x0;x<=x1;x+=.03)pts.push([x,S*f(x)]);line(g,pts,.035,'#f4f6ff'); + const pts=[];for(let x=x0;x<=x1;x+=.03)pts.push([x,S*f(x)]);line(g,pts,.05,'#f4f6ff'); for(let k=Math.ceil((x0*4.4/Math.PI-.5)/2);;k++){const xc=(Math.PI*(2*k+.5))/4.4;if(xc>x1)break;if(xc0?-.3:.3,S>0?Math.PI*1.4:-Math.PI*1.4,S<0);g.lineWidth=.03;g.strokeStyle='#f4f6ff';g.stroke();dot(g,xc+.06,yc+S*.03,.02,'#f4f6ff')} }; - if(P.panel==='side')band(-1.5,1.5,-.12,.07,0); + if(P.panel==='side')band(-1.5,1.5,.2,.1,0); else if(P.panel==='top'){band(-1.5,1.5,-.7,.06,0);band(-1.5,1.5,-.7,.06,1)} else band(-1,1,-.18,.06,0); }, // 50 Sunburst: pale rays fanning out from the nose (g,P)=>{ - const fan=(x,y,n,r,a0,a1)=>{for(let i=0;i{for(let i=0;i{ const band=(x,y,w,h)=>{g.save();g.beginPath();g.rect(x,y,w,h);g.clip();rect(g,x,y,w,h,'#ffd21f');for(let k=x-h-1;k{ @@ -672,13 +672,13 @@ const DECALS=[null, // 59 Music Staff: five lines and a run of notes along each side (g,P)=>{ const W='rgba(255,255,255,.95)'; - const staff=(x0,x1,y,gap,n,flip)=>{for(let k=0;k<5;k++)rect(g,x0,y+k*gap-.006,x1-x0,.012,W); + const staff=(x0,x1,y,gap,n,flip)=>{for(let k=0;k<5;k++)rect(g,x0,y+k*gap-.011,x1-x0,.022,W); const S=flip?-1:1;let last=null;for(let i=0;i{ @@ -862,7 +862,7 @@ const TOPPERS=[null, /* 22 Wizard Hat */ (b,x,y,z)=>{const N=0x2a2a7a;b.cyl(.19,.19,.018,N,x,y-.02,z,0,0,0,16);b.cyl(.075,.12,.15,N,x,y+.06,z,0,0,0,12);b.cyl(.122,.122,.025,0xe0b040,x,y,z,0,0,0,12); b.add(new THREE.ConeGeometry(.076,.17,12),N,x-.03,y+.2,z,0,0,.35);for(const [dx,dy,dz] of[[.08,.06,.07],[-.07,.1,.06],[.02,.14,-.07],[-.03,.03,-.11]])b.sph(.016,0xffe23f,x+dx,y+dy,z+dz,1,1,1,6);b.sph(.018,0xffe23f,x-.09,y+.28,z,1,1,1,6)}, /* 23 Smiley Ball */ (b,x,y,z)=>{b.sph(.12,0xffe23f,x,y,z);for(const s of[-1,1])b.sph(.016,0x14161f,x+s*.038,y+.03,z+.108,1,1.7,.6,6);b.add(new THREE.TorusGeometry(.05,.009,5,10,Math.PI),0x14161f,x,y-.005,z+.103,-.35,0,Math.PI)}, - /* 24 Racing Helmet */ (b,x,y,z,ac)=>{b.sph(.12,ac,x,y,z,1,.92,1.05);b.sph(.1,0x15171b,x,y+.005,z+.055,.92,.45,.6,12);b.tor(.121,.012,0xffffff,x,y,z,0,Math.PI/2,0);b.box(.14,.03,.08,0x2a2f3a,x,y-.1,z+.03)}, + /* 24 Racing Helmet */ (b,x,y,z,ac)=>{b.sph(.12,ac,x,y,z,1,.92,1.05);b.sph(.1,0x15171b,x,y+.01,z+.07,1,.5,.62,12);b.tor(.121,.012,0xffffff,x,y,z,0,Math.PI/2,0);b.box(.14,.03,.08,0x2a2f3a,x,y-.1,z+.03)}, /* 25 Baseball Cap */ (b,x,y,z,ac)=>{b.add(new THREE.SphereGeometry(.11,14,7,0,TAU,0,Math.PI/2),ac,x,y-.03,z,0,0,0,1,.75,1);b.cyl(.112,.112,.02,ac,x,y-.035,z,0,0,0,14); b.add(new THREE.CylinderGeometry(.1,.1,.014,12,1,false,-Math.PI/2,Math.PI),mixHex(ac,0,.3),x,y-.03,z+.07,-.12,0,0,1,1,1.2);b.sph(.016,0xffffff,x,y+.055,z,1,.6,1,6)}, /* 26 Boxing Glove */ (b,x,y,z)=>{const R=0xd8262f;b.sph(.1,R,x,y+.03,z,1,1.15,1.1,12);b.sph(.045,R,x+.085,y+.0,z+.05,1,1.3,1,8);b.cyl(.07,.075,.08,0xffffff,x,y-.1,z,0,0,0,12);b.box(.012,.06,.012,0xffffff,x,y+.04,z+.11)}, @@ -1119,20 +1119,20 @@ const TRAILS=[null, /* 33 Green Flame */ {rate:80,life:.32,cells:[CELL.flame,CELL.flame,CELL.glow],cols:[0xd8ff8a,0x46e39a,0x14a870],size:[.7,1.2],back:9,inh:0.8,spread:1.1,up:.3,w:.22,o:O({add:1,grow:-.6,fade:0,rot:0})}, /* 34 Violet Flame */ {rate:70,life:.4,cells:[CELL.flame,CELL.flame,CELL.spark],cols:[0xffb0f8,0xb46cff,0xffffff],size:[.6,1.15],back:7,inh:0.8,spread:.9,up:.9,w:.2,o:O({add:1,grow:-.5,fade:2,rot:0,wob:2.5})}, /* 35 Afterburner */ {rate:96,life:.26,cells:[CELL.glow,CELL.glow,CELL.disc,CELL.ring],cols:[0x8fd6ff,0xffffff,0xffffff,0xbfe8ff],size:[.45,.8],back:11,inh:0.9,spread:.25,up:0,w:.06,o:O({add:1,grow:-.55,fade:0,rot:0}),core:.3}, - /* 36 Sports Balls */ {rate:14,life:1.2,cells:[CELL.soccer,CELL.basket,CELL.tennis,CELL.soccer],cols:[0xffffff],size:[.6,.75],back:3,inh:0.72,spread:1.6,up:4,w:.2,o:O({grav:12,bounce:.55,spin:5})}, - /* 37 Cannon Smoke */ {rate:34,life:.75,cells:[CELL.puff,CELL.puff,CELL.glow],cols:[0xd0d4dc,0xb4bac6,0xffa040],size:[.4,.75],back:4,inh:0.7,spread:.9,up:.6,w:.25,o:O({a:.55,grow:1.1,drag:2,fade:0})}, + /* 36 Sports Balls */ {rate:14,life:1.2,cells:[CELL.soccer,CELL.basket,CELL.tennis,CELL.soccer],cols:[0xffffff],size:[.45,.55],back:3,inh:0.72,spread:1.6,up:3,w:.2,o:O({grav:12,bounce:.55,spin:5})}, + /* 37 Cannon Smoke */ {rate:34,life:.75,cells:[CELL.puff,CELL.puff,CELL.glow],cols:[0xd0d4dc,0xb4bac6,0xffa040],size:[.5,.85],back:4,inh:0.7,spread:.9,up:.6,w:.25,o:O({a:.75,grow:1.1,drag:2,fade:0})}, /* 38 Gems */ {rate:28,life:.95,cells:[CELL.gem,CELL.gem,CELL.gem,CELL.spark],cols:[0xff5c9a,0x5cc8ff,0x46e39a,0xffd23f,0xb46cff],size:[.35,.55],back:3,inh:0.72,spread:1.8,up:3,w:.25,o:O({grav:10,spin:4,bounce:.4})}, /* 39 Paw Prints */ {rate:12,life:.9,cells:[CELL.paw],cols:[0xffffff,0xfff1e0],size:[.45,.55],back:1,inh:0.25,spread:0,up:.2,w:.35,o:O({rot:0,drag:3,a:.9})}, /* 40 Paper Planes */ {rate:11,life:1.3,cells:[CELL.plane],cols:[0xffffff,0xeaf2ff,0xffe9a8],size:[.6,.8],back:3,inh:0.72,spread:1.2,up:1.5,w:.25,o:O({grav:-.4,wob:3,rot:0,drag:1})}, /* 41 Spare Parts */ {rate:30,life:1,cells:[CELL.gear,CELL.nut,CELL.gear],cols:[0xc8d2dc,0x9aa3b0,0xffd23f],size:[.3,.5],back:3,inh:0.72,spread:1.8,up:3,w:.25,o:O({grav:13,spin:8,bounce:.45})}, - /* 42 Pizza Slices */ {rate:13,life:1.2,cells:[CELL.pizza],cols:[0xffffff],size:[.7,.85],back:3,inh:0.75,spread:1.5,up:5,w:.2,o:O({grav:11,spin:6,bounce:.3})}, + /* 42 Pizza Slices */ {rate:13,life:1.2,cells:[CELL.pizza],cols:[0xffffff],size:[.45,.55],back:3,inh:0.75,spread:1.5,up:3,w:.2,o:O({grav:11,spin:6,bounce:.3})}, /* 43 Comet Tail */ {rate:96,life:.5,cells:[CELL.glow,CELL.glow,CELL.star,CELL.spark],cols:[0xfff2c2,0x8fd6ff,0xffffff,0xb8a6ff],size:[.45,.95],back:4,inh:0.92,spread:.35,up:0,w:.08,o:O({add:1,fade:0,grow:-.75})}, /* 44 Cherry Blossoms */ {rate:34,life:1.1,cells:[CELL.blossom,CELL.blossom,CELL.seed],cols:[0xffc2dd,0xffffff,0xff9ac8],size:[.35,.6],back:3,inh:0.7,spread:1.8,up:1.2,w:.3,o:O({grav:1.6,spin:3,wob:3.5,drag:1})}, - /* 45 Ghosts */ {rate:9,life:1.3,cells:[CELL.ghost],cols:[0xffffff,0xe6f0ff],size:[.7,.9],back:2,inh:0.7,spread:1.2,up:.8,w:.3,o:O({grav:-2,wob:5,rot:0,drag:1,a:.82})}, + /* 45 Ghosts */ {rate:9,life:1.3,cells:[CELL.ghost],cols:[0xffffff,0xe6f0ff],size:[.55,.7],back:2,inh:0.7,spread:1.2,up:.8,w:.3,o:O({grav:-2,wob:5,rot:0,drag:1,a:.82})}, /* 46 Pixel Fire */ {rate:70,life:.45,cells:[CELL.square],cols:[0xffd23f,0xff8a1f,0xff3b1c,0xfff2a8],size:[.25,.45],back:6,inh:0.8,spread:1,up:1.5,w:.2,o:O({grav:-4,grow:-.6,rot:0})}, /* 47 Ice Shards */ {rate:46,life:.6,cells:[CELL.ice,CELL.ice,CELL.flake],cols:[0xffffff,0xbfe4ff,0xe6f6ff],size:[.3,.55],back:4,inh:0.75,spread:1.4,up:1.5,w:.25,o:O({grav:8,spin:6,bounce:.2})}, /* 48 Hockey Pucks */ {rate:14,life:1.1,cells:[CELL.puck],cols:[0xffffff],size:[.45,.55],back:5,inh:0.6,spread:1.4,up:2.5,w:.2,o:O({grav:14,bounce:.15,rot:0,drag:.4})}, - /* 49 Fire and Ice */ {rate:90,life:.42,cells:[CELL.flame,CELL.glow],cols:[0xff8a1f,0x8fd6ff],size:[.45,.8],back:7,inh:0.85,spread:.25,up:0,w:0,o:O({add:1,grow:-.5,fade:0,rot:0}),helix:.38} + /* 49 Fire and Ice */ {rate:96,life:.42,cells:[CELL.flame,CELL.ice],cols:[0xff7a1a,0x7fc8ff],size:[.45,.75],back:7,inh:0.85,spread:.2,up:0,w:0,o:O({grow:-.5,fade:0,rot:0}),helix:.45} ]; const _f=new V3(),_r=new V3(),_u=new V3(); // emits what a trail owes for dt seconds from a nozzle at the back of a car at p, facing q, moving at v diff --git a/e63334287a3deaa3/cosmetics.js b/e63334287a3deaa3/cosmetics.js index 87b49b78..b1095156 100644 --- a/e63334287a3deaa3/cosmetics.js +++ b/e63334287a3deaa3/cosmetics.js @@ -410,7 +410,7 @@ I('boostball', 'decal', 52, 'Eye Patch', 'rare', '#121318', '#FFFFFF', 'A black patch over one headlight. Arr.'); I('boostball', 'decal', 53, 'Tracksuit and Chain', 'common', '#FFFFFF', '#E9B93A', 'Two white stripes a side and a gold chain over the nose.'); I('boostball', 'decal', 54, 'Suit and Tie', 'uncommon', '#2F3140', '#F6F6F6', 'Dark lapels, a white shirt and a long tie in your accent colour.'); - I('boostball', 'decal', 55, 'Hazard Stripes', 'common', '#FFD21F', '#14161F', 'Yellow and black bands on the sills and bumpers.'); + I('boostball', 'decal', 55, 'Hazard Stripes', 'common', '#FFD21F', '#14161F', 'Yellow and black bands round the doors, the nose and the tail.'); I('boostball', 'decal', 56, 'Barcode', 'common', '#F4F6FF', '#14161F', 'Scan before use.'); I('boostball', 'decal', 57, 'Synthwave Sunset', 'epic', '#FF3FA4', '#FFE45C', 'A striped sun setting behind a glowing pink grid.'); I('boostball', 'decal', 58, 'Polka Dots', 'common', '#FFFFFF', '#FF5C9A', 'White dots, evenly spaced.'); From 2d3d9424e52b71f84625e2b958b302a198395d0d Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 07:37:14 +0000 Subject: [PATCH 49/63] Backrooms Locker: outfits measured fair against the plain suit (size, brightness, contrast, team colour); Bubble Wrap build skin replaces Cardboard Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn --- e63334287a3deaa3/backrooms-1v1/locker.js | 191 ++++++++++++----------- e63334287a3deaa3/cosmetics.js | 2 +- 2 files changed, 98 insertions(+), 95 deletions(-) diff --git a/e63334287a3deaa3/backrooms-1v1/locker.js b/e63334287a3deaa3/backrooms-1v1/locker.js index a09888c6..766b8113 100644 --- a/e63334287a3deaa3/backrooms-1v1/locker.js +++ b/e63334287a3deaa3/backrooms-1v1/locker.js @@ -56,7 +56,7 @@ const OUTFIT_NAMES=['Striker','Hoops','Gridiron','Slugger','Puck','Ace','Champ', 'Astronaut','Wizard','Firefighter','Knight']; const WRAP_NAMES=['Gold','Chrome','Wood Grain','Forest Camo','Desert Camo','Arctic Camo','Pixel Camo','Candy Cane','Hazard Stripes','Lava', 'Toy Blaster','Galaxy','Checkered Flag','Pirate Brass','Football Leather']; -const BUILD_NAMES=['Concrete','Ice Block','Candy Stripes','Scrap Metal','Cardboard','Marble']; +const BUILD_NAMES=['Concrete','Ice Block','Candy Stripes','Scrap Metal','Bubble Wrap','Marble']; const ELIM_NAMES=['Confetti Pop','Noclip Glitch','Ghost Away','Red Card','Treasure Coins','Nuts and Bolts','Balloon Pop','Rubber Ducks']; const CELEB_NAMES=['Fist Pump','Victory Hop','Spin Move','Robot Dance','Pirate Jig','Take a Bow','Trophy Lift','Fireworks']; const SLOTS=['o','g','b','e','c']; @@ -87,7 +87,7 @@ const worn=k=>!!k&&SLOTS.some(s=>k[s]); // shape: undefined a box, 'c' a cylinder (w and d its width, h its height), 'o' a ball. const G=h=>0x1000000+h; const W='W',T='T',K='K',L='L',D='D',V='V'; -const GOLD=0xe8b22e,SILVER=0xc9d0d6,STEEL=0x9aa3ab,INK=0x34343c,SHOE=0x3a3a42,CREAM=0xf1ece0; +const GOLD=0xe8b22e,SILVER=0xe2e8ec,STEEL=0xc2cad2,INK=0x2c3448,SHOE='D',CREAM=0xf1ece0; // on the body (x -.37..37, y .86..1.58, z -.22 front .. .22 back). Lt: layer, for patches on patches. const off=Lt=>.004+.012*(Lt||0); const F=(x,y,w,h,c,Lt,rz)=>[w,h,.02,x,y,-.22-off(Lt),c,0,0,rz||0]; // a patch on the front @@ -115,7 +115,7 @@ const arms2=f=>[f(0),f(1)]; // a digit in a 3 x 5 grid of blocks on the back (z>0) or front of the body; s: size of one block const DIG=['111101101101111','010110010010111','111001111100111','111001111001111','101101111001001','111100111001111','111100111101111','111001001001001','111101111101111','111101111001111']; function num(str,x,y,s,c,back,Lt){const out=[],n=String(str).length,w=s*3+s*.6;let x0=x-(n*w-s*.6)/2; - for(const ch of String(str)){const g=DIG[+ch];for(let j=0;j<5;j++)for(let i=0;i<3;i++)if(g[j*3+i]==='1'){const px=x0+i*s+s/2,py=y+(2-j)*s;out.push(back?Bk(-px,py,s*1.02,s*1.02,c,Lt):F(px,py,s*1.02,s*1.02,c,Lt))}x0+=w} + for(const ch of String(str)){const g=DIG[+ch];for(let j=0;j<5;j++)for(let i=0;i<3;i++)if(g[j*3+i]==='1'){const px=x0+i*s+s/2,py=y+(2-j)*s;out.push(back?Bk(px,py,s*1.02,s*1.02,c,Lt):F(px,py,s*1.02,s*1.02,c,Lt))}x0+=w} return out} // the pack on the back (the same box as the plain suit's air tank), so no outfit is drawn smaller than the plain suit const PACK=[.42,.52,.2,0,1.26,.31]; @@ -129,80 +129,80 @@ const OUTFITS=[null, // ---------------- sports ---------------- {id:'striker',home:[0x1f9e5a,0x0d4a2a],base:{leg:T,boot:0xf4f4f4,sleeve:T,glove:T}, leg:s=>[[.3,.34,.32,0,-.17,0,W],LB(-.5,.05,W),LB(-.12,.03,T,1),LS(s,-.2,.12,.26,T,1),[.315,.06,.385,0,-.73,-.03,T],[.06,.03,.06,-.08,-.865,-.12,SHOE],[.06,.03,.06,.08,-.865,-.12,SHOE],[.06,.03,.06,0,-.865,.1,SHOE]], - torso:[band(1.555,.05,W),F(0,1.5,.16,.1,W),F(0,1.47,.08,.06,T,1),Sd(-1,1.22,.1,.62,W),Sd(1,1.22,.1,.62,W),band(.9,.1,W),F(-.18,1.38,.12,.12,W),...num(9,0,1.24,.06,W,true),...pack(T,[Bk(0,1.32,.3,.05,W,9),Bk(0,1.2,.3,.05,W,9)])], + torso:[band(1.555,.05,W),F(0,1.5,.16,.1,W),F(0,1.47,.08,.06,T,1),Sd(-1,1.22,.1,.62,W),Sd(1,1.22,.1,.62,W),band(.9,.1,W),F(-.18,1.38,.12,.12,W),...num(9,0,1.24,.06,W,true,16),...pack(T,[Bk(0,1.32,.3,.05,W,16),Bk(0,1.2,.3,.05,W,16)])], head:[hBand(.16,.07,W)], arms:[...arms2(i=>aBand(i,-.14,.06,W))]}, {id:'hoops',home:[0xff7a1a,0x7a2e00],base:{leg:L,boot:0xf6f6f6,sleeve:L,glove:L}, leg:s=>[[.32,.48,.34,0,-.25,0,T],LS(s,-.25,.1,.46,W,2),LB(-.48,.04,W,2),LB(-.6,.16,W),LB(-.56,.03,T,1),[.33,.12,.4,0,-.8,-.02,W],LS(s,-.79,.16,.04,T,2,-.02)], - torso:[band(1.555,.05,W),F(0,1.52,.2,.08,L,1),...num(31,0,1.25,.055,W,false),...num(31,0,1.25,.065,W,true),band(.92,.12,T,1),[.16,.02,.12,-.29,1.585,0,W],[.16,.02,.12,.29,1.585,0,W],...pack(T,[Bk(0,1.26,.06,.5,W,9)])], + torso:[band(1.555,.05,W),F(0,1.52,.2,.08,L,1),...num(31,0,1.25,.055,W,false),...num(31,0,1.25,.052,W,true,16),band(.92,.12,T,1),[.16,.02,.12,-.29,1.585,0,W],[.16,.02,.12,.29,1.585,0,W],...pack(T,[Bk(0,1.26,.06,.5,W,16)])], head:[hBand(.18,.08,W),hBand(.18,.025,T,1)], arms:[...arms2(i=>aBand(i,-.15,.07,W)),...arms2(i=>aBand(i,.24,.06,T))]}, {id:'gridiron',home:[0x6a2bc8,0x2a0f55],hat:1,base:{leg:0xe8e6dc,boot:SHOE,sleeve:T,glove:W}, leg:s=>[LS(s,-.25,.08,.5,T,0),LB(-.5,.04,T),[.3,.2,.32,0,-.62,0,T],LB(-.58,.03,W,1)], - torso:[[.92,.16,.52,0,1.5,0,T],[.94,.03,.54,0,1.585,0,W],F(0,1.47,.24,.06,W,6),...num(4,0,1.2,.06,W,false),...num(4,0,1.22,.075,W,true),band(.9,.1,T),...pack(K,[Bk(0,1.4,.36,.05,W,9)])], + torso:[[.92,.16,.52,0,1.5,0,T],[.94,.03,.54,0,1.585,0,W],F(0,1.47,.24,.06,W,6),...num(4,0,1.2,.06,W,false),...num(4,0,1.22,.075,W,true,16),band(.9,.1,T),...pack(K,[Bk(0,1.4,.36,.05,W,16)])], head:[[.6,.56,.6,0,.02,0,T],[.08,.02,.6,0,.31,0,W],[.03,.4,.04,-.2,-.03,-.33,STEEL],[.03,.4,.04,.2,-.03,-.33,STEEL],[.43,.03,.04,0,-.09,-.335,STEEL],[.43,.03,.04,0,-.17,-.335,STEEL],[.03,.12,.04,0,-.13,-.335,STEEL],[.1,.1,.02,-.31,-.05,0,W],[.1,.1,.02,.31,-.05,0,W]], arms:[...arms2(i=>aBand(i,.05,.05,W)),...arms2(i=>aBand(i,-.05,.05,W))]}, {id:'slugger',home:[0x2153b8,0x0c2457],hat:1,base:{leg:0xeceae2,boot:SHOE,sleeve:T,glove:W}, leg:s=>[LS(s,-.25,.04,.52,T),LB(-.5,.04,0xeceae2,1),[.29,.22,.31,0,-.62,0,T],LF(0,-.66,.08,.14,W,1)], - torso:[F(0,1.22,.04,.7,W),...[1.45,1.3,1.15,1.0].map(y=>F(0,y,.03,.03,0xdedede,1)),band(.9,.08,INK),F(0,.9,.08,.06,SILVER,1),band(1.56,.04,W),...num(27,0,1.25,.06,W,true),F(.18,1.4,.14,.04,W),...pack(T,[Bk(0,1.4,.42,.05,W,9)])], + torso:[F(0,1.22,.04,.7,W),...[1.45,1.3,1.15,1.0].map(y=>F(0,y,.03,.03,0xdedede,1)),band(.9,.08,INK),F(0,.9,.08,.06,SILVER,1),band(1.56,.04,W),...num(27,0,1.25,.06,W,true,16),F(.18,1.4,.14,.04,W),...pack(T,[Bk(0,1.4,.42,.05,W,16)])], head:[[.58,.3,.58,0,.14,0,T],[.5,.04,.2,0,.04,-.36,T],[.12,.2,.2,.29,-.04,0,T],[.07,.02,.07,0,.3,0,W]], arms:[...arms2(i=>aBand(i,-.12,.05,W))]}, {id:'puck',home:[0xc41f3a,0x55101b],hat:1,base:{leg:T,boot:SHOE,sleeve:T,glove:0x8a2c1c}, leg:s=>[[.32,.32,.34,0,-.16,0,K],LB(-.12,.03,W,1),LB(-.45,.05,W),LB(-.53,.05,W),[.31,.14,.36,0,-.74,-.02,SHOE],[.03,.05,.4,0,-.835,-.02,SILVER]], - torso:[[.8,.74,.5,0,1.2,0,T],[.82,.06,.52,0,1.0,0,W],[.82,.04,.52,0,.92,0,W],[.82,.05,.52,0,1.5,0,W],...num(17,0,1.26,.055,W,true),...pack(K,[Bk(0,1.1,.42,.06,W,9)])], + torso:[[.8,.74,.5,0,1.2,0,T],[.82,.06,.52,0,1.0,0,W],[.82,.04,.52,0,.92,0,W],[.82,.05,.52,0,1.5,0,W],...num(17,0,1.26,.055,W,true,16),...pack(K,[Bk(0,1.1,.42,.06,W,16)])], head:[[.58,.3,.58,0,.13,0,T],[.03,.32,.04,-.18,-.05,-.31,SILVER],[.03,.32,.04,.18,-.05,-.31,SILVER],[.03,.32,.04,0,-.05,-.31,SILVER],[.39,.03,.04,0,-.06,-.315,SILVER],[.39,.03,.04,0,-.16,-.315,SILVER],[.39,.03,.04,0,.1,-.315,SILVER]], arms:[...arms2(i=>onArm(i,0,0,0,.2,.2,.5,T)),...arms2(i=>aBand(i,-.02,.05,W,2)),...arms2(i=>aBand(i,-.1,.04,W,2))]}, {id:'ace',home:[0x18b4a6,0x0a5a52],base:{leg:L,boot:W,sleeve:T,glove:L}, - leg:s=>[[.3,.3,.32,0,-.15,0,W],LB(-.66,.12,W),[.32,.06,.39,0,-.84,-.03,T]], - torso:[F(0,1.5,.12,.16,W),[.3,.05,.46,-.1,1.58,0,W,0,0,.25],[.3,.05,.46,.1,1.58,0,W,0,0,-.25],F(0,1.47,.03,.03,T,1),F(0,1.42,.03,.03,T,1),band(.9,.08,W),Bk(0,1.5,.3,.06,W),...pack(W,[Bk(0,1.26,.3,.04,T,9)])], + leg:s=>[[.31,.3,.35,0,-.15,0,W],LB(-.66,.12,W),[.32,.06,.39,0,-.84,-.03,T]], + torso:[F(0,1.5,.12,.16,W),[.3,.05,.46,-.1,1.58,0,W,0,0,.25],[.3,.05,.46,.1,1.58,0,W,0,0,-.25],F(0,1.47,.03,.03,T,1),F(0,1.42,.03,.03,T,1),band(.9,.08,W),Bk(0,1.5,.3,.06,W),...pack(W,[Bk(0,1.26,.3,.04,T,16)])], head:[hBand(.19,.07,W),[.48,.03,.2,0,.17,-.34,W]], arms:[...arms2(i=>aBand(i,-.16,.08,W)),...arms2(i=>aBand(i,.23,.05,W))]}, {id:'champ',home:[0xd62828,0x5a0d0d],hat:1,base:{leg:L,boot:T,sleeve:L,glove:T}, leg:s=>[[.32,.36,.34,0,-.18,0,W],LS(s,-.18,.12,.34,T,2),[.29,.26,.31,0,-.68,0,T],LF(0,-.64,.04,.2,W,1)], - torso:[band(.98,.14,T,2),band(1.22,.72,T),F(0,1.42,.5,.03,W,1),Bk(0,1.42,.5,.03,W,1),...pack(T,[Bk(0,1.5,.34,.05,W,9)])], + torso:[band(.98,.14,T,2),band(1.22,.72,T),F(0,1.42,.5,.03,W,1),Bk(0,1.42,.5,.03,W,1),...pack(T,[Bk(0,1.5,.34,.05,W,16)])], head:[hBand(.16,.14,T),[.58,.1,.58,0,.25,0,T],HS(-1,-.06,-.1,.22,.24,T,1),HS(1,-.06,-.1,.22,.24,T,1),[.36,.06,.04,0,-.13,-.3,T],[.24,.06,.06,0,.22,-.3,W]], arms:[...arms2(i=>onArm(i,0,0,-.245,.25,.25,.22,T)),...arms2(i=>onArm(i,0,0,-.11,.21,.21,.08,W))]}, {id:'sprinter',home:[0xff3d7f,0x6a0f30],base:{leg:K,boot:0x3ee6d0,sleeve:L,glove:L}, leg:s=>[[.3,.24,.32,0,-.12,0,D],LS(s,-.12,.08,.22,W,1),[.31,.05,.39,0,-.84,-.03,0x1f7a70]], - torso:[[.86,.09,.02,0,1.22,-.234,W,0,0,.7],[.86,.09,.02,0,1.22,.234,W,0,0,-.7],F(.05,1.12,.3,.2,W,2),...num(42,.05,1.12,.025,INK,false,3),band(.9,.06,D),...pack(T,[Bk(0,1.26,.42,.05,W,9)])], + torso:[[.86,.09,.02,0,1.22,-.234,W,0,0,.7],[.86,.09,.02,0,1.22,.234,W,0,0,-.7],F(.05,1.12,.3,.2,W,2),...num(42,.05,1.12,.025,INK,false,3),band(.9,.06,D),...pack(T,[Bk(0,1.26,.42,.05,W,16)])], head:[hBand(.16,.06,T,1)], arms:[...arms2(i=>aBand(i,.2,.12,T))]}, {id:'swim',home:[0x1689e0,0x0a3a66],hat:1,visor:false,base:{leg:T,boot:0x39c1e8,sleeve:T,glove:T}, leg:s=>[LS(s,-.4,.06,.8,W,0),LB(-.62,.03,K,0)], - torso:[Sd(-1,1.22,.06,.7,W),Sd(1,1.22,.06,.7,W),[.8,.2,.5,0,1.5,0,W],[.2,.4,.06,-.2,1.33,-.24,W],...pack(W,[Bk(0,1.3,.3,.06,T,9),Bk(0,1.2,.3,.06,T,9)])], + torso:[Sd(-1,1.22,.06,.7,W),Sd(1,1.22,.06,.7,W),[.8,.2,.5,0,1.5,0,W],[.2,.4,.06,-.2,1.33,-.24,W],...pack(W,[Bk(0,1.3,.3,.06,T,16),Bk(0,1.2,.3,.06,T,16)])], head:[[.58,.34,.58,0,.12,0,T],[.6,.04,.6,0,.0,0,K],[.16,.14,.04,-.11,.03,-.29,G(0x9ff2ff)],[.16,.14,.04,.11,.03,-.29,G(0x9ff2ff)],[.06,.04,.03,0,.03,-.285,INK],[.6,.04,.6,0,.03,0,INK],[.1,.04,.04,-.03,-.13,-.285,0x234a6a]], arms:[]}, -{id:'fairway',home:[0x2e8c5a,0x13432a],hat:1,base:{leg:0xcfd3d8,boot:W,sleeve:W,glove:W}, - leg:s=>[LF(0,-.4,.02,.8,0xb5bac0,1),LS(s,-.4,.02,.8,0xb5bac0,1),LB(-.2,.02,0xb5bac0,1),LB(-.5,.02,0xb5bac0,1),[.315,.07,.385,0,-.72,-.03,0x6a4a2c]], +{id:'fairway',home:[0x2e8c5a,0x13432a],hat:1,base:{leg:L,boot:W,sleeve:W,glove:W}, + leg:s=>[LF(0,-.4,.02,.8,T,1),LS(s,-.4,.02,.8,T,1),LB(-.2,.02,T,1),LB(-.5,.02,T,1),[.315,.07,.385,0,-.72,-.03,D]], torso:[band(1.2,.7,T),...[-.22,0,.22].flatMap(x=>[F(x,1.06,.12,.12,K,1,.785),F(x,1.32,.12,.12,K,1,.785),Bk(x,1.06,.12,.12,K,1,.785),Bk(x,1.32,.12,.12,K,1,.785)]), - [.8,.025,.02,0,1.19,-.245,W,0,0,.6],[.8,.025,.02,0,1.19,-.245,W,0,0,-.6],[.8,.025,.02,0,1.19,.245,W,0,0,.6],[.8,.025,.02,0,1.19,.245,W,0,0,-.6],F(0,1.52,.2,.1,W,2),...pack(T,[Bk(0,1.4,.42,.04,W,9)])], + [.8,.025,.02,0,1.19,-.245,W,0,0,.6],[.8,.025,.02,0,1.19,-.245,W,0,0,-.6],[.8,.025,.02,0,1.19,.245,W,0,0,.6],[.8,.025,.02,0,1.19,.245,W,0,0,-.6],F(0,1.52,.2,.1,W,2),...pack(T,[Bk(0,1.4,.42,.04,W,16)])], head:[[.58,.16,.58,0,.21,0,K],[.56,.05,.24,0,.18,-.36,K],[.06,.04,.06,0,.3,0,K]], arms:[...arms2(i=>aBand(i,.18,.12,T,1))]}, -{id:'skater',home:[0xe0402a,0x5a160c],hat:1,base:{leg:0x8a9098,boot:SHOE,sleeve:T,glove:L}, - leg:s=>[[.31,.5,.33,0,-.24,0,0x8a9098],LS(s,-.3,.12,.12,0x7a8088,1),LB(-.6,.16,W),LB(-.56,.025,T,1),LB(-.62,.025,T,1),[.32,.04,.39,0,-.85,-.03,W]], +{id:'skater',home:[0xe0402a,0x5a160c],hat:1,base:{leg:D,boot:W,sleeve:T,glove:L}, + leg:s=>[[.31,.5,.33,0,-.24,0,D],LS(s,-.3,.12,.12,T,1),LB(-.6,.16,W),LB(-.56,.025,T,1),LB(-.62,.025,T,1),[.32,.04,.39,0,-.85,-.03,D]], torso:[[.8,.82,.48,0,1.17,0,T],[.07,.2,.02,0,1.24,-.256,W,0,0,.5],[.07,.2,.02,.03,1.12,-.256,W,0,0,-.5],[.06,.03,.02,0,1.18,-.256,W], - ...pack(K,[[.24,.86,.03,0,1.26,.43,0x3a3f48],[.26,.02,.04,0,1.7,.43,W],[.26,.02,.04,0,.82,.43,W],...[[-.09,1.6],[.09,1.6],[-.09,.92],[.09,.92]].map(([x,y])=>[.06,.06,.06,x,y,.47,W,0,0,0,'c'])])], + ...pack(T,[[.24,.86,.03,0,1.26,.43,0x3a4a7a],[.26,.02,.04,0,1.7,.43,W],[.26,.02,.04,0,.82,.43,W],...[[-.09,1.6],[.09,1.6],[-.09,.92],[.09,.92]].map(([x,y])=>[.06,.06,.06,x,y,.47,W,0,0,0,'c'])])], head:[[.58,.3,.58,0,.14,0,T],hBand(.02,.08,K,1),[.12,.08,.12,0,.32,0,K]], arms:[...arms2(i=>onArm(i,0,0,.08,.21,.21,.34,T))]}, {id:'downhill',home:[0x2f6fd8,0x10284f],hat:1,visor:false,base:{leg:K,boot:W,sleeve:T,glove:T}, leg:s=>[LB(-.3,.02,D,0),LB(-.1,.02,D,0),[.33,.24,.4,0,-.74,-.02,W],[.33,.03,.4,0,-.68,-.02,T,0,0,0],LS(s,-.72,.1,.04,T,3)], - torso:[[.8,.74,.5,0,1.2,0,T],...[1.02,1.18,1.34].map(y=>[.82,.025,.52,0,y,0,K]),[.4,.12,.5,0,1.58,0,T],[.03,.66,.02,0,1.2,-.258,W],...pack(K,[Bk(0,1.3,.42,.04,W,9)])], + torso:[[.8,.74,.5,0,1.2,0,T],...[1.02,1.18,1.34].map(y=>[.82,.025,.52,0,y,0,K]),[.4,.12,.5,0,1.58,0,T],[.03,.66,.02,0,1.2,-.258,W],...pack(K,[Bk(0,1.3,.42,.04,W,16)])], head:[[.58,.36,.58,0,.1,0,T],[.5,.2,.07,0,.02,-.3,G(0xffb04a)],[.44,.06,.08,0,.06,-.302,G(0xffe39a)],[.6,.05,.6,0,.02,0,INK]], arms:[...arms2(i=>onArm(i,0,0,-.245,.22,.22,.18,T))]}, {id:'racer',home:[0xe8202a,0x5a0a0e],hat:1,visor:false,base:{leg:T,boot:SHOE,sleeve:T,glove:W}, leg:s=>[LS(s,-.4,.05,.8,W,0),LS(s,-.4,.02,.8,INK,1)], - torso:[Sd(-1,1.22,.05,.7,W),Sd(1,1.22,.05,.7,W),band(1.555,.05,W),F(-.18,1.4,.14,.07,0x3ee6d0),F(.18,1.4,.14,.07,GOLD),F(-.18,1.28,.14,.07,W),F(.18,1.28,.14,.07,0x3a7be8),F(0,1.08,.3,.08,W),band(.9,.08,K),...pack(K,[Bk(0,1.4,.42,.05,W,9)])], + torso:[Sd(-1,1.22,.05,.7,W),Sd(1,1.22,.05,.7,W),band(1.555,.05,W),F(-.18,1.4,.14,.07,0x3ee6d0),F(.18,1.4,.14,.07,GOLD),F(-.18,1.28,.14,.07,W),F(.18,1.28,.14,.07,0x3a7be8),F(0,1.08,.3,.08,W),band(.9,.08,K),...pack(K,[Bk(0,1.4,.42,.05,W,16)])], head:[[.6,.6,.6,0,.0,0,W],[.62,.18,.62,0,.18,0,T],[.62,.04,.62,0,.0,0,T],[.46,.12,.04,0,.02,-.31,G(0x7fe4ff)],[.44,.03,.05,0,.06,-.31,G(0xdffaff)]], arms:[...arms2(i=>aTop(i,0,.62,.04,W))]}, -{id:'referee',home:[0x3f8fe0,0x183a66],hat:1,base:{leg:INK,boot:SHOE,sleeve:T,glove:L}, - leg:s=>[LB(-.6,.16,T),LB(-.53,.025,W,1)], +{id:'referee',home:[0x3f8fe0,0x183a66],hat:1,base:{leg:T,boot:SHOE,sleeve:T,glove:L}, + leg:s=>[LB(-.6,.16,W),LB(-.53,.025,T,1)], torso:[...[-.29,-.145,0,.145,.29].map(x=>F(x,1.22,.06,.7,W)),...[-.29,-.145,0,.145,.29].map(x=>Bk(x,1.22,.06,.7,W)),Sd(-1,1.22,.06,.7,W),Sd(1,1.22,.06,.7,W),band(1.555,.05,INK),band(.9,.08,INK), - [.02,.3,.02,-.06,1.42,-.252,INK,0,0,.3],[.02,.3,.02,.06,1.42,-.252,INK,0,0,-.3],[.05,.04,.08,0,1.28,-.27,SILVER],...pack(T,[Bk(0,1.26,.42,.05,W,9)])], + [.02,.3,.02,-.06,1.42,-.252,INK,0,0,.3],[.02,.3,.02,.06,1.42,-.252,INK,0,0,-.3],[.05,.04,.08,0,1.28,-.27,SILVER],...pack(T,[Bk(0,1.26,.42,.05,W,16)])], head:[[.58,.16,.58,0,.21,0,INK],[.5,.04,.22,0,.15,-.36,INK]], arms:[...arms2(i=>aBand(i,-.14,.04,INK))]}, {id:'coach',home:[0x8a2be2,0x351056],hat:1,base:{leg:K,boot:W,sleeve:T,glove:L}, leg:s=>[LS(s,-.43,.05,.86,W,0)], - torso:[F(0,1.22,.025,.72,SILVER),band(1.56,.06,K),[.4,.14,.5,0,1.6,0,T],Sd(-1,1.22,.06,.7,W),Sd(1,1.22,.06,.7,W),[.02,.32,.02,-.08,1.43,-.252,W,0,0,.25],[.02,.32,.02,.08,1.43,-.252,W,0,0,-.25],[.05,.05,.09,0,1.28,-.27,SILVER],Bk(0,1.45,.42,.06,W),...pack(T,[Bk(0,1.3,.42,.05,W,9)])], + torso:[F(0,1.22,.025,.72,SILVER),band(1.56,.06,K),[.4,.14,.5,0,1.6,0,T],Sd(-1,1.22,.06,.7,W),Sd(1,1.22,.06,.7,W),[.02,.32,.02,-.08,1.43,-.252,W,0,0,.25],[.02,.32,.02,.08,1.43,-.252,W,0,0,-.25],[.05,.05,.09,0,1.28,-.27,SILVER],Bk(0,1.45,.42,.06,W),...pack(T,[Bk(0,1.3,.42,.05,W,16)])], head:[[.58,.16,.58,0,.21,0,T],[.5,.04,.22,0,.15,-.36,T],[.06,.04,.06,0,.3,0,W],[.5,.03,.03,0,.16,-.47,W]], arms:[...arms2(i=>aTop(i,0,.62,.035,W))]}, {id:'mascot',home:[0xc8641e,0x5a2a0a],hat:1,visor:false,base:{leg:T,boot:L,sleeve:T,glove:L}, @@ -213,133 +213,133 @@ const OUTFITS=[null, arms:[...arms2(i=>onArm(i,0,0,-.245,.22,.22,.18,L))]}, {id:'judo',home:[0x2a5fd0,0x0f2558],base:{leg:T,boot:W,sleeve:T,glove:L}, leg:s=>[[.31,.8,.33,0,-.42,0,T],LB(-.79,.04,K,1)], - torso:[[.78,.74,.48,0,1.2,0,T],[.12,.6,.02,-.06,1.26,-.25,K,0,0,-.35],[.12,.6,.02,.06,1.26,-.25,K,0,0,.35],[.82,.08,.52,0,.98,0,INK],[.08,.08,.04,0,.98,-.27,INK],[.04,.22,.02,-.04,.86,-.275,INK,0,0,.2],[.04,.22,.02,.05,.86,-.275,INK,0,0,-.2],...pack(T,[Bk(0,1.26,.42,.04,K,9)])], + torso:[[.78,.74,.48,0,1.2,0,T],[.12,.6,.02,-.06,1.26,-.25,K,0,0,-.35],[.12,.6,.02,.06,1.26,-.25,K,0,0,.35],[.82,.08,.52,0,.98,0,INK],[.08,.08,.04,0,.98,-.27,INK],[.04,.22,.02,-.04,.86,-.275,INK,0,0,.2],[.04,.22,.02,.05,.86,-.275,INK,0,0,-.2],...pack(T,[Bk(0,1.26,.42,.04,K,16)])], head:[hBand(.12,.07,W),[.04,.18,.03,-.05,.04,.31,W,0,0,.3],[.04,.18,.03,.05,.04,.31,W,0,0,-.3]], arms:[...arms2(i=>onArm(i,0,0,-.08,.21,.21,.46,T))]}, -{id:'cheer',home:[0xe8327a,0x5e0f30],base:{leg:W,boot:W,sleeve:W,glove:W}, +{id:'cheer',home:[0xe8327a,0x5e0f30],hat:1,base:{leg:W,boot:W,sleeve:W,glove:W}, leg:s=>[[.32,.04,.39,0,-.84,-.03,T],LF(0,-.75,.05,.08,T,1)], torso:[[.1,.36,.02,-.12,1.3,-.235,W,0,0,.6],[.1,.36,.02,.12,1.3,-.235,W,0,0,-.6],[.1,.36,.02,-.12,1.3,.235,W,0,0,-.6],[.1,.36,.02,.12,1.3,.235,W,0,0,.6], - ...[[0,-1],[0,1]].flatMap(([a,b])=>[]),[.82,.28,.52,0,.8,0,T],[.83,.04,.53,0,.68,0,W],...[-.3,-.15,0,.15,.3].map(x=>[.02,.27,.02,x,.8,-.265,K]),...pack(T,[Bk(0,1.26,.3,.06,W,9)])], + ...[[0,-1],[0,1]].flatMap(([a,b])=>[]),[.82,.28,.52,0,.8,0,T],[.83,.04,.53,0,.68,0,W],...[-.3,-.15,0,.15,.3].map(x=>[.02,.27,.02,x,.8,-.265,K]),...pack(T,[Bk(0,1.26,.3,.06,W,16)])], head:[[.2,.12,.08,0,.24,.3,T],[.12,.14,.06,-.13,.24,.3,T,0,0,.4],[.12,.14,.06,.13,.24,.3,T,0,0,-.4]], arms:[...arms2(i=>onArm(i,0,0,.1,.19,.19,.3,T))]}, // ---------------- robots ---------------- {id:'tinbot',home:[0xd04a3a,0x5a1a12],hat:1,visor:false,base:{leg:T,boot:SILVER,sleeve:SILVER,glove:SILVER}, leg:s=>[LB(-.2,.04,SILVER),LB(-.4,.04,SILVER),LB(-.6,.04,SILVER),[.34,.14,.42,0,-.79,-.04,SILVER]], - torso:[[.78,.74,.48,0,1.22,0,T],F(0,1.25,.4,.3,SILVER,2),F(-.1,1.3,.1,.1,G(0xff5c5c),3),F(.08,1.3,.08,.08,G(0x7dff8a),3),F(.08,1.18,.22,.04,INK,3),...[[-.33,1.53],[.33,1.53],[-.33,.92],[.33,.92]].flatMap(([x,y])=>[F(x,y,.04,.04,SILVER,2),Bk(x,y,.04,.04,SILVER,2)]),...pack(SILVER,[Bk(0,1.26,.3,.06,T,9),Bk(-.08,1.4,.06,.06,G(0xffd23f),10)])], + torso:[[.78,.74,.48,0,1.22,0,T],F(0,1.25,.4,.3,SILVER,2),F(-.1,1.3,.1,.1,G(0xff5c5c),3),F(.08,1.3,.08,.08,G(0x7dff8a),3),F(.08,1.18,.22,.04,INK,3),...[[-.33,1.53],[.33,1.53],[-.33,.92],[.33,.92]].flatMap(([x,y])=>[F(x,y,.04,.04,SILVER,2),Bk(x,y,.04,.04,SILVER,2)]),...pack(SILVER,[Bk(0,1.26,.3,.06,T,16),Bk(-.08,1.4,.06,.06,G(0xffd23f),17)])], head:[[.04,.18,.04,0,.36,0,SILVER],[.09,.09,.09,0,.48,0,G(0xff5c5c),0,0,0,'o'],[.14,.12,.04,-.12,.06,-.29,G(0x8ff6ff)],[.14,.12,.04,.12,.06,-.29,G(0x8ff6ff)],[.3,.025,.03,0,-.1,-.285,SILVER],[.3,.025,.03,0,-.15,-.285,SILVER],[.08,.12,.12,-.31,0,0,SILVER,0,0,Math.PI/2,'c'],[.08,.12,.12,.31,0,0,SILVER,0,0,Math.PI/2,'c'],HT(0,0,.4,.4,K)], arms:[...arms2(i=>[0.22,.1,-.02,-.14].map(u=>aBand(i,u,.05,T))).flat()]}, {id:'android',home:[0x8a96a8,0x2c3440],hat:1,visor:false,base:{leg:T,boot:W,sleeve:T,glove:W}, - leg:s=>[LF(0,-.43,.18,.8,W,0),LF(0,-.43,.02,.7,G(0x6ff4ff),1),LB(-.43,.06,0xb9c2cc,0),[.31,.17,.38,0,-.78,-.03,W]], - torso:[F(0,1.24,.5,.58,W),F(0,1.24,.02,.5,G(0x6ff4ff),1),F(0,1.36,.3,.02,G(0x6ff4ff),1),Bk(0,1.24,.5,.58,W),Sd(-1,1.22,.2,.6,W),Sd(1,1.22,.2,.6,W),...pack(W,[Bk(0,1.26,.3,.02,G(0x6ff4ff),9),Bk(0,1.36,.3,.02,G(0x6ff4ff),9)])], - head:[[.56,.56,.56,0,0,0,W],HT(0,0,.3,.56,T),[.46,.06,.03,0,.03,-.29,G(0x6ff4ff)],HS(-1,0,0,.2,.2,T,1),HS(1,0,0,.2,.2,T,1)], + leg:s=>[LF(0,-.43,.18,.8,L,0),LF(0,-.43,.02,.7,G(0x6ff4ff),1),LB(-.43,.06,0xb9c2cc,0),[.31,.17,.38,0,-.78,-.03,W]], + torso:[F(0,1.24,.5,.58,L),F(0,1.24,.02,.5,G(0x6ff4ff),1),F(0,1.36,.3,.02,G(0x6ff4ff),1),Bk(0,1.24,.5,.58,L),Sd(-1,1.22,.2,.6,L),Sd(1,1.22,.2,.6,L),...pack(L,[Bk(0,1.26,.3,.02,G(0x6ff4ff),16),Bk(0,1.36,.3,.02,G(0x6ff4ff),16)])], + head:[[.56,.56,.56,0,0,0,L],HT(0,0,.3,.56,T),[.46,.06,.03,0,.03,-.29,G(0x6ff4ff)],HS(-1,0,0,.2,.2,T,1),HS(1,0,0,.2,.2,T,1)], arms:[...arms2(i=>aTop(i,0,.5,.02,G(0x6ff4ff),1)),...arms2(i=>aBand(i,.05,.04,0xb9c2cc))]}, -{id:'mech',home:[0xe0a020,0x3a2a08],hat:1,visor:false,base:{leg:T,boot:INK,sleeve:T,glove:INK}, - leg:s=>[LF(0,-.4,.26,.16,SILVER,0),[.3,.08,.34,0,-.08,0,INK],LS(s,-.55,.18,.16,SILVER)], - torso:[F(0,1.32,.6,.34,SILVER),[.06,.72,.02,-.2,1.22,-.25,INK],[.06,.72,.02,.2,1.22,-.25,INK],[.06,.72,.02,-.2,1.22,.25,INK],[.06,.72,.02,.2,1.22,.25,INK],[.26,.18,.54,-.39,1.5,0,SILVER],[.26,.18,.54,.39,1.5,0,SILVER],...num(7,-.39,1.5,.03,T,false,1).map(p=>{p[3]-=0;return p}),band(.9,.1,INK), +{id:'mech',home:[0xe0a020,0x3a2a08],hat:1,visor:false,base:{leg:T,boot:D,sleeve:T,glove:INK}, + leg:s=>[LF(0,-.4,.26,.16,SILVER,0),[.3,.08,.34,0,-.08,0,D],LS(s,-.55,.18,.16,SILVER)], + torso:[F(0,1.32,.6,.34,SILVER),[.06,.72,.02,-.2,1.22,-.25,W],[.06,.72,.02,.2,1.22,-.25,W],[.06,.72,.02,-.2,1.22,.25,W],[.06,.72,.02,.2,1.22,.25,W],[.22,.16,.5,-.35,1.5,0,SILVER],[.22,.16,.5,.35,1.5,0,SILVER],...num(7,-.35,1.5,.03,T,false,6),band(.9,.1,INK), ...pack(SILVER,[[.14,.4,.14,-.12,1.2,.47,INK,0,0,0,'c'],[.14,.4,.14,.12,1.2,.47,INK,0,0,0,'c'],[.1,.06,.1,-.12,.98,.47,G(0xff8a3d),0,0,0,'c'],[.1,.06,.1,.12,.98,.47,G(0xff8a3d),0,0,0,'c']])], - head:[[.6,.58,.6,0,.02,0,T],[.5,.24,.05,0,.02,-.31,G(0x8fe0ff)],[.62,.06,.62,0,.17,0,INK],[.04,.04,.24,.26,-.12,-.24,INK],[.06,.06,.06,.26,-.12,-.37,G(0xff5c5c)],HT(0,0,.08,.6,W,1)], + head:[[.6,.58,.6,0,.02,0,T],[.5,.24,.05,0,.02,-.31,G(0x8fe0ff)],[.62,.06,.62,0,.17,0,W],[.04,.04,.24,.26,-.12,-.24,INK],[.06,.06,.06,.26,-.12,-.37,G(0xff5c5c)],HT(0,0,.08,.6,W,1)], arms:[...arms2(i=>onArm(i,0,.04,.18,.22,.12,.26,SILVER))]}, -{id:'junkbot',home:[0x3a9a7a,0x14382c],hat:1,visor:false,base:{leg:T,boot:0x8a7a6a,sleeve:STEEL,glove:0x8a7a6a}, +{id:'junkbot',home:[0x3a9a7a,0x14382c],hat:1,visor:false,base:{leg:T,boot:STEEL,sleeve:T,glove:STEEL}, leg:s=>[LF(.03*s,-.3,.16,.2,STEEL,0),LB(-.6,.05,0xb5522a)], torso:[F(-.18,1.4,.26,.24,STEEL),F(.2,1.1,.24,.22,0xb5522a),Bk(.15,1.38,.26,.3,STEEL),...[[-.28,1.5],[-.08,1.5],[-.28,1.3],[.1,1.18],[.3,1.0]].map(([x,y])=>F(x,y,.035,.035,SILVER,1)),band(.9,.08,STEEL), - ...pack(0x8a7a6a,[[.08,.5,.08,.13,1.55,.42,STEEL,0,0,0,'c'],[.1,.06,.1,.13,1.82,.42,INK,0,0,0,'c']])], - head:[[.56,.5,.56,0,-.01,0,STEEL],[.2,.2,.04,-.1,.04,-.29,G(0xffd23f),0,0,0],[.1,.1,.04,.14,.08,-.29,G(0x8ff6ff)],[.24,.03,.03,.05,-.14,-.285,INK],HT(-.1,-.1,.2,.2,0xb5522a),HT(.12,.1,.16,.2,T)], + ...pack(K,[[.08,.5,.08,.13,1.55,.42,STEEL,0,0,0,'c'],[.1,.06,.1,.13,1.82,.42,INK,0,0,0,'c']])], + head:[[.56,.5,.56,0,-.01,0,T],[.3,.18,.56,0,.17,0,STEEL],[.2,.2,.04,-.1,.04,-.29,G(0xffd23f),0,0,0],[.1,.1,.04,.14,.08,-.29,G(0x8ff6ff)],[.24,.03,.03,.05,-.14,-.285,INK],HT(-.1,-.1,.2,.2,0xb5522a),HT(.12,.1,.16,.2,T)], arms:[...arms2(i=>onArm(i,.02,.02,.1,.2,.14,.22,0xb5522a))]}, // ---------------- pirates (every one with an eye patch) ---------------- -{id:'pcaptain',home:[0xb3263a,0x4a0e18],hat:1,base:{leg:CREAM,boot:INK,sleeve:T,glove:CREAM}, - leg:s=>[[.31,.4,.33,0,-.66,0,INK],[.34,.08,.36,0,-.43,0,INK]], - torso:[band(1.22,.72,T),[.78,.42,.06,0,.68,.24,T],[.36,.42,.06,-.2,.68,-.24,T],[.36,.42,.06,.2,.68,-.24,T],F(0,1.42,.14,.24,CREAM,1),...[1.42,1.28,1.14,1.0].flatMap(y=>[F(-.15,y,.04,.04,GOLD,1),F(.15,y,.04,.04,GOLD,1)]),band(.94,.08,INK,1),F(0,.94,.1,.1,GOLD,2), - [.5,.03,.02,0,1.2,-.254,GOLD,0,0,.85],...pack(0x7a4a24,[Bk(0,1.26,.42,.04,GOLD,9),Bk(0,1.06,.42,.04,GOLD,9)]), +{id:'pcaptain',home:[0xb3263a,0x4a0e18],hat:1,base:{leg:CREAM,boot:K,sleeve:T,glove:CREAM}, + leg:s=>[[.31,.4,.33,0,-.66,0,K],[.34,.08,.36,0,-.43,0,K]], + torso:[band(1.22,.72,T),[.74,.3,.05,0,.74,.245,T],[.3,.3,.05,-.22,.74,-.245,T],[.3,.3,.05,.22,.74,-.245,T],F(0,1.42,.14,.24,CREAM,1),...[1.42,1.28,1.14,1.0].flatMap(y=>[F(-.15,y,.04,.04,GOLD,1),F(.15,y,.04,.04,GOLD,1)]),band(.94,.08,INK,1),F(0,.94,.1,.1,GOLD,2), + [.5,.03,.02,0,1.2,-.254,GOLD,0,0,.85],...pack(K,[Bk(0,1.26,.42,.04,GOLD,16),Bk(0,1.06,.42,.04,GOLD,16)]), [.1,.12,.16,-.3,1.66,-.02,0x3fae55],[.08,.08,.1,-.3,1.76,-.08,0x3fae55],[.03,.04,.05,-.3,1.74,-.15,0xffd23f],[.12,.04,.06,-.3,1.72,-.06,0xe8453c],[.04,.1,.14,-.36,1.64,0,0x2f7fe8],[.04,.14,.06,-.3,1.56,.08,0xe8453c,.4]], - head:[[.66,.05,.66,0,.27,0,INK,0,.785],[.62,.05,.62,0,.27,0,INK],[.46,.16,.46,0,.36,0,INK],[.68,.025,.68,0,.3,0,GOLD,0,.785],[.04,.18,.1,.2,.42,.1,W,.4],...PATCH], + head:[[.6,.05,.6,0,.27,0,D,0,.785],[.58,.05,.58,0,.27,0,D],[.44,.14,.44,0,.35,0,D],[.62,.025,.62,0,.3,0,GOLD,0,.785],[.04,.14,.08,.18,.4,.1,W,.4],...PATCH], arms:[...arms2(i=>aBand(i,-.14,.1,K,1)),...arms2(i=>onArm(i,0,.11,-.14,.04,.03,.04,GOLD))]}, -{id:'deckhand',home:[0x2a6fd0,0x0f2a52],hat:1,base:{leg:0x9aa2ac,boot:0x6a4a2c,sleeve:W,glove:CREAM}, - leg:s=>[LB(-.6,.06,0x8a929c,1)], - torso:[...[1.52,1.38,1.24,1.1,.96].map(y=>band(y,.07,T)),band(.88,.05,0x6a4a2c,1),...pack(0x8a6a44,[Bk(0,1.26,.42,.03,0x6a4a2c,9)])], +{id:'deckhand',home:[0x2a6fd0,0x0f2a52],hat:1,base:{leg:K,boot:INK,sleeve:W,glove:CREAM}, + leg:s=>[LB(-.6,.06,L,1)], + torso:[...[1.52,1.38,1.24,1.1,.96].map(y=>band(y,.07,T)),band(.88,.05,INK,1),...pack(L,[Bk(0,1.26,.42,.03,K,16)])], head:[[.58,.24,.58,0,.16,0,T],[.1,.1,.1,0,.18,.31,T],[.06,.16,.04,-.04,.08,.33,T,0,0,.3],[.06,.16,.04,.04,.08,.33,T,0,0,-.3],...[[-.15,-.1],[.1,.12],[-.05,.15],[.18,-.12]].map(([x,z])=>HT(x,z,.05,.05,W,1)),...PATCH], arms:[...arms2(i=>[.2,.06,-.08].map(u=>aBand(i,u,.06,T))).flat()]}, -{id:'firstmate',home:[0x2b8a6e,0x0e3a2c],hat:1,base:{leg:0x5a5f68,boot:INK,sleeve:CREAM,glove:CREAM}, - leg:s=>[[.33,.12,.36,0,-.55,0,INK],LB(-.12,.02,0x4a4f58,1)], - torso:[F(0,1.22,.18,.72,CREAM),[.27,.74,.03,-.24,1.21,-.235,T],[.27,.74,.03,.24,1.21,-.235,T],Bk(0,1.22,.74,.72,T),Sd(-1,1.22,.44,.72,T),Sd(1,1.22,.44,.72,T),band(.95,.12,K,2),[.1,.24,.04,.25,.8,-.24,K],F(-.14,1.48,.04,.04,GOLD,4), - ...pack(0x6a4a2c,[Bk(0,1.34,.42,.05,INK,9)])], +{id:'firstmate',home:[0x2b8a6e,0x0e3a2c],hat:1,base:{leg:T,boot:D,sleeve:L,glove:L}, + leg:s=>[[.33,.12,.36,0,-.55,0,D],LB(-.12,.02,D,1)], + torso:[F(0,1.22,.18,.72,L),[.27,.74,.03,-.24,1.21,-.235,T],[.27,.74,.03,.24,1.21,-.235,T],Bk(0,1.22,.74,.72,T),Sd(-1,1.22,.44,.72,T),Sd(1,1.22,.44,.72,T),band(.95,.12,K,2),[.1,.24,.04,.25,.8,-.24,K],F(-.14,1.48,.04,.04,GOLD,4), + ...pack(K,[Bk(0,1.34,.42,.05,INK,16)])], head:[[.58,.2,.58,0,.18,0,0xe8453c],...[[-.12,-.12],[.12,.08],[-.04,.16],[.16,-.14]].map(([x,z])=>HT(x,z,.05,.05,W,1)),[.1,.08,.1,.22,.1,.3,0xe8453c],...PATCH], - arms:[onArm(0,0,0,-.21,.12,.12,.06,SILVER),onArm(0,0,-.01,-.29,.04,.04,.12,SILVER),onArm(0,0,.05,-.355,.04,.12,.04,SILVER),onArm(0,0,.1,-.31,.04,.04,.1,SILVER),onArm(1,0,0,-.15,.2,.2,.06,CREAM)], + arms:[onArm(0,0,0,-.21,.12,.12,.06,SILVER),onArm(0,0,-.01,-.29,.04,.04,.12,SILVER),onArm(0,0,.05,-.355,.04,.12,.04,SILVER),onArm(0,0,.1,-.31,.04,.04,.1,SILVER),onArm(1,0,0,-.15,.2,.2,.06,L)], noGlove:[1,0]}, -{id:'ghostpirate',home:[0x3a8a8a,0x123838],hat:1,visor:false,base:{leg:0xd6f2ee,boot:0xbfe6e0,sleeve:T,glove:0xd6f2ee}, - leg:s=>[LB(-.3,.03,0xa8dcd4,1),LB(-.55,.03,0xa8dcd4,1)], +{id:'ghostpirate',home:[0x3a8a8a,0x123838],hat:1,visor:false,base:{leg:L,boot:L,sleeve:T,glove:L}, + leg:s=>[LB(-.3,.03,W,1),LB(-.55,.03,W,1)], torso:[band(1.22,.72,T),...[-.3,-.1,.1,.3].map((x,i)=>[.16,.12+(i%2)*.08,.46,x,.83-(i%2)*.04,0,T]),F(0,1.42,.14,.24,0xd6f2ee,1),...[1.42,1.24,1.06].map(y=>F(-.15,y,.05,.05,0xa8dcd4,1)), - ...pack(0x6f8f8a,[Bk(0,1.26,.42,.04,0xa8dcd4,9)])], - head:[[.56,.56,.56,0,0,0,0xd6f2ee],[.66,.05,.66,0,.27,0,K,0,.785],[.46,.16,.46,0,.36,0,K],[.12,.1,.03,-.12,.04,-.29,G(0x7dffc8)],[.12,.1,.03,.12,.04,-.29,G(0x7dffc8)],[.26,.04,.03,0,-.14,-.285,0x5f8f8a],...PATCH.slice(1)], + ...pack(K,[Bk(0,1.26,.42,.04,L,16)])], + head:[[.56,.56,.56,0,0,0,L],[.66,.05,.66,0,.27,0,K,0,.785],[.46,.16,.46,0,.36,0,K],[.12,.1,.03,-.12,.04,-.29,G(0x7dffc8)],[.12,.1,.03,.12,.04,-.29,G(0x7dffc8)],[.26,.04,.03,0,-.14,-.285,0x5f8f8a],...PATCH.slice(1)], arms:[...arms2(i=>aBand(i,-.16,.08,T,1))]}, // ---------------- mobsters and suits (costume party) ---------------- {id:'pinstripe',home:[0x4a5a7a,0x1a2232],hat:1,base:{leg:T,boot:INK,sleeve:T,glove:CREAM}, leg:s=>[...[-.08,0,.08].map(x=>LF(x,-.4,.012,.8,0xe8e8e8)),...[-.08,0,.08].map(x=>LBk(x,-.4,.012,.8,0xe8e8e8)),[.315,.08,.385,0,-.75,-.03,W]], - torso:[...[-.3,-.22,-.14,.14,.22,.3].map(x=>F(x,1.22,.012,.7,0xe8e8e8)),...[-.3,-.2,-.1,0,.1,.2,.3].map(x=>Bk(x,1.22,.012,.7,0xe8e8e8)),F(0,1.42,.16,.32,W,1),F(0,1.36,.06,.28,0xc83a3a,2),[.08,.36,.02,-.1,1.42,-.25,K,0,0,-.35],[.08,.36,.02,.1,1.42,-.25,K,0,0,.35],F(-.2,1.36,.08,.04,W,1),...pack(T,[Bk(0,1.26,.42,.03,0xe8e8e8,9)])], - head:[[.7,.03,.66,0,.26,0,0x5a5a64],[.5,.2,.46,0,.37,0,0x5a5a64],[.52,.06,.48,0,.3,0,INK],[.12,.02,.4,0,.47,0,0x4a4a54]], + torso:[...[-.3,-.22,-.14,.14,.22,.3].map(x=>F(x,1.22,.012,.7,0xe8e8e8)),...[-.3,-.2,-.1,0,.1,.2,.3].map(x=>Bk(x,1.22,.012,.7,0xe8e8e8)),F(0,1.42,.16,.32,W,1),F(0,1.36,.06,.28,0xc83a3a,2),[.08,.36,.02,-.1,1.42,-.25,K,0,0,-.35],[.08,.36,.02,.1,1.42,-.25,K,0,0,.35],F(-.2,1.36,.08,.04,W,1),...pack(T,[Bk(0,1.26,.42,.03,0xe8e8e8,16)])], + head:[[.7,.03,.66,0,.26,0,D],[.5,.2,.46,0,.37,0,D],[.52,.06,.48,0,.3,0,W],[.12,.02,.4,0,.47,0,K]], arms:[...arms2(i=>aBand(i,-.16,.04,W))]}, {id:'boss',home:[0x5a3a8a,0x22143a],hat:1,base:{leg:T,boot:INK,sleeve:T,glove:INK}, leg:s=>[], - torso:[[.82,.76,.5,0,1.2,0,T],[.82,.4,.06,0,.66,.24,T],[.38,.4,.06,-.21,.66,-.24,T],[.38,.4,.06,.21,.66,-.24,T],[.06,.4,.46,-.4,.66,0,T],[.06,.4,.46,.4,.66,0,T],[.9,.16,.58,0,1.56,0,CREAM],...[-.3,-.1,.1,.3].map(x=>[.12,.06,.04,x,1.5,-.29,0xe2dccf]), - [.84,.06,.52,0,.98,0,K],F(-.12,1.3,.04,.04,GOLD,4),F(-.12,1.15,.04,.04,GOLD,4),F(.12,1.3,.04,.04,GOLD,4),F(.12,1.15,.04,.04,GOLD,4),...pack(T,[Bk(0,1.4,.42,.05,CREAM,9)])], - head:[[.6,.34,.6,0,.38,0,CREAM],...[[-.2,-.31],[0,-.31],[.2,-.31]].map(([x,z])=>[.14,.1,.03,x,.48,z,0xe2dccf]),[.62,.06,.62,0,.22,0,0xe2dccf],[.42,.07,.05,0,.04,-.3,G(0x2a3a52)],[.08,.03,.05,-.12,.08,-.305,G(0x9fd6ff)]], + torso:[[.82,.76,.5,0,1.2,0,T],[.8,.3,.05,0,.72,.245,T],[.36,.3,.05,-.22,.72,-.245,T],[.36,.3,.05,.22,.72,-.245,T],[.88,.14,.56,0,1.56,0,CREAM],...[-.3,-.1,.1,.3].map(x=>[.12,.06,.04,x,1.5,-.29,0xe2dccf]), + [.84,.06,.52,0,.98,0,K],F(-.12,1.3,.04,.04,GOLD,4),F(-.12,1.15,.04,.04,GOLD,4),F(.12,1.3,.04,.04,GOLD,4),F(.12,1.15,.04,.04,GOLD,4),...pack(T,[Bk(0,1.4,.42,.05,CREAM,16)])], + head:[[.58,.24,.58,0,.34,0,CREAM],...[[-.2,-.3],[0,-.3],[.2,-.3]].map(([x,z])=>[.14,.1,.03,x,.4,z,0xe2dccf]),[.62,.06,.62,0,.22,0,0xe2dccf],[.42,.07,.05,0,.04,-.3,G(0x2a3a52)],[.08,.03,.05,-.12,.08,-.305,G(0x9fd6ff)]], arms:[...arms2(i=>aBand(i,-.13,.08,CREAM,1)),onArm(0,0,.1,-.27,.03,.03,.03,GOLD),onArm(1,0,.1,-.27,.03,.03,.03,GOLD)]}, {id:'tracksuit',home:[0x2a3a8a,0x10163a],hat:1,base:{leg:T,boot:W,sleeve:T,glove:L}, leg:s=>[LS(s,-.42,.03,.84,W,0,-.035),LS(s,-.42,.03,.84,W,0,.035),[.31,.05,.38,0,-.835,-.03,T]], torso:[F(0,1.22,.025,.72,SILVER),Sd(-1,1.22,.03,.7,W,0,-.035),Sd(-1,1.22,.03,.7,W,0,.035),Sd(1,1.22,.03,.7,W,0,-.035),Sd(1,1.22,.03,.7,W,0,.035),[.42,.12,.5,0,1.6,0,T], ...[[-.18,1.5],[-.15,1.42],[-.1,1.35],[-.04,1.31],[.04,1.31],[.1,1.35],[.15,1.42],[.18,1.5]].map(([x,y])=>[.05,.05,.03,x,y,-.25,GOLD]),[.1,.1,.03,0,1.25,-.26,GOLD,0,0,0,'c'],[.07,.07,.02,0,1.25,-.27,0xfff0a8,0,0,0,'c'],Bk(0,1.45,.5,.08,W), - ...pack(T,[Bk(-.03,1.26,.03,.5,W,9),Bk(.03,1.26,.03,.5,W,9)])], + ...pack(T,[Bk(-.03,1.26,.03,.5,W,16),Bk(.03,1.26,.03,.5,W,16)])], head:[[.58,.14,.58,0,.22,0,K],[.5,.04,.2,0,.17,-.36,K]], arms:[...arms2(i=>aTop(i,0,.62,.025,W,0,-.03)),...arms2(i=>aTop(i,0,.62,.025,W,0,.03))]}, -{id:'bodyguard',home:[0x3a4a5a,0x141c24],hat:1,visor:false,base:{leg:T,boot:INK,sleeve:T,glove:CREAM}, - leg:s=>[], - torso:[F(0,1.4,.18,.36,W,1),F(0,1.34,.06,.32,INK,2),[.08,.4,.02,-.11,1.4,-.25,K,0,0,-.35],[.08,.4,.02,.11,1.4,-.25,K,0,0,.35],F(.2,1.4,.06,.03,0xe0e0e0,1),...pack(T,[Bk(0,1.4,.42,.03,K,9)])], +{id:'bodyguard',home:[0x3a4a5a,0x141c24],hat:1,visor:false,filter:D,base:{leg:T,boot:D,sleeve:T,glove:CREAM}, + leg:s=>[[.3,.56,.34,0,-.5,0,T],[.32,.06,.4,0,-.83,-.03,D]], + torso:[band(.92,.08,D),F(0,1.4,.18,.36,W,1),F(0,1.34,.06,.32,INK,2),[.08,.4,.02,-.11,1.4,-.25,K,0,0,-.35],[.08,.4,.02,.11,1.4,-.25,K,0,0,.35],F(.2,1.4,.06,.03,0xe0e0e0,1),...pack(T,[Bk(0,1.4,.42,.03,K,16)])], head:[[.44,.1,.05,0,.04,-.3,G(0x34465c)],[.12,.04,.06,-.12,.07,-.31,G(0xaad8ff)],[.6,.025,.6,0,.07,0,INK],[.03,.06,.03,.29,-.04,0,0xe8e8e8],[.02,.24,.02,.28,-.2,.06,0xe8e8e8,.3]], arms:[...arms2(i=>aBand(i,-.15,.05,W))]}, {id:'tuxedo',home:[0x2e3a6a,0x0e1430],hat:1,base:{leg:T,boot:INK,sleeve:T,glove:W}, leg:s=>[LS(s,-.42,.03,.84,K,0)], - torso:[F(0,1.32,.22,.5,W,1),[.12,.44,.02,-.12,1.36,-.255,K,0,0,-.3],[.12,.44,.02,.12,1.36,-.255,K,0,0,.3],F(0,1.5,.14,.06,INK,2),F(0,1.5,.04,.05,INK,3),...[1.4,1.3,1.2].map(y=>F(0,y,.025,.025,INK,2)),band(1.0,.1,K,1),F(-.22,1.42,.08,.04,W,1),...pack(T,[Bk(0,1.26,.42,.03,K,9)])], + torso:[F(0,1.32,.22,.5,W,1),[.12,.44,.02,-.12,1.36,-.255,K,0,0,-.3],[.12,.44,.02,.12,1.36,-.255,K,0,0,.3],F(0,1.5,.14,.06,INK,2),F(0,1.5,.04,.05,INK,3),...[1.4,1.3,1.2].map(y=>F(0,y,.025,.025,INK,2)),band(1.0,.1,K,1),F(-.22,1.42,.08,.04,W,1),...pack(T,[Bk(0,1.26,.42,.03,K,16)])], head:[[.62,.03,.62,0,.27,0,INK],[.42,.36,.42,0,.45,0,INK],[.44,.06,.44,0,.32,0,T],[.13,.13,.02,.11,.03,-.302,GOLD],[.09,.09,.03,.11,.03,-.302,G(0xdffaff)],[.015,.24,.015,.18,-.1,-.29,GOLD]], arms:[...arms2(i=>aBand(i,-.16,.04,W))]}, {id:'detective',home:[0x6a5a8a,0x2a2238],hat:1,base:{leg:T,boot:INK,sleeve:T,glove:CREAM}, leg:s=>[], - torso:[[.8,.76,.5,0,1.2,0,T],[.8,.38,.06,0,.68,.25,T],[.37,.38,.06,-.215,.68,-.25,T],[.37,.38,.06,.215,.68,-.25,T],[.86,.08,.56,0,1.0,0,K],F(0,1.0,.08,.08,SILVER,3),[.2,.06,.54,-.3,1.57,0,K],[.2,.06,.54,.3,1.57,0,K],[.5,.14,.54,0,1.56,0,K], - ...[1.32,1.16].flatMap(y=>[F(-.14,y,.04,.04,INK,2),F(.14,y,.04,.04,INK,2)]),F(-.24,1.06,.1,.1,K,2),...pack(T,[Bk(0,1.3,.42,.05,K,9)])], + torso:[[.8,.76,.5,0,1.2,0,T],[.78,.28,.05,0,.73,.245,T],[.35,.28,.05,-.215,.73,-.245,T],[.35,.28,.05,.215,.73,-.245,T],[.86,.08,.56,0,1.0,0,K],F(0,1.0,.08,.08,SILVER,3),[.2,.06,.54,-.3,1.57,0,K],[.2,.06,.54,.3,1.57,0,K],[.5,.14,.54,0,1.56,0,K], + ...[1.32,1.16].flatMap(y=>[F(-.14,y,.04,.04,INK,2),F(.14,y,.04,.04,INK,2)]),F(-.24,1.06,.1,.1,K,2),...pack(T,[Bk(0,1.3,.42,.05,K,16)])], head:[[.7,.03,.66,0,.26,0,K],[.5,.2,.46,0,.37,0,K],[.52,.06,.48,0,.3,0,INK],[.1,.06,.02,.2,.31,-.25,0xe8453c]], arms:[...arms2(i=>aBand(i,-.15,.08,K,1))]}, // ---------------- variety ---------------- -{id:'astro',home:[0x3a7ae0,0x14305a],hat:1,visor:false,base:{leg:W,boot:0xb9c2cc,sleeve:W,glove:0xb9c2cc}, +{id:'astro',home:[0x3a7ae0,0x14305a],hat:1,visor:false,base:{leg:L,boot:0xb9c2cc,sleeve:L,glove:0xb9c2cc}, leg:s=>[[.3,.6,.32,0,-.36,0,T],LB(-.42,.07,W,1),LB(-.2,.03,W,1),[.33,.18,.4,0,-.77,-.03,0xb9c2cc]], torso:[[.78,.74,.48,0,1.22,0,T],F(0,1.3,.34,.2,W,1),F(-.1,1.3,.06,.06,G(0xff5c5c),2),F(0,1.3,.06,.06,G(0x7dff8a),2),F(.1,1.3,.06,.06,G(0x8ff6ff),2),F(.22,1.48,.14,.14,W,1,0),F(.22,1.48,.08,.08,T,2),band(.9,.1,0xb9c2cc), - [.54,.64,.28,0,1.24,.35,W],[.5,.04,.29,0,1.48,.35,T],[.06,.3,.06,-.3,1.3,.18,0xb9c2cc,0,0,0,'c'],[.06,.3,.06,.3,1.3,.18,0xb9c2cc,0,0,0,'c']], - head:[[.64,.62,.64,0,.02,0,W],[.48,.36,.04,0,.02,-.32,G(0x5fd6ff)],[.4,.1,.045,-.03,.12,-.322,G(0xc9f4ff)],[.66,.08,.66,0,-.27,0,0xb9c2cc],[.06,.06,.06,.32,.16,0,0xb9c2cc,0,0,Math.PI/2,'c']], + [.54,.64,.28,0,1.24,.35,L],[.5,.04,.29,0,1.48,.35,T],[.06,.3,.06,-.3,1.3,.18,0xb9c2cc,0,0,0,'c'],[.06,.3,.06,.3,1.3,.18,0xb9c2cc,0,0,0,'c']], + head:[[.64,.62,.64,0,.02,0,L],[.48,.36,.04,0,.02,-.32,G(0x5fd6ff)],[.4,.1,.045,-.03,.12,-.322,G(0xc9f4ff)],[.66,.08,.66,0,-.27,0,0xb9c2cc],[.06,.06,.06,.32,.16,0,0xb9c2cc,0,0,Math.PI/2,'c']], arms:[...arms2(i=>aBand(i,.0,.07,T,1)),...arms2(i=>aBand(i,-.16,.05,T,1))],packless:1}, -{id:'wizard',home:[0x5a3ad0,0x22145a],hat:1,base:{leg:T,boot:0x6a4a2c,sleeve:T,glove:CREAM}, +{id:'wizard',home:[0x5a3ad0,0x22145a],hat:1,base:{leg:T,boot:K,sleeve:T,glove:CREAM}, leg:s=>[], - torso:[[.8,.76,.5,0,1.2,0,T],[.82,.56,.54,0,.58,0,T],[.84,.04,.56,0,.32,0,GOLD],[.84,.06,.54,0,.98,0,GOLD],...[[-.2,1.3],[.18,1.1],[-.1,.66],[.24,.52],[.05,1.42]].flatMap(([x,y])=>[F(x,y,.05,.05,0xffe27a,2,.785),Bk(-x,y,.05,.05,0xffe27a,2,.785)]), - [.3,.34,.03,0,1.36,-.255,0xeeeeee],[.2,.12,.03,0,1.14,-.255,0xeeeeee],...pack(0x7a5a3a,[Bk(0,1.4,.42,.04,GOLD,9)])], - head:[[.74,.04,.74,0,.27,0,T],[.5,.2,.5,0,.38,0,T],[.38,.18,.38,.02,.56,.02,T],[.26,.14,.26,.04,.7,.05,T],[.14,.12,.14,.06,.82,.08,T],[.52,.05,.52,0,.31,0,GOLD],[.06,.06,.02,-.1,.4,-.26,0xffe27a,0,0,.785],[.05,.05,.02,.08,.6,-.18,0xffe27a,0,0,.785], + torso:[[.8,.76,.5,0,1.2,0,T],[.8,.24,.5,0,.75,0,T],[.82,.04,.52,0,.64,0,GOLD],[.84,.06,.54,0,.98,0,GOLD],...[[-.2,1.3],[.18,1.1],[-.1,.66],[.05,1.42]].flatMap(([x,y])=>[F(x,y,.05,.05,0xffe27a,2,.785),Bk(-x,y,.05,.05,0xffe27a,2,.785)]), + [.3,.34,.03,0,1.36,-.255,0xeeeeee],[.2,.12,.03,0,1.14,-.255,0xeeeeee],...pack(K,[Bk(0,1.4,.42,.04,GOLD,16)])], + head:[[.74,.04,.74,0,.27,0,T],[.5,.2,.5,0,.38,0,T],[.3,.12,.3,.02,.52,.02,T],[.52,.05,.52,0,.31,0,GOLD],[.06,.06,.02,-.1,.4,-.26,0xffe27a,0,0,.785],[.05,.05,.02,.08,.52,-.155,0xffe27a,0,0,.785], [.34,.26,.04,0,-.2,-.29,0xeeeeee],[.2,.1,.04,0,-.36,-.29,0xeeeeee]], arms:[...arms2(i=>onArm(i,0,-.02,-.17,.25,.24,.12,T)),...arms2(i=>aBand(i,-.2,.04,GOLD,4))]}, -{id:'firefighter',home:[0xd83a1a,0x5a1408],hat:1,base:{leg:T,boot:INK,sleeve:T,glove:0x5a4a3a}, - leg:s=>[LB(-.5,.06,SILVER),LB(-.56,.025,0xffd23f,1),[.33,.3,.38,0,-.72,-.02,INK]], +{id:'firefighter',home:[0xd83a1a,0x5a1408],hat:1,base:{leg:T,boot:D,sleeve:T,glove:0x5a4a3a}, + leg:s=>[LB(-.5,.06,SILVER),LB(-.56,.025,0xffd23f,1),[.33,.3,.38,0,-.72,-.02,D]], torso:[[.8,.76,.5,0,1.2,0,T],[.82,.06,.52,0,1.0,0,SILVER],[.82,.025,.52,0,1.0,0,0xffd23f],[.82,.06,.52,0,1.3,0,SILVER],F(0,1.2,.03,.66,INK,2),...[1.42,1.2,1.0].map(y=>F(.06,y,.06,.03,SILVER,3)),Bk(0,1.48,.5,.12,SILVER,1), - ...pack(0xd8dde2,[Bk(0,1.26,.42,.06,T,9),[.08,.12,.08,0,1.56,.31,INK,0,0,0,'c']])], + ...pack(0xd8dde2,[Bk(0,1.26,.42,.06,T,16),[.08,.12,.08,0,1.56,.31,INK,0,0,0,'c']])], head:[[.6,.18,.6,0,.2,0,T],[.64,.04,.76,0,.12,.05,T],[.14,.1,.6,0,.3,0,T],[.22,.2,.04,0,.2,-.33,0xf2f0ea],[.12,.08,.02,0,.2,-.355,0xffd23f],[.46,.06,.04,0,-.12,-.29,0xffd23f]], arms:[...arms2(i=>aBand(i,-.05,.06,SILVER)),...arms2(i=>aBand(i,-.05,.025,0xffd23f,1))]}, -{id:'knight',home:[0x2a5ac8,0x10244f],hat:1,visor:false,base:{leg:SILVER,boot:STEEL,sleeve:SILVER,glove:STEEL}, - leg:s=>[[.3,.14,.32,0,-.42,0,STEEL],[.3,.36,.32,0,-.18,0,T],LS(s,-.18,.04,.34,W,1)], - torso:[[.78,.74,.48,0,1.2,0,T],[.6,.6,.02,0,1.18,-.255,W,0,0,0],[.44,.44,.02,0,1.18,-.27,T,0,0,.785],[.84,.06,.54,0,.98,0,0x6a4a2c],[.3,.16,.54,-.38,1.56,0,SILVER],[.3,.16,.54,.38,1.56,0,SILVER],F(0,.98,.08,.08,GOLD,3), - ...pack(T,[Bk(0,1.26,.3,.36,W,9),Bk(0,1.26,.2,.2,T,10,.785)])], +{id:'knight',home:[0x2a5ac8,0x10244f],hat:1,visor:false,base:{leg:T,boot:STEEL,sleeve:T,glove:STEEL}, + leg:s=>[[.3,.14,.32,0,-.42,0,STEEL],LF(0,-.62,.22,.3,SILVER,0),LS(s,-.18,.04,.34,W,1)], + torso:[[.78,.74,.48,0,1.2,0,T],[.6,.6,.02,0,1.18,-.255,W,0,0,0],[.44,.44,.02,0,1.18,-.27,T,0,0,.785],[.84,.06,.54,0,.98,0,D],[.24,.14,.5,-.33,1.56,0,T],[.24,.14,.5,.33,1.56,0,T],F(0,.98,.08,.08,GOLD,3), + ...pack(T,[Bk(0,1.26,.3,.36,W,16),Bk(0,1.26,.2,.2,T,17,.785)])], head:[[.58,.58,.58,0,0,0,SILVER],[.46,.04,.04,0,.05,-.3,G(0x9fd6ff)],[.04,.2,.04,0,-.08,-.3,STEEL],...[-.16,-.08,0,.08,.16].map(x=>[.02,.02,.04,x,-.15,-.3,INK]),[.06,.2,.24,0,.38,.05,T],[.06,.1,.12,0,.5,.12,T],[.6,.04,.6,0,.16,0,STEEL]], - arms:[...arms2(i=>onArm(i,0,.02,.2,.24,.16,.22,SILVER)),...arms2(i=>aBand(i,-.05,.05,STEEL))]} + arms:[...arms2(i=>onArm(i,0,.02,.2,.21,.14,.2,T)),...arms2(i=>aBand(i,-.05,.05,SILVER))]} ]; // ---------------- building an outfit ---------------- -const PRIM={box:new THREE.BoxGeometry(1,1,1).toNonIndexed(),c:new THREE.CylinderGeometry(.5,.5,1,10).toNonIndexed(),o:new THREE.IcosahedronGeometry(.5,1).toNonIndexed()}; +const PRIM={box:new THREE.BoxGeometry(1,1,1).toNonIndexed(),c:new THREE.CylinderGeometry(.5,.5,1,17).toNonIndexed(),o:new THREE.IcosahedronGeometry(.5,1).toNonIndexed()}; const _m=new THREE.Matrix4(),_q=new THREE.Quaternion(),_e=new THREE.Euler(),_p=new V3(),_s=new V3(),_v=new V3(),_n=new V3(),_nm=new THREE.Matrix3(),_c=new THREE.Color(),_c2=new THREE.Color(); const mix=(a,b,t)=>_c.setHex(a).lerp(_c2.setHex(b),t).getHex(); // the colours for a suit key (r, b, me...) and an outfit: [main, dark shade, light shade, trim, visor] function palette(o,key){const S=X.SUITS[key]||X.SUITS.me;const m=key==='r'||key==='b'?S[0]:o.home[0],t=key==='r'||key==='b'?S[1]:o.home[1],v=key==='r'||key==='b'?S[2]:0x7fd3ff; - return {T:m,K:mix(m,0x000000,.28),L:mix(m,0xffffff,.45),D:t,V:v,W:0xf2f0ea}} + return {T:m,K:mix(m,0x000000,.14),L:mix(m,0xffffff,.68),D:t,V:v,W:0xf2f0ea}} function resolve(c,P){if(typeof c==='string')return c==='V'?{glow:P.V}:{lit:P[c]};if(c>0xffffff)return {glow:c-0x1000000};return {lit:c}} function bakeParts(list,P){const lit={p:[],n:[],c:[]},glow={p:[],n:[],c:[]}; for(const q of list){if(!q)continue;const [w,h,d,x,y,z,col,rx,ry,rz,shape]=q;const r=resolve(col,P),B=r.glow!=null?glow:lit,hex=r.glow!=null?r.glow:r.lit; @@ -354,7 +354,7 @@ const bodyMat=new THREE.MeshLambertMaterial({vertexColors:true}),glowMat=new THR function baseParts(o){const b=o.base||{},bc=k=>b[k]!=null?b[k]:{leg:D,boot:SHOE,torso:T,hood:T,sleeve:T,glove:D}[k]; const leg=[[.28,.86,.3,0,-.43,0,bc('leg')],b.boot===null?null:[.31,.16,.38,0,-.78,-.03,bc('boot')]]; const torso=[[.74,.72,.44,0,1.22,0,bc('torso')]];if(!o.packless&&!(o.torso||[]).some(p=>p&&p[3]===PACK[3]&&p[4]===PACK[4]&&p[5]===PACK[5]&&p[0]===PACK[0]))torso.push([...PACK,bc('torso')]); - const head=[[.54,.54,.54,0,0,0,bc('hood')]];if(o.visor!==false)head.push([.42,.22,.04,0,.03,-.275,V]); + const head=[[.54,.54,.54,0,0,0,bc('hood')]];if(o.visor!==false)head.push([.42,.22,.04,0,.03,-.275,V]);if(o.visor!==false||o.filter)head.push([.17,.14,.12,0,-.17,-.3,o.filter||D]); const ng=o.noGlove||[0,0];const arms=[0,1].flatMap(i=>[onArm(i,0,0,0,.17,.17,.62,bc('sleeve')),ng[i]?null:onArm(i,0,0,-.245,.18,.18,.14,bc('glove'))]); return {leg,torso,head,arms}} const bakeCache=new Map(); @@ -459,8 +459,8 @@ const BUILD_DRAW=[null, (g,w,h)=>{g.fillStyle='#a4abb2';g.fillRect(0,0,w,h);const pl=[[6,6,70,56,'#b4bbc2'],[70,10,52,60,'#98a0a8'],[10,62,56,58,'#9ea6ae'],[60,66,62,54,'#b0b7be']]; for(const [x,y,ww,hh,c] of pl){g.fillStyle=c;g.fillRect(x,y,ww,hh);g.strokeStyle='rgba(60,64,70,.5)';g.lineWidth=2;g.strokeRect(x,y,ww,hh);g.fillStyle='#6a7078';for(const [a,b] of [[x+5,y+5],[x+ww-5,y+5],[x+5,y+hh-5],[x+ww-5,y+hh-5]]){g.beginPath();g.arc(a,b,2.2,0,7);g.fill()}} g.fillStyle='rgba(176,96,52,.45)';for(let i=0;i<5;i++){g.beginPath();g.arc(Math.random()*w,Math.random()*h,4+Math.random()*7,0,7);g.fill()}X.noise(g,w,h,12);return ['#5a6068','rgba(90,96,104,.7)']}, - (g,w,h)=>{g.fillStyle='#d6b98a';g.fillRect(0,0,w,h);g.strokeStyle='rgba(150,118,72,.35)';g.lineWidth=1;for(let x=2;x{g.fillStyle='#dfe9ef';g.fillRect(0,0,w,h);for(let y=0;y<9;y++)for(let x=0;x<9;x++){const cx=x*14+(y%2?7:0)+2,cy=y*14+8;g.fillStyle='#f6fbfe';g.beginPath();g.arc(cx,cy,5.6,0,7);g.fill(); + g.strokeStyle='rgba(150,180,200,.7)';g.lineWidth=1;g.stroke();g.fillStyle='#ffffff';g.beginPath();g.arc(cx-1.8,cy-1.8,1.6,0,7);g.fill()}X.noise(g,w,h,5);return ['#7f9cb0','rgba(127,156,176,.7)']}, (g,w,h)=>{g.fillStyle='#eeece8';g.fillRect(0,0,w,h);g.strokeStyle='rgba(150,150,160,.55)';g.lineWidth=1.4;for(let k=0;k<6;k++){let x=Math.random()*w,y=0;g.beginPath();g.moveTo(x,y);while(y.2126*c[0]+.7152*c[1]+.0722*c[2],dist=(a,b)=>Math.hypot(a[0]-b[0],a[1]-b[1],a[2]-b[2]); function views(){const swap=[];m.traverse(o=>{if(o.isMesh&&o.visible&&o!==p.floor){swap.push([o,o.material]);o.material=new THREE.MeshBasicMaterial({color:o.material.color,vertexColors:!!o.material.vertexColors})}}); @@ -805,9 +805,10 @@ if(navigator.webdriver)window.__lk={parse,wireOf,wear,heard,get mine(){return Ob res.push({area:n,lum:L/n,dist:Dm/n,camo:camo/n,w:(x1-x0+1)/S*Hm,top:(y1+1)/(S*2)*Hm,px})} R.setRenderTarget(null);for(const [o,mt] of swap){o.material.dispose();o.material=mt}return res} const rows=[]; - for(const key of keys){const P=X.SUITS[key],team=[P[0],mix(P[0],0,.28),mix(P[0],0xffffff,.45),P[1]].map(rgb); - const base=(()=>{pvDress(parse(''),key);m.rotation.set(0,0,0);return views()})(); - for(let i=0;i<=N.o;i++){const k=parse('');k.o=i;pvDress(k,key);m.rotation.set(0,0,0);const v=i?views():base; + for(const key of keys){const PP=palette(OUTFITS[1],key),team=[PP.T,PP.K,PP.L,PP.D].map(rgb); + const noTk=()=>{if(m.userData.tk)m.userData.tk.visible=false}; + const base=(()=>{pvDress(parse(''),key);noTk();m.rotation.set(0,0,0);return views()})(); + for(let i=0;i<=N.o;i++){const k=parse('');k.o=i;pvDress(k,key);noTk();m.rotation.set(0,0,0);const v=i?views():base; const share=V=>V.px.filter(c=>team.some(t=>dist(c,t)<.1)).length/V.px.length; const sum=V=>({area:V.reduce((t,a)=>t+a.area,0)/V.reduce((t,a)=>t,0)}); const row={key,i,name:i?LISTS.o[i-1]:'Plain',front:v[0].area/base[0].area,back:v[1].area/base[1].area,side:(v[2].area+v[3].area)/(base[2].area+base[3].area), @@ -815,7 +816,9 @@ if(navigator.webdriver)window.__lk={parse,wireOf,wear,heard,get mine(){return Ob lum:v.reduce((t,a)=>t+a.lum*a.area,0)/v.reduce((t,a)=>t+a.area,0),blum:base.reduce((t,a)=>t+a.lum*a.area,0)/base.reduce((t,a)=>t+a.area,0), dist:v.reduce((t,a)=>t+a.dist*a.area,0)/v.reduce((t,a)=>t+a.area,0),bdist:base.reduce((t,a)=>t+a.dist*a.area,0)/base.reduce((t,a)=>t+a.area,0), camo:Math.max(...v.map(a=>a.camo)),bcamo:Math.max(...base.map(a=>a.camo)),team:v.reduce((t,a)=>t+share(a)*a.area,0)/v.reduce((t,a)=>t+a.area,0),bteam:base.reduce((t,a)=>t+share(a)*a.area,0)/base.reduce((t,a)=>t+a.area,0)}; - for(const a of v)delete a.px;rows.push(row)}} + if(opt&&opt.detail===i){const h=new Map();for(const a of v)for(const c of a.px){const q=c.map(x=>Math.round(x*20)/20).join(',');h.set(q,(h.get(q)||0)+1)} + const tot=v.reduce((t,a)=>t+a.px.length,0);row.detail=[...h].sort((a,b)=>b[1]-a[1]).slice(0,12).map(([q,n])=>{const c=q.split(',').map(Number);return q+' '+(n/tot*100).toFixed(1)+'% d'+Math.min(dist(c,WALL),dist(c,CARPET),dist(c,CARPET_LIT)).toFixed(2)})} + if(i)for(const a of v)delete a.px;if(!opt||opt.detail==null||opt.detail===i)rows.push(row)}} rt.dispose();pvDress(myKit,'me');return rows}, // build skins: mean colour of each picture against plywood (distance from the walls, carpet and both team colours) buildFair(){const out=[],read=t=>{const c=t.image,g=c.getContext('2d'),d=g.getImageData(0,0,c.width,c.height).data;let r=0,gg=0,b=0,n=d.length/4;for(let i=0;i Date: Thu, 19 Nov 2026 07:43:45 +0000 Subject: [PATCH 50/63] Driftfall Locker: pickaxes (new slot o, 12), 12 gliders, 8 trails, 13 gun skins (5 moving), 8 backpacks, 12 emotes Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn --- e63334287a3deaa3/cosmetics.js | 67 ++++++- e63334287a3deaa3/drop-zone/es.js | 66 +++++++ e63334287a3deaa3/drop-zone/index.html | 4 +- e63334287a3deaa3/drop-zone/locker-extra.js | 210 ++++++++++++++++++--- 4 files changed, 319 insertions(+), 28 deletions(-) diff --git a/e63334287a3deaa3/cosmetics.js b/e63334287a3deaa3/cosmetics.js index ff91541a..74e57863 100644 --- a/e63334287a3deaa3/cosmetics.js +++ b/e63334287a3deaa3/cosmetics.js @@ -253,7 +253,7 @@ rampline: { name: 'Rampline', prefix: 'rl', slots: [['car', 'Cars'], ['paint', 'Paints'], ['wheels', 'Wheels'], ['smoke', 'Tyre smoke'], ['horn', 'Horns']] }, chromaflage: { name: 'Chromaflage', prefix: 'cf', slots: [['hat', 'Seeker hats'], ['tool', 'Seeker tools'], ['splash', 'Catch splashes'], ['caught', 'Caught animations']] }, 'odd-one-out': { name: 'Odd One Out', prefix: 'oo', slots: [['outfit', 'Hunter outfits'], ['tool', 'Hunter tools'], ['taunt', 'Prop taunts'], ['poof', 'Catch poofs']] }, - 'drop-zone': { name: 'Driftfall', prefix: 'dz', slots: [['outfit', 'Outfits'], ['pack', 'Backpacks'], ['glider', 'Gliders'], ['trail', 'Glider trails'], ['wrap', 'Gun skins'], ['build', 'Build skins'], ['emote', 'Emotes'], ['victory', 'Victory poses']] }, + 'drop-zone': { name: 'Driftfall', prefix: 'dz', slots: [['outfit', 'Outfits'], ['pack', 'Backpacks'], ['glider', 'Gliders'], ['trail', 'Glider trails'], ['wrap', 'Gun skins'], ['build', 'Build skins'], ['emote', 'Emotes'], ['victory', 'Victory poses'], ['pick', 'Pickaxes']] }, }; var GAME_ITEMS = [], ITEM_BY_ID = {}; function I(game, slot, no, name, rarity, c1, c2, desc) { @@ -1104,6 +1104,71 @@ I('drop-zone', 'outfit', 109, 'Dino Onesie', 'common', '#FF8A1F', '#5CE1FF', 'An orange dino hood, spikes and a tail.'); I('drop-zone', 'outfit', 110, 'Burger Mascot', 'common', '#FFD23F', '#F2C27A', 'A bun head with seeds, cheese, tomato and a lettuce frill.'); I('drop-zone', 'outfit', 111, 'Hot Dog Mascot', 'common', '#FFE4B0', '#FF6A55', 'A bun hood, a sausage and a mustard zigzag.'); + I('drop-zone', 'glider', 31, 'Rainbow Umbrella', 'uncommon', '#FF4F5E', '#3FA9F5', 'Eight rainbow panels that pop open over your head.'); + I('drop-zone', 'glider', 32, 'Polka Dot Umbrella', 'common', '#FFD23F', '#FFFFFF', 'A sunny yellow umbrella with white dots.'); + I('drop-zone', 'glider', 33, 'Paper Parasol', 'uncommon', '#FFE0EA', '#E8453C', 'A flat paper parasol with sixteen ribs and a red rim.'); + I('drop-zone', 'glider', 34, 'Bubble Umbrella', 'rare', '#D6F2FF', '#FF6FB5', 'A deep, clear bubble dome with a pink rim.'); + I('drop-zone', 'glider', 35, 'Team Flag', 'common', '#5CE1FF', '#FF6A55', 'A big cyan and pink flag between two poles, a white sash and a gold star.'); + I('drop-zone', 'glider', 36, 'Hot-Air Balloon', 'epic', '#E8453C', '#FFD23F', 'A striped balloon on ropes with a glowing burner.'); + I('drop-zone', 'glider', 37, 'Robot Wings', 'rare', '#DFE4EA', '#5CE1FF', 'Metal feathers with glowing blue edges along your arms.'); + I('drop-zone', 'glider', 38, 'Star Kite', 'uncommon', '#FFD23F', '#FF6A55', 'A gold star kite with a tail of bows.'); + I('drop-zone', 'glider', 39, 'Dragon Kite', 'legendary', '#E8453C', '#FFD23F', 'A dragon head on a long rippling body of gold and red.'); + I('drop-zone', 'glider', 40, 'Hoverboard', 'epic', '#FF6FB5', '#5CE1FF', 'A pink board with glowing jets underneath.'); + I('drop-zone', 'glider', 41, 'Toy Rocket', 'rare', '#F6F4EE', '#E8453C', 'A red and white rocket you ride, a flame flickering out of it.'); + I('drop-zone', 'glider', 42, 'Paper Boat', 'common', '#F6F4EE', '#FF6A55', 'A folded boat of blue paper with a little flag, rocking as it flies.'); + I('drop-zone', 'trail', 7, 'Confetti', 'common', '#FF4F4F', '#3FA9F5', 'Bright confetti tumbling behind you.'); + I('drop-zone', 'trail', 8, 'Hearts', 'uncommon', '#FF4F7A', '#FFC2D6', 'Pink and red hearts floating up.'); + I('drop-zone', 'trail', 9, 'Music Notes', 'uncommon', '#FFE14F', '#5CE1FF', 'Little notes bobbing along behind you.'); + I('drop-zone', 'trail', 10, 'Fire Sparks', 'rare', '#FF9A3C', '#FFE14F', 'Quick orange sparks.'); + I('drop-zone', 'trail', 11, 'Snowflakes', 'common', '#FFFFFF', '#DFF4FF', 'Snowflakes drifting down behind you.'); + I('drop-zone', 'trail', 12, 'Gold Glitter', 'epic', '#FFD23F', '#FFFFFF', 'Twinkling gold glitter.'); + I('drop-zone', 'trail', 13, 'Team Colours', 'common', '#FFD23F', '#5CE1FF', 'A band of gold, white and cyan.'); + I('drop-zone', 'trail', 14, 'Comet Tail', 'legendary', '#9FE8FF', '#C8B4FF', 'A long glowing tail like a comet.'); + I('drop-zone', 'wrap', 25, 'Tiger Stripes', 'common', '#FF8C1A', '#121212', 'Orange with black stripes.'); + I('drop-zone', 'wrap', 26, 'Polka Dots', 'common', '#FF73B3', '#FFFFFF', 'Pink with white dots.'); + I('drop-zone', 'wrap', 27, 'Race Check', 'uncommon', '#F2F2F2', '#121212', 'A black and white chequered flag.'); + I('drop-zone', 'wrap', 28, 'Watermelon', 'uncommon', '#F2525C', '#59BF4D', 'Red with seeds and a green grip.'); + I('drop-zone', 'wrap', 29, 'Denim', 'common', '#4773BF', '#FFA840', 'Blue jeans with orange stitching.'); + I('drop-zone', 'wrap', 30, 'Comic Pop', 'rare', '#FFD91A', '#FF4D4D', 'Comic-book dots with a bold outline.'); + I('drop-zone', 'wrap', 31, 'Sunset', 'rare', '#FFD140', '#8C4DE6', 'Gold to pink to purple along the barrel.'); + I('drop-zone', 'wrap', 32, 'Ocean Waves', 'epic', '#1A73E6', '#33C7F2', 'Waves of blue and white foam flowing down the barrel.'); + I('drop-zone', 'wrap', 33, 'Rainbow Flow', 'legendary', '#FF4F4F', '#6A7CFF', 'Every colour, flowing and glowing.'); + I('drop-zone', 'wrap', 34, 'Heartbeat', 'epic', '#D91F33', '#FF3355', 'Deep red that pulses with a heartbeat glow.'); + I('drop-zone', 'wrap', 35, 'Electric', 'epic', '#141F4D', '#99F2FF', 'Dark blue with cyan lightning crackling over it.'); + I('drop-zone', 'wrap', 36, 'Molten Gold', 'legendary', '#E69919', '#FFE673', 'Gold with bright veins flowing through it.'); + I('drop-zone', 'wrap', 37, 'Gold Chevrons', 'uncommon', '#F7F5EB', '#FFC726', 'White with gold V stripes.'); + I('drop-zone', 'pack', 15, 'Giant Soccer Ball', 'common', '#F6F4EE', '#2A2D34', 'A huge ball on a strap in your colour.'); + I('drop-zone', 'pack', 16, 'Pirate Barrel', 'uncommon', '#D99A52', '#8D96A0', 'A barrel with iron hoops and your mark.'); + I('drop-zone', 'pack', 17, 'Boombox', 'uncommon', '#DFE4EA', '#FF6FB5', 'Two big speakers and a light in your colour.'); + I('drop-zone', 'pack', 18, 'Robot Buddy', 'rare', '#FFD23F', '#5CE1FF', 'A little robot riding piggyback.'); + I('drop-zone', 'pack', 19, 'Ice Cream Cone', 'common', '#F2C27A', '#FF9FC7', 'Two scoops and a cherry on top.'); + I('drop-zone', 'pack', 20, 'Trophy Cup', 'epic', '#FFC93C', '#5CE1FF', 'A big gold cup on your back.'); + I('drop-zone', 'pack', 21, 'Rocket Pack', 'rare', '#F6F4EE', '#E8453C', 'A little rocket with fins and a window.'); + I('drop-zone', 'pack', 22, 'Penguin Plush', 'common', '#5A8AD0', '#F6F4EE', 'A penguin with a scarf in your colour.'); + I('drop-zone', 'emote', 11, 'Slam Dunk', 'rare', '#F08A2A', '#FFFFFF', 'Crouch, leap, slam it down.'); + I('drop-zone', 'emote', 12, 'Touchdown Spike', 'uncommon', '#A8562C', '#FFFFFF', 'Ball up high, spike it, shimmy.'); + I('drop-zone', 'emote', 13, 'Home Run', 'uncommon', '#F0D8A8', '#E8453C', 'A big swing, then watch it fly.'); + I('drop-zone', 'emote', 14, 'Chicken Dance', 'common', '#FFD23F', '#FF8A1F', 'Flap those elbows.'); + I('drop-zone', 'emote', 15, 'Arm Wave', 'common', '#5CE1FF', '#FFFFFF', 'A wave from one hand to the other.'); + I('drop-zone', 'emote', 16, 'Salute', 'common', '#F2EFE8', '#3A7AD0', 'A crisp salute.'); + I('drop-zone', 'emote', 17, 'Star Jump', 'uncommon', '#FFD23F', '#FF6FB5', 'Jump out wide like a star.'); + I('drop-zone', 'emote', 18, 'Pirate Jig', 'rare', '#FF6A55', '#FFC93C', 'Fists on hips, knees up.'); + I('drop-zone', 'emote', 19, 'Big Shrug', 'common', '#C8B4FF', '#FFFFFF', 'Who, me?'); + I('drop-zone', 'emote', 20, 'Mic Drop', 'epic', '#2A2D34', '#FFC93C', 'Hold it out, let it go, walk away.'); + I('drop-zone', 'emote', 21, 'Thinking', 'common', '#8FD0FF', '#FFFFFF', 'Hand on chin, foot tapping.'); + I('drop-zone', 'emote', 22, 'Air Guitar', 'rare', '#E8453C', '#FFD23F', 'Strum it, then lean back for the big note.'); + I('drop-zone', 'pick', 1, 'Hockey Stick', 'common', '#3FA9F5', '#FFFFFF', 'A taped hockey stick.'); + I('drop-zone', 'pick', 2, 'Golf Club', 'common', '#DFE4EA', '#FFC93C', 'A silver club with a gold head.'); + I('drop-zone', 'pick', 3, 'Baseball Bat', 'common', '#F0D8A8', '#E8453C', 'A big wooden bat with a red grip.'); + I('drop-zone', 'pick', 4, 'Foam Cutlass', 'uncommon', '#DFE9F2', '#FFC93C', 'A soft foam pirate sword with a gold guard.'); + I('drop-zone', 'pick', 5, 'Robot Claw', 'rare', '#B9C2CC', '#5CE1FF', 'A grabber arm with gold fingers.'); + I('drop-zone', 'pick', 6, 'Giant Foam Finger', 'uncommon', '#FFD23F', '#E8453C', 'We are number one.'); + I('drop-zone', 'pick', 7, 'Trophy', 'epic', '#FFC93C', '#FFE98F', 'Swing the cup you just won.'); + I('drop-zone', 'pick', 8, 'Guitar', 'rare', '#E8453C', '#FFFFFF', 'A red guitar, held by the neck.'); + I('drop-zone', 'pick', 9, 'Anchor', 'uncommon', '#5CE1FF', '#FFC93C', 'A toy anchor with a gold ring.'); + I('drop-zone', 'pick', 10, 'Giant Wrench', 'common', '#DFE4EA', '#E8453C', 'A huge silver wrench.'); + I('drop-zone', 'pick', 11, 'Closed Umbrella', 'common', '#E8453C', '#FFFFFF', 'A red and white umbrella, folded.'); + I('drop-zone', 'pick', 12, 'Giant Lollipop', 'legendary', '#FF6FB5', '#FFD23F', 'A swirly lollipop as big as your head.'); // Items a game hands over itself are in no pack: give is 'free' (anyone may wear it; the game grants it the first time it // is worn) or 'earned' (the game grants it when it is won). grant(id), below, only adds these. GAME_ITEMS.forEach(function (it) { if (it.game !== 'slipstream') return; if (it.slot === 'sponsor' || (it.slot === 'helmet' && it.no <= 8)) it.give = 'free'; else if (it.slot === 'livery' && it.no > 8) it.give = 'earned'; }); diff --git a/e63334287a3deaa3/drop-zone/es.js b/e63334287a3deaa3/drop-zone/es.js index 42542787..b48aae9e 100644 --- a/e63334287a3deaa3/drop-zone/es.js +++ b/e63334287a3deaa3/drop-zone/es.js @@ -243,6 +243,72 @@ 'Team Stripes': 'Rayas de equipo', 'Pinstripe': 'Raya diplomática', 'Treasure Map': 'Mapa del tesoro', 'Circuit Board': 'Placa de circuitos', 'Basketball': 'Pelota de básquet', 'Goal Celebration': 'Festejo de gol', 'Tip the Hat': 'Saludo con el sombrero', 'Pirate Arr': '¡Arrr pirata!', 'Power Down': 'Apagón', + 'Pickaxes': 'Picos', 'PICK': 'PI', 'AXES': 'COS', 'Swing something sillier than the crowbar. Same reach, same swing, same damage, and it gathers scrap just the same.': 'Golpea con algo más divertido que la palanca. El mismo alcance, el mismo golpe, el mismo daño, y junta chatarra igual.', + 'Rainbow Umbrella': 'Paraguas arcoíris', + 'Polka Dot Umbrella': 'Paraguas de lunares', + 'Paper Parasol': 'Sombrilla de papel', + 'Bubble Umbrella': 'Paraguas burbuja', + 'Team Flag': 'Bandera del equipo', + 'Hot-Air Balloon': 'Globo aerostático', + 'Robot Wings': 'Alas de robot', + 'Star Kite': 'Barrilete estrella', + 'Dragon Kite': 'Barrilete dragón', + 'Hoverboard': 'Patineta voladora', + 'Toy Rocket': 'Cohete de juguete', + 'Paper Boat': 'Barquito de papel', + 'Confetti': 'Confeti', + 'Hearts': 'Corazones', + 'Music Notes': 'Notas musicales', + 'Fire Sparks': 'Chispas de fuego', + 'Snowflakes': 'Copos de nieve', + 'Gold Glitter': 'Brillantina dorada', + 'Team Colours': 'Colores del equipo', + 'Comet Tail': 'Cola de cometa', + 'Tiger Stripes': 'Rayas de tigre', + 'Polka Dots': 'Lunares', + 'Race Check': 'Cuadros de carrera', + 'Watermelon': 'Sandía', + 'Denim': 'Jean', + 'Comic Pop': 'Cómic pop', + 'Sunset': 'Atardecer', + 'Ocean Waves': 'Olas del mar', + 'Rainbow Flow': 'Arcoíris en movimiento', + 'Heartbeat': 'Latido', + 'Electric': 'Eléctrico', + 'Molten Gold': 'Oro fundido', + 'Gold Chevrons': 'Galones dorados', + 'Giant Soccer Ball': 'Pelota de fútbol gigante', + 'Pirate Barrel': 'Barril pirata', + 'Boombox': 'Radiocasete', + 'Robot Buddy': 'Robot compañero', + 'Ice Cream Cone': 'Cucurucho de helado', + 'Trophy Cup': 'Copa trofeo', + 'Rocket Pack': 'Mochila cohete', + 'Penguin Plush': 'Pingüino de peluche', + 'Slam Dunk': 'Volcada', + 'Touchdown Spike': 'Festejo de touchdown', + 'Home Run': 'Jonrón', + 'Chicken Dance': 'Baile del pollo', + 'Arm Wave': 'Ola con los brazos', + 'Salute': 'Saludo militar', + 'Star Jump': 'Salto de estrella', + 'Pirate Jig': 'Baile pirata', + 'Big Shrug': 'Encogerse de hombros', + 'Mic Drop': 'Soltar el micrófono', + 'Thinking': 'Pensando', + 'Air Guitar': 'Guitarra imaginaria', + 'Hockey Stick': 'Palo de hockey', + 'Golf Club': 'Palo de golf', + 'Baseball Bat': 'Bate de béisbol', + 'Foam Cutlass': 'Sable de espuma', + 'Robot Claw': 'Garra de robot', + 'Giant Foam Finger': 'Dedo de espuma gigante', + 'Trophy': 'Trofeo', + 'Guitar': 'Guitarra', + 'Anchor': 'Ancla', + 'Giant Wrench': 'Llave inglesa gigante', + 'Closed Umbrella': 'Paraguas cerrado', + 'Giant Lollipop': 'Chupetín gigante', 'Race Car Driver': 'Piloto de autos', 'Beach Volleyball': 'Vóley playero', 'Rugby Player': 'Jugador de rugby', diff --git a/e63334287a3deaa3/drop-zone/index.html b/e63334287a3deaa3/drop-zone/index.html index 43028139..77d6e5b7 100644 --- a/e63334287a3deaa3/drop-zone/index.html +++ b/e63334287a3deaa3/drop-zone/index.html @@ -3974,7 +3974,7 @@

=0&&nr>>0)||1;return()=>{s^=s<<13;s>>>=0;s^=s>>>17;s^=s const GLIDER_NAMES=['Umbrella','Paper Airplane','Hang Glider','Kite','Bedsheet Parachute','Trash Bag Parachute','Cardboard Wings','Dragon Wings', 'Bat Wings','Bunch of Balloons','Lawn Chair with Balloons','Magic Carpet','Picnic Blanket','Surfboard','Pizza Slice','Broomstick','Giant Leaf', 'Spinning Maple Seed','Rubber Duck Float','Giant Pigeon','Pterodactyl','Flying Squirrel Suit','UFO Disc','Small Cloud', - 'Pirate Sail','Giant Football','Soccer Goal','Hockey Stick','Robot Rotor','Briefcase Parachute']; -const TRAIL_NAMES=['Smoke','Sparkles','Rainbow','Feathers','Leaves','Bubbles']; + 'Pirate Sail','Giant Football','Soccer Goal','Hockey Stick','Robot Rotor','Briefcase Parachute', + 'Rainbow Umbrella','Polka Dot Umbrella','Paper Parasol','Bubble Umbrella','Team Flag','Hot-Air Balloon','Robot Wings','Star Kite','Dragon Kite', + 'Hoverboard','Toy Rocket','Paper Boat']; +const TRAIL_NAMES=['Smoke','Sparkles','Rainbow','Feathers','Leaves','Bubbles','Confetti','Hearts','Music Notes','Fire Sparks','Snowflakes','Gold Glitter','Team Colours','Comet Tail']; const WRAP_NAMES=['Gold','Chrome','Wood Grain','Forest Camo','Desert Camo','Arctic Camo','Pixel Camo','Neon Outline','Toy Blaster','Cardboard', 'Candy Cane','Lava','Ice','Galaxy','Rust','Graffiti','Bubblegum Pink','Hazard Stripes','Plastic Brick', - 'Team Stripes','Pinstripe','Treasure Map','Circuit Board','Basketball']; + 'Team Stripes','Pinstripe','Treasure Map','Circuit Board','Basketball', + 'Tiger Stripes','Polka Dots','Race Check','Watermelon','Denim','Comic Pop','Sunset','Ocean Waves','Rainbow Flow','Heartbeat','Electric','Molten Gold','Gold Chevrons']; const BUILD_NAMES=['Cardboard','Frosted Glass','Ice','Candy','Stone','Scrap Metal']; const PACK_NAMES=['Rucksack','Jetpack','Teddy Bear','Tortoise Shell','Treasure Chest','Lunchbox','Guitar Case','Fishbowl', - 'Sports Bag','Briefcase','Robot Power Pack','Bag of Balls','Spyglass and Map','Lucky Mascot']; -const EMOTE_NAMES=['Wave','Dance','Clap','Jumping Jacks','Robot','Twirl','Goal Celebration','Tip the Hat','Pirate Arr','Power Down'],VICTORY_NAMES=['Champion','Flex','Take a Bow','Jump for Joy']; -const SLOT={g:GLIDER_NAMES,t:TRAIL_NAMES,w:WRAP_NAMES,b:BUILD_NAMES,p:PACK_NAMES,e:EMOTE_NAMES,v:VICTORY_NAMES}; + 'Sports Bag','Briefcase','Robot Power Pack','Bag of Balls','Spyglass and Map','Lucky Mascot', + 'Giant Soccer Ball','Pirate Barrel','Boombox','Robot Buddy','Ice Cream Cone','Trophy Cup','Rocket Pack','Penguin Plush']; +const EMOTE_NAMES=['Wave','Dance','Clap','Jumping Jacks','Robot','Twirl','Goal Celebration','Tip the Hat','Pirate Arr','Power Down', + 'Slam Dunk','Touchdown Spike','Home Run','Chicken Dance','Arm Wave','Salute','Star Jump','Pirate Jig','Big Shrug','Mic Drop','Thinking','Air Guitar'],VICTORY_NAMES=['Champion','Flex','Take a Bow','Jump for Joy']; +// pickaxes (wave four, `o` in the worn string): what you swing in place of the crowbar. An older page leaves `o` alone. +const PICK_NAMES=['Hockey Stick','Golf Club','Baseball Bat','Foam Cutlass','Robot Claw','Giant Foam Finger','Trophy','Guitar','Anchor','Giant Wrench','Closed Umbrella','Giant Lollipop']; +const SLOT={g:GLIDER_NAMES,t:TRAIL_NAMES,w:WRAP_NAMES,b:BUILD_NAMES,p:PACK_NAMES,e:EMOTE_NAMES,v:VICTORY_NAMES,o:PICK_NAMES}; // a worn string ('g12t3') as {g:12,t:3}; numbers this file does not know are left out function parse(s){const o={};if(typeof s!=='string')return o;for(const m of s.matchAll(/([a-z])([0-9]+)/g)){const L=SLOT[m[1]],n=+m[2];if(L&&n>=1&&n<=L.length)o[m[1]]=n}return o} -function str(o){let s='';for(const k of 'gtwbpve')if(o[k])s+=k+o[k];return s} +function str(o){let s='';for(const k of 'gtwbpveo')if(o[k])s+=k+o[k];return s} // ===================================================================== // Gliders @@ -330,7 +337,57 @@ const GLIDERS=[null, AN=(x,y,z)=>[4,.04*clamp((y-1.5)/.7,0,1),0]; sheet(B,24,6,polar(v=>.15+1.45*v,v=>top-.6*v*v),(u)=>Math.floor(u*12)%2?0x3a7ad0:0xe8ecf2,(u)=>Math.floor(u*12)%2?0x2f62a8:0xc9d1da,outward(0,1.0,0));AN=null; for(let k=0;k<8;k++){const a=(k+.5)/8*TAU;rope(B,Math.cos(a)*1.6,top-.6,Math.sin(a)*1.6,Math.cos(a)*.3,cy+.06,Math.sin(a)*.2,0xdfe4ea)}} + , + // wave four (19 November 2026) + // 31-34 umbrellas, held like the first one: rainbow panels, yellow with white dots, a flat paper parasol with many + // ribs, a clear bubble dome + B=>umbrella(B,{cols:u=>[0xff4f5e,0xff9a3c,0xffe14f,0x5fd068,0x3fa9f5,0x6a7cff,0xb46cff,0xff6fb5][Math.floor(u*8)%8],rib:WH}), + B=>umbrella(B,{cols:(u,v,i,j)=>(i*5+j*3)%7===0&&j>0?WH:0xffd23f,rib:0x3a7ad0,n:8}), + B=>umbrella(B,{cols:(u,v,i,j)=>j===6?0xe8453c:Math.floor(u*16)%2?0xff9fc7:0xfff4e0,rib:0xc8955a,n:16,depth:.32,r:1.7}), + B=>umbrella(B,{cols:(u,v,i,j)=>j===6?0xff6fb5:0xd6f2ff,rib:0xb8c0c8,depth:1.0,r:1.35}), + // 35 Team Flag: a big flag between two poles over your head, cyan and pink with a white sash and a gold star, rippling + B=>{const yl=.75,yt=2.2,X0=1.25;grips(B,WH);for(const s of [-1,1])bar(B,s*.48,.09,0,s*X0,yt+.15,0,.035,WH,PR.cyl8);for(const s of [-1,1])put(B,PR.sph,s*X0,yt+.2,0,.14,.14,.14,0xffd23f); + AN=(x,y,z)=>[4,.06*Math.sin(Math.PI*clamp((x+X0)/(2*X0),0,1)),0]; + const fc=(u,v)=>{const cx=Math.abs(u-.5)*2,cy=Math.abs(v-.5)*2;return cx<.18&&cy<.3?0xffd23f:Math.abs(u-v)<.17?WH:u{const x=(u-.5)*2*X0*(.86+.14*v);return [x,yl+(yt-yl)*v,.18*Math.sin(Math.PI*u)]},fc,(u,v)=>dim(fc(1-u,v),.85),()=>v3(0,0,-1));AN=null}, + // 36 Hot-Air Balloon: a striped envelope overhead on ropes to your hands, a little burner glowing under it + B=>{const cy=1.85,R=1.05;for(const s of [-1,1])put(B,PR.slo,s*.27,.15,-.04,.08,.08,.08,0xeeeeee); + AN=()=>[3,.03,0];sheet(B,24,10,(u,v)=>{const t=.06+v*.86*Math.PI,r=R*Math.sin(t)*(t>2.2?1-(t-2.2)*.55:1);return [Math.cos(u*TAU)*r,cy+R*Math.cos(t)*1.1,Math.sin(u*TAU)*r]},(u,v,i,j)=>j<2?0xffd23f:Math.floor(u*12)%2?0xe8453c:0xfff4e0,()=>0xc8c0b0,outward(0,cy,0)); + const yb=cy+R*Math.cos(.92*Math.PI)*1.1;for(let k=0;k<6;k++){const a=(k+.5)/6*TAU;rope(B,Math.cos(a)*.42,yb,Math.sin(a)*.42,a3*Math.PI/2?.27:-.27,.17,-.04,0xf4f0e6)} + put(B,PR.cyl8,0,yb-.12,0,.2,.1,.2,0x8d96a0);put(B,PR.cone,0,yb-.02,0,.12,.16,.12,0xffb03a);AN=null}, + // 37 Robot Wings: metal feather panels along your arms with glowing blue edges, flapping a little + B=>{for(const s of [-1,1]){anim(7,.36,.08);for(let k=0;k<6;k++){const x=s*(.5+k*.27),len=1.2-k*.12;put(B,PR.box,x,SH-len/2+.12,.08,.32,len,.04,k%2?0xeef2f6:0xc9d1da,0,0,s*.08);put(B,PR.box,x+s*.15,SH-len/2+.12,.08,.04,len,.05,0x5ce1ff,0,0,s*.08)} + put(B,PR.box,s*1.18,SH+.14,.08,1.5,.1,.08,0x8d96a0);put(B,PR.box,s*.62,SH,.06,.2,.12,.14,0x5a606b);anim(0)}}, + // 38 Star Kite: a five-pointed star kite in gold and white on two lines, a tail of bows streaming behind + B=>{const c=v3(0,1.55,.35),pts=[];for(let k=0;k<10;k++){const a=k/10*TAU,r=k%2?.55:1.35;pts.push(v3(Math.sin(a)*r,c.y+Math.cos(a)*r*.85,c.z+Math.cos(a)*r*.35))} + for(let k=0;k<10;k++)tri2(B,c,pts[k],pts[(k+1)%10],k%2?0xffd23f:0xffe98f);put(B,PR.sph,c.x,c.y,c.z-.04,.3,.3,.08,0xff6a55); + for(const s of [-1,1]){rope(B,s*.38,.12,-.06,c.x+s*.3,c.y-.2,c.z-.1,0xf4f0e6);put(B,PR.cyl8,s*.38,.12,-.06,.06,.12,.06,0x9a6a3c,0,0,Math.PI/2)} + const tl=pts[5];AN=(x,y,z)=>[4,.12*clamp((z-tl.z)/1.4,0,1),0];for(let k=0;k<6;k++){const z0=tl.z+k*.22,y0=tl.y-k*.08;bar(B,0,y0,z0,0,y0-.08,z0+.22,.008,0xeeeeee);if(k%2)for(const s of [-1,1])put(B,PR.box,s*.06,y0-.08,z0+.22,.12,.03,.07,[0xff6a55,0x5ce1ff,0xff6fb5][k%3],0,s*.5,0)}AN=null}, + // 39 Dragon Kite: a red dragon head on a long rippling body of gold and red segments, flown on two lines + B=>{const hy=1.6,hz=-.2;put(B,PR.box,0,hy,hz,.9,.6,.3,0xe8453c);put(B,PR.box,0,hy-.18,hz-.2,.6,.22,.3,0xff6a55);for(const s of [-1,1]){put(B,PR.sph,s*.24,hy+.12,hz-.17,.18,.18,.06,WH);put(B,PR.sph,s*.24,hy+.12,hz-.2,.08,.08,.04,DK);put(B,PR.cone,s*.3,hy+.42,hz,.1,.3,.1,0xffd23f,0,0,-s*.4)} + for(let k=0;k<6;k++)put(B,PR.box,(k-2.5)*.12,hy-.32,hz-.32,.06,.08,.04,WH); + for(const s of [-1,1]){rope(B,s*.38,.12,-.06,s*.3,hy-.3,hz,0xf4f0e6);put(B,PR.cyl8,s*.38,.12,-.06,.06,.12,.06,0x9a6a3c,0,0,Math.PI/2)} + AN=(x,y,z)=>[4,.16*clamp((z-hz)/2,0,1),0];for(let k=0;k<8;k++){const z=hz+.3+k*.26,y=hy-.05*k,w=.8-k*.07;put(B,PR.box,0,y,z,w,.5-k*.03,.2,k%2?0xffd23f:0xe8453c);put(B,PR.cone,0,y+.3,z,.08,.16,.08,0xffd23f)}AN=null}, + // 40 Hoverboard: a pink board with cyan jets underneath, glowing, bobbing a little; you stand on it + B=>{AN=()=>[3,.03,0];board(B,6,10,(u,v)=>{const z=(v-.5)*2.0,w=.5*Math.sqrt(1-Math.pow(2*v-1,6));return [(u-.5)*2*w,z,.06*Math.pow(2*v-1,2)]},(u,v,i,j)=>i===0||i===5?0x5ce1ff:j===4||j===5?WH:0xff6fb5,()=>0xc8508a,.08); + for(const z of [-.5,.5]){put(B,PR.cyl8,0,FEET-.16,z,.3,.1,.3,0x8d96a0);put(B,PR.cyl8,0,FEET-.22,z,.24,.04,.24,0x9fe8ff)}AN=null}, + // 41 Toy Rocket: a red and white rocket you sit astride, fins at the back, a yellow flame flickering out of it + B=>{const F=v3(0,-.76,-1.32),Rr=v3(0,-1.07,.6),d=Rr.clone().sub(F),N=6;for(let k=0;k[3,.04,0];put(B,PR.cone,0,t.y-.02,t.z+.32,.3,.4,.3,0xffd23f,Math.PI/2+.16);put(B,PR.cone,0,t.y-.02,t.z+.26,.18,.26,.18,0xff8a1f,Math.PI/2+.16);AN=null}, + // 42 Paper Boat: a folded boat of blue paper you stand in, a little paper flag on top; it rocks gently + B=>{AN=(x,y,z)=>[4,.025*Math.abs(z),0];const y0=FEET-.08;for(const s of [-1,1]){tri2(B,v3(s*.5,y0,-.9),v3(s*.5,y0,.9),v3(s*.7,y0+.42,1.2),0x8fd0ff);tri2(B,v3(s*.5,y0,-.9),v3(s*.7,y0+.42,1.2),v3(s*.7,y0+.42,-1.2),0x8fd0ff); + tri2(B,v3(-.5,y0,s*.9),v3(.5,y0,s*.9),v3(0,y0+.5,s*1.25),0xdff4ff)} + sheet(B,2,4,(u,v)=>[(u-.5),y0,(v-.5)*1.8],(u,v,i,j)=>0xdcdad0);for(let k=0;k<4;k++)put(B,PR.box,.71,y0+.3,-.6+k*.4,.01,.04,.3,0x9cc3ea); + bar(B,0,y0,.6,0,y0+1.0,.6,.015,0x8a96a0);tri2(B,v3(0,y0+1.0,.6),v3(0,y0+.78,.6),v3(0,y0+.89,.95),0xff6a55);AN=null} ]; +// an umbrella like the first glider in other colours: o.cols(u,v,i,j) the panels, o.rib, o.n ribs, o.r the radius, o.depth +function umbrella(B,o){const hx=.33,hy=.14,cx=.3,top=2.0,r=o.r||1.6,dp=o.depth||.66,n=o.n||8; + bar(B,hx,hy+.08,-.04,hx,hy-.1,-.04,.03,0x6b3a22,PR.cyl8);bar(B,hx,hy-.1,-.04,hx+.07,hy-.18,-.04,.028,0x6b3a22);bar(B,hx+.07,hy-.18,-.04,hx+.14,hy-.1,-.04,.026,0x6b3a22); + bar(B,hx,hy+.08,-.04,cx,top,0,.022,DK);put(B,PR.cone,cx,top+.12,0,.05,.22,.05,o.rib); + sheet(B,32,7,polar(v=>r*v,(v,u)=>top-dp*v*v-.07*Math.pow(v,5)*Math.abs(Math.sin(u*Math.PI*n)),cx,0),o.cols,(u,v,i,j)=>dim(o.cols(u,v,i,j),.82),outward(cx,1.0,0)); + for(let k=0;k({pose:{L:[.5,1.3,-.5,.35],R:ARMS_UP.R,turn:.08},hands:[null,[.33,.14,-.04]],pit:-.05,legs:'dangle',place:'pop',sway:.07})), + {pose:ARMS_UP,hands:[[-.44,.1,-.02],[.44,.1,-.02]],pit:-.1,legs:'dangle',place:'unfold',sway:.05}, + {pose:ARMS_UP,hands:[[-.27,.11,-.04],[.27,.11,-.04]],pit:-.04,legs:'dangle',place:'rise',sway:.04}, + {pose:ARMS_WING,hands:[[-.86,-.4,-.01],[.86,-.4,-.01]],pit:-1.1,legs:'spread',place:'body'}, + {pose:ARMS_UP,hands:[[-.38,.09,-.06],[.38,.09,-.06]],pit:-.12,legs:'dangle',place:'unfold',sway:.04}, + {pose:ARMS_UP,hands:[[-.38,.09,-.06],[.38,.09,-.06]],pit:-.12,legs:'dangle',place:'unfold',sway:.04}, + {pose:Object.assign({lean:-.15},ARMS_OUT),hands:[null,null],pit:-.04,legs:'stand',place:'board'}, + {pose:{lean:-.55,L:[-.4,.3,-.1,.6],R:[-.4,-.3,.1,.6]},hands:[[-.1,-.8,-.47],[.1,-.83,-.32]],pit:-.22,legs:'astride',place:'body',sway:.03}, + {pose:Object.assign({lean:-.1},ARMS_OUT),hands:[null,null],pit:-.04,legs:'stand',place:'board',sway:.03}]; const gstyles=[]; function gstyle(n){if(!HOLDS[n])return null;if(gstyles[n])return gstyles[n];const H=HOLDS[n],L=LEGS[H.legs]||LEGS.trail,pl=PLACE[H.place]||PLACE.unfold; return gstyles[n]={pose:G.pose(H.pose),hands:H.hands,pit:H.pit,pole:null, @@ -440,6 +508,8 @@ const tTex=(()=>{const S=64,c=document.createElement('canvas');c.width=S*4;c.hei g.lineWidth=1.2;for(let y=-14;y<16;y+=8){g.beginPath();g.moveTo(0,y);g.lineTo(-9,y-7);g.moveTo(0,y);g.lineTo(9,y-7);g.stroke()}}); at(5,()=>{g.strokeStyle='rgba(255,255,255,.95)';g.lineWidth=3;g.beginPath();g.arc(0,0,25,0,TAU);g.stroke();const r=g.createRadialGradient(0,0,10,0,0,25);r.addColorStop(0,'rgba(255,255,255,.05)');r.addColorStop(1,'rgba(255,255,255,.35)');g.fillStyle=r;g.beginPath();g.arc(0,0,25,0,TAU);g.fill(); g.fillStyle='rgba(255,255,255,.95)';g.beginPath();g.ellipse(-9,-10,6,3.5,-.7,0,TAU);g.fill()}); + at(6,()=>{g.fillStyle='#fff';g.beginPath();g.moveTo(0,24);g.bezierCurveTo(-34,0,-18,-28,0,-10);g.bezierCurveTo(18,-28,34,0,0,24);g.fill()}); // a heart (wave four) + at(7,()=>{g.fillStyle='#fff';g.beginPath();g.ellipse(-8,16,11,8,-.4,0,TAU);g.fill();g.fillRect(1,-24,5,40);g.beginPath();g.moveTo(6,-24);g.quadraticCurveTo(24,-14,18,2);g.quadraticCurveTo(18,-10,6,-12);g.fill()}); // a music note const t=new THREE.CanvasTexture(c);t.minFilter=THREE.LinearMipmapLinearFilter;return t})(); const tMat=new THREE.ShaderMaterial({transparent:true,depthWrite:false,fog:true, uniforms:THREE.UniformsUtils.merge([THREE.UniformsLib.fog,{map:{value:null},uScale:{value:400}}]), @@ -457,7 +527,16 @@ const TRAILS=[null, {sp:2,cols:RAINBOW,s0:.5,s1:.62,life:1.3,rate:26,a:.85,spread:0,vy:0,band:1}, {sp:3,cols:[0xffffff,0xf4efe2,0xe6e8ee],s0:.55,s1:.55,life:2.2,rate:12,a:1,spread:.5,vy:-1.2,spin:3}, {sp:4,cols:[0xe8782e,0xd9442f,0xf2b632,0x8bb04a],s0:.5,s1:.5,life:2.2,rate:12,a:1,spread:.5,vy:-1.4,spin:4}, - {sp:5,cols:[0xcff6ff,0xffffff,0xd9ecff,0xf2d9ff],s0:.25,s1:.48,life:1.6,rate:20,a:.95,spread:.45,vy:1.2,pop:1}]; + {sp:5,cols:[0xcff6ff,0xffffff,0xd9ecff,0xf2d9ff],s0:.25,s1:.48,life:1.6,rate:20,a:.95,spread:.45,vy:1.2,pop:1}, + // wave four: confetti, hearts, music notes, fire sparks, snowflakes, gold glitter, a band in team colours, a comet's tail + {sp:2,cols:RAINBOW,s0:.22,s1:.2,life:2,rate:30,a:1,spread:.7,vy:-1.0,spin:6}, + {sp:6,cols:[0xff4f7a,0xff8fb0,0xffc2d6],s0:.35,s1:.55,life:1.6,rate:14,a:1,spread:.5,vy:.6}, + {sp:7,cols:[0xffffff,0xffe14f,0x5ce1ff,0xff6fb5],s0:.4,s1:.5,life:1.8,rate:10,a:1,spread:.5,vy:.5,spin:2}, + {sp:2,cols:[0xffe14f,0xff9a3c,0xff5a2a],s0:.3,s1:.08,life:.8,rate:40,a:1,spread:.4,vy:.3,tw:1}, + {sp:1,cols:[0xffffff,0xdff4ff],s0:.3,s1:.3,life:2.4,rate:14,a:.95,spread:.6,vy:-.6,spin:2}, + {sp:1,cols:[0xffd23f,0xffe98f,0xffc93c,0xffffff],s0:.35,s1:.1,life:1.2,rate:34,a:1,spread:.5,vy:0,tw:1}, + {sp:2,cols:[0xffd23f,0xffffff,0x5ce1ff,0xffd23f,0xffffff,0x5ce1ff],s0:.5,s1:.6,life:1.3,rate:26,a:.85,spread:0,vy:0,band:1}, + {sp:0,cols:[0x9fe8ff,0xffffff,0xc8b4ff],s0:.9,s1:2.8,life:1.4,rate:24,a:.6,spread:.15,vy:.2}]; function emit(T,x,y,z,col,vx,vy,vz,cx,cy,cz){ if(tp.n>=TCAP)return;const i=tp.n++;_c.setHex(col); tp.x[i*3]=x;tp.x[i*3+1]=y;tp.x[i*3+2]=z;tp.v[i*3]=vx+(cx||0);tp.v[i*3+1]=vy+(cy||0);tp.v[i*3+2]=vz+(cz||0);tp.c[i*3]=_c.r;tp.c[i*3+1]=_c.g;tp.c[i*3+2]=_c.b; @@ -533,7 +612,22 @@ const GLSL_SKIN='vec4 c4(float f,vec3 a,vec3 b,vec3 c,vec3 d){return vec4(f<.4?a +'else if(k<21.5){c=vec3(.5,.54,.6)*(dk>.5?.7:1.);c=mix(c,vec3(.92,.93,.95),step(fract(p.y*28.+p.x*2.),.12));}\n' +'else if(k<22.5){c=vec3(.93,.84,.64)*(.82+.18*fb(p*6.));float l=abs(p.y-.06*sin(p.z*9.)-.02);c=mix(c,vec3(.72,.16,.1),(1.-smoothstep(.006,.012,l))*step(.5,fract(p.z*14.)));c=mix(c,vec3(.55,.38,.22),smoothstep(.62,.7,fb(p*3.+2.))*.5);c*=dk>.5?.8:1.;}\n' +'else if(k<23.5){vec3 q=fract(p*18.);vec3 i3=floor(p*18.);float h=h3(i3);float tr=(1.-smoothstep(.06,.1,min(abs(q.y-.5),abs(q.z-.5))))*step(.45,h);c=dk>.5?vec3(.04,.12,.22):vec3(.06,.22,.38);c=mix(c,vec3(1.,.8,.3),tr);em=vec3(.2,.9,1.)*tr*(.4+.4*sin(uT*3.+h*20.));}\n' - +'else{c=vec3(.94,.48,.12)*(.9+.1*n3(p*90.));float sm=1.-smoothstep(.01,.02,min(abs(fract(p.z*3.)-.5),abs(p.y-.04*sin(p.z*6.))));c=mix(c,vec3(.08),sm);c*=dk>.5?.75:1.;}\n' + +'else if(k<24.5){c=vec3(.94,.48,.12)*(.9+.1*n3(p*90.));float sm=1.-smoothstep(.01,.02,min(abs(fract(p.z*3.)-.5),abs(p.y-.04*sin(p.z*6.))));c=mix(c,vec3(.08),sm);c*=dk>.5?.75:1.;}\n' + // wave four: tiger stripes, polka dots, a race check, watermelon, denim, comic pop, a sunset; then the moving ones: ocean + // waves, rainbow flow, a heartbeat pulse, electric, molten gold; and gold chevrons + +'else if(k<25.5){c=vec3(1.,.55,.1);c=mix(c,vec3(.07),step(fract(p.z*7.+.25*sin(p.y*30.)+.15*sin(p.x*40.)),.22));c*=dk>.5?.8:1.;}\n' + +'else if(k<26.5){vec2 q=fract(vec2(p.y+p.x,p.z)*12.)-.5;c=mix(vec3(1.,.45,.7),vec3(1.),1.-smoothstep(.22,.26,length(q)));c*=dk>.5?.8:1.;}\n' + +'else if(k<27.5){float q=mod(floor(p.y*16.)+floor(p.z*16.)+floor(p.x*16.),2.);c=q>.5?vec3(.95):vec3(.07);}\n' + +'else if(k<28.5){c=vec3(.95,.32,.36);vec2 q=fract(vec2(p.x+p.y*1.3,p.z)*9.)-.5;c=mix(c,vec3(.08),1.-smoothstep(.07,.1,length(q*vec2(1.,.6))));if(dk>.5)c=vec3(.35,.75,.3);}\n' + +'else if(k<29.5){c=vec3(.28,.45,.75)*(.82+.18*n3(p*180.));c=mix(c,vec3(1.,.66,.25),step(.94,fract(p.z*5.))*step(.5,fract(p.z*60.)));c*=dk>.5?.75:1.;}\n' + +'else if(k<30.5){vec2 q=fract(vec2(p.y,p.z)*20.)-.5;float r=.15+.25*smoothstep(-.3,.3,p.y);c=mix(vec3(1.,.85,.1),vec3(1.,.3,.3),1.-smoothstep(r,r+.04,length(q)));c=mix(c,vec3(.05),smoothstep(.55,.75,1.-abs(dot(vn,vd))));}\n' + +'else if(k<31.5){float f=clamp(p.z*1.4+.6+p.y,0.,1.);c=mix(mix(vec3(1.,.82,.25),vec3(1.,.4,.45),smoothstep(0.,.5,f)),vec3(.55,.3,.9),smoothstep(.5,1.,f));c*=dk>.5?.8:1.;}\n' + +'else if(k<32.5){float s=fract(p.z*4.-uT*.6+.12*sin(p.y*30.+uT*2.));c=s<.45?vec3(.1,.45,.9):s<.8?vec3(.2,.78,.95):vec3(.95,1.,1.);em=c*.12;c*=dk>.5?.8:1.;}\n' + +'else if(k<33.5){c=hsv(fract(p.z*1.5-uT*.25+p.y*2.),.8,1.);em=c*.35;c*=dk>.5?.8:1.;}\n' + +'else if(k<34.5){float b=pow(max(0.,sin(uT*5.)),8.)+.6*pow(max(0.,sin(uT*5.-.9)),8.);c=vec3(.85,.12,.2)*(dk>.5?.7:1.);em=vec3(1.,.2,.3)*b*.9;}\n' + +'else if(k<35.5){float l=1.-smoothstep(0.,.05,abs(n3(p*7.+vec3(0.,0.,uT*3.))-.5));float fl=step(.4,fract(sin(floor(uT*12.))*43758.5));c=vec3(.08,.12,.3);c=mix(c,vec3(.6,.95,1.),l);em=vec3(.3,.9,1.)*l*(.5+fl);}\n' + +'else if(k<36.5){float f=fb(p*6.+vec3(0.,0.,-uT*.5));c=mix(vec3(.9,.6,.1),vec3(1.,.9,.45),smoothstep(.45,.6,f));em=vec3(1.,.65,.15)*smoothstep(.55,.7,f)*.8;c*=dk>.5?.8:1.;}\n' + +'else{c=fract((p.z+abs(p.y-.05)*1.5)*5.)<.4?vec3(1.,.78,.15):vec3(.97,.96,.92);c*=dk>.5?.75:1.;c+=vec3(.12)*smoothstep(.5,.9,up);}\n' +'return c;}\n'; GSK.onBeforeCompile=sh=>{sh.uniforms.uT=uT; sh.vertexShader=sh.vertexShader.replace('#include ','#include \nattribute float gsk;attribute float gcl;varying float vSk;varying float vCl;varying vec3 vP;varying vec3 vN;varying vec3 vVN;varying vec3 vVD;') @@ -627,6 +721,15 @@ function pack(B,n,a){const R=(...v)=>G.bagRBox(B,...v),L=(...v)=>G.bagRLo(B,...v case 11:R(0,1.24,.36,.5,.6,.24,0xc9d1da);for(const s of [-1,1])L(s*.16,.86,.38,.14,.16,.14,0x5a606b);L(0,1.28,.5,.2,.2,.04,a);X(0,1.28,.525,.08,.08,.02,0xffffff);for(const y of [1.5,1.06])X(0,y,.49,.3,.03,.02,0x5a606b);T(0,.18,1.66,.36,.02,.26,.02,0x8d96a0);L(.18,1.8,.36,.05,.05,.05,0xe8453c);break; // robot power pack: casing, thrusters, a glowing core, vents, an aerial case 12:R(0,1.18,.36,.46,.6,.18,0xf2efe8);for(const [x,y,c] of [[-.1,1.3,0xf08a2a],[.11,1.32,0x3fa9f5],[0,1.08,0xffd23f]]){L(x,y,.48,.2,.2,.12,c);X(x,y,.55,.2,.02,.01,0x3a3e45)}X(0,1.5,.38,.48,.05,.28,a);break; // a net bag of balls, its drawstring in your colour case 13:R(0,1.22,.34,.44,.52,.22,0xb85a3a);T(1,-.1,1.3,.46,.16,.6,.16,0xf4e6c8,0,0,.2);T(1,.14,1.32,.46,.1,.66,.1,0xffc93c,0,0,-.25);L(.22,1.62,.46,.12,.06,.12,0x8fe3ff);X(0,1.04,.46,.3,.06,.02,a);break; // spyglass and map: a leather holder, a rolled map, a brass spyglass, a band in your colour + // wave four: a giant soccer ball, a pirate barrel, a boombox, a robot buddy, an ice cream cone, a trophy, a rocket pack, a penguin + case 15:R(0,1.22,.38,.56,.56,.32,0xf6f4ee);for(const [x,y] of [[0,1.22],[-.17,1.38],[.17,1.38],[-.17,1.06],[.17,1.06]])X(x,y,.54,.13,.13,.02,0x2a2d34);X(0,.92,.38,.4,.06,.3,a);break; // a giant soccer ball, a strap in your colour + case 16:R(0,1.2,.38,.5,.66,.3,0xd99a52);for(const y of [.96,1.44])L(0,y,.38,.54,.05,.34,0x8d96a0);X(0,1.2,.54,.06,.66,.02,0xc07a3a);X(0,1.2,.55,.2,.2,.02,a);break; // a barrel with iron hoops, a mark in your colour + case 17:X(0,1.22,.38,.6,.4,.26,0xdfe4ea);for(const s of [-1,1])L(s*.17,1.2,.52,.2,.2,.04,0x3a3e45);X(0,1.48,.38,.44,.04,.06,0x8d96a0);X(0,1.34,.515,.12,.05,.02,a);X(0,1.08,.515,.3,.04,.02,0xff6fb5);break; // a boombox: speakers, handle, a light in your colour + case 18:R(0,1.12,.38,.4,.4,.26,0xffd23f);R(0,1.48,.38,.36,.32,.26,0xdfe4ea);for(const s of [-1,1]){X(s*.08,1.5,.52,.07,.07,.02,0x5ce1ff);T(1,s*.26,1.16,.38,.08,.3,.08,0xdfe4ea,0,0,s*.6)}X(0,1.12,.52,.16,.1,.02,a);T(0,0,1.72,.38,.02,.18,.02,0x8d96a0);L(0,1.82,.38,.06,.06,.06,0xe8453c);break; // a little robot riding piggyback + case 19:T(2,0,1.08,.38,.36,.5,.3,0xf2c27a,0,0,Math.PI);for(const [x,c2] of [[-.1,0xff9fc7],[.1,0xfff4e0]])R(x,1.42,.38,.3,.28,.28,c2);L(0,1.62,.38,.2,.16,.2,0xff9fc7);L(0,1.74,.38,.08,.08,.08,0xe8453c);X(0,1.12,.54,.3,.04,.02,a);break; // an ice cream cone with two scoops and a cherry + case 20:L(0,.94,.38,.34,.12,.3,0x5ce1ff);T(1,0,1.06,.38,.08,.18,.08,0xffc93c);R(0,1.34,.38,.46,.44,.32,0xffc93c);for(const s of [-1,1])T(1,s*.3,1.34,.38,.06,.26,.06,0xffc93c,0,0,s*.4);X(0,1.58,.38,.5,.04,.34,0xffe98f);X(0,.94,.54,.2,.06,.02,a);break; // a trophy cup + case 21:R(0,1.2,.38,.36,.66,.3,0xf6f4ee);L(0,1.6,.38,.3,.18,.26,0xe8453c);for(const s of [-1,1])T(1,s*.22,.92,.38,.04,.3,.24,0xe8453c,0,0,s*.4);L(0,.82,.38,.18,.12,.18,0xffd23f);L(0,1.24,.54,.14,.14,.04,0x9fe8ff);X(0,1.02,.54,.3,.05,.02,a);break; // a rocket pack: body, nose, fins, a flame, a window + case 22:R(0,1.18,.38,.46,.56,.3,0x5a8ad0);L(0,1.18,.53,.32,.42,.02,0xf6f4ee);R(0,1.56,.38,.36,.3,.28,0x5a8ad0);for(const s of [-1,1]){L(s*.08,1.6,.52,.08,.08,.03,0xffffff);T(1,s*.28,1.14,.38,.06,.34,.16,0x5a8ad0,0,0,s*.4)}L(0,1.5,.54,.1,.06,.06,0xff8a1f);X(0,1.36,.52,.4,.06,.04,a);break; // a penguin plush with a scarf in your colour case 14:R(0,1.16,.38,.44,.5,.26,0xffc93c);R(0,1.52,.38,.36,.32,.28,0xffc93c);L(0,1.48,.54,.12,.08,.12,0xff8a1f);for(const s of [-1,1]){L(s*.09,1.58,.52,.08,.08,.03,0xffffff);X(s*.09,1.58,.54,.035,.04,.01,0x15171b);T(1,s*.26,1.24,.36,.08,.28,.14,0xffc93c,0,0,s*.6)}for(let k=0;k<3;k++)T(0,(k-1)*.08,1.72,.38,.05,.16,.08,a,0,0,(k-1)*-.4);X(0,1.14,.52,.22,.16,.02,a);break; // a mascot plush: body, head, beak, eyes, wings round you, a crest and a shirt in your colour } } @@ -656,7 +759,37 @@ const EMOTES=[null, {dur:3,f:t=>{const j=Math.max(0,sn(t*5));return{L:[-.3,.95,-.3,1.8],R:[1.45+.3*j,-.25,.1,.12],lean:-.12+.06*j,turn:-.18,legs:[.35,-.05,.2,-.1,.08,.1]}}}, // the robot runs out of power: it slumps, hangs, then jerks back on with stiff arms {dur:3.4,f:t=>{const d=Math.min(1,t/.7),up=t>1.9?Math.min(1,(t-1.9)/.15):0,sl=d*(1-up),tw=t>2.05?.25*Math.sign(sn(t*14)):0; - return{L:[-1.42+.5*sl+up*2.6,.2,-.14,.25+.6*sl+up*1.3],R:[-1.42+.5*sl+up*2.6,-.2,.14,.25+.6*sl+up*1.3],lean:-.55*sl,turn:tw*up,y:-.1*sl,legs:[.15*sl,-.06,.5*sl,.15*sl,.06,.5*sl]}}}]; + return{L:[-1.42+.5*sl+up*2.6,.2,-.14,.25+.6*sl+up*1.3],R:[-1.42+.5*sl+up*2.6,-.2,.14,.25+.6*sl+up*1.3],lean:-.55*sl,turn:tw*up,y:-.1*sl,legs:[.15*sl,-.06,.5*sl,.15*sl,.06,.5*sl]}}}, + // wave four (19 November 2026): big, readable at a distance + // slam dunk: crouch, leap with both arms up, slam them down, land + {dur:2.4,f:t=>{const cr=t<.45?Math.sin(t/.45*Math.PI/2):Math.max(0,1-(t-.45)/.1),j=t>.45&&t<1.25?Math.sin((t-.45)/.8*Math.PI):0,sl=t>.85?Math.min(1,(t-.85)/.12):0,ld=t>1.25&&t<1.6?Math.sin((t-1.25)/.35*Math.PI):0; + const a=2.5*(1-sl)+.3*sl;return{L:[a,.25,-.15,.3],R:[a,-.25,.15,.3],lean:.1*j-.25*sl*(1-ld)-.2*cr,y:.55*j-.12*cr-.1*ld,legs:[.6*cr+.3*ld,-.06,1.1*cr+.6*ld+.2*j,.6*cr+.3*ld,.06,1.1*cr+.6*ld+.2*j]}}}, + // touchdown spike: the ball goes up high in one hand, comes down hard, then a shimmy + {dur:2.8,f:t=>{const up=Math.min(1,t/.5),dn=t>.6?Math.min(1,(t-.6)/.1):0,sh=t>.8?Math.sin(t*14):0; + return{L:[t>.8?.2:-1.2,t>.8?1.4:.2,-.1,.3],R:[2.6*up*(1-dn)-.4*dn+(t>.8?.6:0),t>.8?-1.4:-.2,.15,.2],lean:-.35*dn*(t<.9?1:0),turn:.25*sh,roll:.08*sh,y:.04*Math.abs(sh),legs:[.2*Math.max(0,sh),-.1,.3,.2*Math.max(0,-sh),.1,.3]}}}, + // home run: a big two-handed swing round, then a hand over the eyes watching it fly + {dur:3,f:t=>{const s=Math.min(1,t/.45),w=t<.45?.7-1.9*s*s:-1.2,look=t>.7?Math.min(1,(t-.7)/.3):0; + return{L:look?[.2+.2*look,.4,-.1,.6]:[.6,-.4,-.1,.9],R:look?[1.5,-.2,.35,2.3*look]:[.6,.4,.1,.9],turn:w*(1-look)-.4*look,lean:-.15*look,roll:.06*look,legs:[.2,-.08,.15,-.1,.12,.25]}}}, + // chicken dance: elbows flapping, knees bobbing + {dur:4,f:t=>{const f=Math.sin(t*12),b=Math.abs(Math.sin(t*6));return{L:[-.2,.95,-.55-.35*f,1.9],R:[-.2,-.95,.55+.35*f,1.9],lean:-.2,y:-.06*b,turn:.15*Math.sin(t*3),legs:[.3*b,-.18,.6*b,.3*b,.18,.6*b]}}}, + // arm wave: both arms out to the side, a wave running from one hand to the other + {dur:3,f:t=>{const a=Math.sin(t*6),b=Math.sin(t*6-1.6);return{L:[.15+.55*a,1.5,-.1,.4+.4*Math.max(0,a)],R:[.15+.55*b,-1.5,.1,.4+.4*Math.max(0,b)],roll:.12*Math.sin(t*6-.8),y:.03*Math.abs(Math.sin(t*6))}}}, + // salute: stand straight, a crisp hand to the brow + {dur:2.4,f:t=>{const k=Math.min(1,t/.25)*Math.min(1,Math.max(0,(2.4-t)/.3));return{L:[-1.5,.15,-.1,.1],R:[-1.42+3.4*k,-.2-.35*k,.14,.25+2.0*k],lean:.06,legs:[0,-.02,0,0,.02,0]}}}, + // star jump: two big jumps, arms and legs out wide like a star + {dur:2,f:t=>{const h=Math.sin((t%1)*Math.PI);return{L:[1.0+1.0*h,1.0,-.3,.2],R:[1.0+1.0*h,-1.0,.3,.2],y:.45*h,legs:[0,-.5*h,.15*(1-h),0,.5*h,.15*(1-h)]}}}, + // pirate jig: fists on hips, kicking each knee up in turn + {dur:4,f:t=>{const k=Math.sin(t*8);return{L:[-.3,.95,-.3,1.8],R:[-.3,-.95,.3,1.8],lean:-.08,turn:.2*Math.sin(t*4),y:.06*Math.abs(k),legs:[1.1*Math.max(0,k),-.06,1.4*Math.max(0,k),1.1*Math.max(0,-k),.06,1.4*Math.max(0,-k)]}}}, + // big shrug: palms up and out, shoulders up, head to one side + {dur:2.2,f:t=>{const k=Math.min(1,t/.3)*Math.min(1,Math.max(0,(2.2-t)/.4)),b=.03*Math.sin(t*9)*k;return{L:[-.6+.8*k,.6,-.6*k,1.7*k+.25],R:[-.6+.8*k,-.6,.6*k,1.7*k+.25],roll:.12*k,lean:.05*k,y:.04*k+b}}}, + // mic drop: an arm held out, the hand lets go, the arm drops, you turn away + {dur:2.8,f:t=>{const out=Math.min(1,t/.4),drop=t>1.3?Math.min(1,(t-1.3)/.15):0,away=t>1.6?Math.min(1,(t-1.6)/.5):0; + return{L:[-1.42,.2,-.14,.25],R:[-1.42+(2.7*out)*(1-drop),-.2,.14,.2],turn:-1.2*away,lean:-.12*drop,legs:[0,-.04,.05,.25*away,.06,.3*away]}}}, + // thinking: a hand on the chin, the other arm across, a foot tapping + {dur:3.6,f:t=>{const tap=Math.max(0,Math.sin(t*9));return{L:[.3,-.5,-.2,1.7],R:[.9,.25,.3,2.5],roll:.1,lean:-.06,legs:[0,-.04,0,.2*tap,.06,.15*tap]}}}, + // air guitar: one hand up the neck, the other strumming fast, knees bobbing, leaning back on the big note + {dur:4,f:t=>{const st=Math.sin(t*16),b=Math.abs(Math.sin(t*5)),big=t>2.6&&t<3.4?Math.sin((t-2.6)/.8*Math.PI):0; + return{L:[.7+.5*big,.9,-.35,.5],R:[.1+.15*st,-.4,.45,1.5+.2*st],lean:-.2-.3*big,turn:.3,y:-.05*b,legs:[.2+.3*b,-.14,.3+.5*b,.1,.14,.2+.3*b]}}}]; const VICTORIES=[null, {f:t=>{const b=Math.abs(sn(t*4));return{L:[1.95,.75,-.14,.2+.5*b],R:[1.95,-.75,.14,.2+.5*b],lean:.12,y:.12*b}}}, {f:t=>({L:[0,1.5,-.05,1.5+.15*sn(t*3)],R:[0,-1.5,.05,1.5+.15*sn(t*3)],lean:-.08,turn:.15*sn(t*1.5),legs:[0,-.12,.05,0,.12,.05]})}, @@ -701,6 +834,33 @@ function emoteTick(){ emoteBtn.hidden=!(canEmote()||o.e)}else if(emoteBtn)emoteBtn.hidden=true; } + +// ===================================================================== +// Pickaxes (wave four): what you swing in place of the crowbar, `o` in the worn string. Each is one small geometry in the +// crowbar's own frame (the grip at z 0.06 in the right hand, the business end out at z -0.8), drawn by one more instanced +// mesh per kind while anyone holds one. The swing, its reach, its timing and what it hits are the crowbar's, unchanged. +// ===================================================================== +const WHITE=0xf2efe8,GOLD=0xffc93c,pX=G.bagBox,pL=G.bagRLo,pT=G.bagTurn; +const PICKS=[null, + B=>{pX(B,0,0,-.32,.06,.06,.86,0x3fa9f5);pX(B,0,0,.07,.07,.07,.22,WHITE);pX(B,0,-.08,-.76,.05,.2,.1,WHITE);pX(B,0,-.17,-.86,.05,.08,.28,WHITE);pX(B,0,-.17,-.86,.056,.086,.08,0xe8453c)}, // hockey stick + B=>{pX(B,0,0,-.32,.035,.035,.9,0xdfe4ea);pX(B,0,0,.07,.055,.055,.24,0xe8453c);pL(B,0,-.07,-.8,.09,.18,.2,GOLD);pX(B,0,-.07,-.9,.095,.14,.02,0xffe98f)}, // golf club + B=>{pX(B,0,0,.19,.08,.08,.03,0xc8955a);pX(B,0,0,.07,.06,.06,.2,0xe8453c);for(let k=0;k<5;k++){const w=.06+k*.022;pX(B,0,0,-.07-k*.17,w,w,.18,0xf0d8a8)}pX(B,0,0,-.79,.15,.15,.08,0xf0d8a8)}, // baseball bat + B=>{pX(B,0,0,.06,.05,.05,.2,0x8a5a2b);pL(B,0,0,-.07,.06,.2,.06,GOLD);pT(B,1,0,-.08,.02,.03,.04,.16,GOLD,.6,0,0);for(let k=0;k<6;k++)pT(B,0,0,.01*k*k,-.18-k*.12,.045,.15-k*.012,.17,k===5?0xffe98f:0xdfe9f2,-.04*k,0,0)}, // a foam cutlass + B=>{pX(B,0,0,-.32,.07,.07,.82,0xb9c2cc);for(const z of [-.08,-.42])pX(B,0,0,z,.085,.085,.05,0x5ce1ff);pL(B,0,0,-.76,.16,.16,.1,0x8d96a0);for(const [x,y] of [[0,.07],[0,-.07],[.07,0]])pT(B,0,x,y,-.88,.03,.03,.2,GOLD,y*3,-x*3,0);pL(B,0,0,-.76,.06,.06,.12,0xe8453c)}, // a robot claw + B=>{pX(B,0,0,-.22,.04,.04,.62,WHITE);pL(B,0,0,-.66,.1,.3,.28,0xffd23f);pL(B,0,.26,-.72,.09,.28,.09,0xffd23f);pL(B,0,.06,-.52,.08,.08,.14,0xffd23f);pX(B,.055,-.04,-.66,.01,.1,.1,0xe8453c)}, // a giant foam finger + B=>{pX(B,0,0,.08,.16,.16,.08,0xe8eef4);pX(B,0,0,-.28,.06,.06,.66,GOLD);pL(B,0,0,-.68,.26,.26,.32,GOLD);pX(B,0,0,-.86,.28,.28,.03,0xffe98f);for(const s of [-1,1])pT(B,1,0,s*.17,-.66,.03,.08,.16,GOLD,0,0,0)}, // a trophy cup + B=>{pX(B,0,0,.1,.04,.07,.14,0x3a3e45);pX(B,0,0,-.28,.05,.035,.62,0xc8955a);pL(B,0,0,-.68,.09,.28,.22,0xe8453c);pL(B,0,0,-.88,.09,.36,.26,0xe8453c);pX(B,.05,0,-.82,.01,.12,.18,WHITE);pX(B,.05,0,-.62,.01,.06,.02,0x2a2d34)}, // a guitar + B=>{for(const [y,z] of [[.06,.16],[-.06,.16],[0,.22],[0,.1]])pX(B,0,y,z,.04,.05,.05,GOLD);pX(B,0,0,-.35,.05,.05,.84,0x5ce1ff);pX(B,0,0,-.02,.04,.3,.04,0x5ce1ff);for(const s of [-1,1]){pT(B,0,0,s*.12,-.78,.05,.05,.26,0x5ce1ff,s*.7,0,0);pT(B,0,0,s*.22,-.68,.06,.12,.08,WHITE,0,0,0)}}, // a toy anchor + B=>{pX(B,0,0,.07,.06,.09,.22,0xe8453c);pX(B,0,0,-.35,.045,.09,.66,0xdfe4ea);pX(B,0,0,-.74,.06,.24,.14,0xdfe4ea);for(const s of [-1,1])pX(B,0,s*.09,-.86,.06,.07,.14,0xdfe4ea);pX(B,.035,0,-.4,.01,.04,.4,0xb9c2cc)}, // a giant wrench + B=>{pX(B,0,-.1,.12,.04,.16,.04,0x8a5a2b);pX(B,0,-.17,.06,.04,.04,.1,0x8a5a2b);pX(B,0,0,-.1,.03,.03,.3,0x8a96a0);for(let k=0;k<5;k++){const w=.14-Math.abs(k-1.5)*.03;pX(B,0,0,-.3-k*.1,w,w,.1,k%2?0xe8453c:WHITE)}pX(B,0,0,-.84,.025,.025,.1,0x8a96a0)}, // a closed umbrella + B=>{pX(B,0,0,-.3,.035,.035,.76,WHITE);pL(B,0,0,-.84,.07,.42,.42,0xff6fb5);for(const r of [0,.785,1.57,2.36])pT(B,0,.04,0,-.84,.01,.4,.05,r%1.57?0xffd23f:WHITE,r,0,0)}]; // a giant lollipop +const pickGeo=[]; +function pickOf(n){if(!PICKS[n])return null;if(!pickGeo[n]){const B=G.Bag();PICKS[n](B);pickGeo[n]=G.bagGeo(B)}return pickGeo[n]} +const pIMs={}; +function pickIM(n){let im=pIMs[n];if(!im){im=pIMs[n]=new THREE.InstancedMesh(pickOf(n),G.MAT,G.LIMB_N);im.instanceMatrix.setUsage(THREE.DynamicDrawUsage);im.frustumCulled=false;im.count=0;im.visible=false;im.castShadow=im.receiveShadow=true;G.scene.add(im)}return im} +function pickPic(n,W,H){const sc=new THREE.Scene();lights(sc);const m=new THREE.Mesh(pickOf(n),G.MAT),g=new THREE.Group();m.rotation.x=Math.PI/2;m.position.y=-.35;g.add(m);g.rotation.set(0,Math.PI/2-.35,.18);sc.add(g); // stood up, its business end on top + const h=.68,cam=new THREE.OrthographicCamera(-h*W/H,h*W/H,h,-h,.1,20);cam.position.set(0,.2,5);cam.lookAt(0,0,0);return render(sc,cam,W,H)} + // ===================================================================== // Dressing an entity, the frame's work // ===================================================================== @@ -708,7 +868,7 @@ function dress(e){ if(!e||!e.model)return;const o=parse(e.lx||''),u=e.model.userData;e.lxo=o; const g=o.g?gliderOf(o.g):null; if(g){u.glider.geometry=g;u.glider.material=GLX;u.glider.castShadow=true}else if(u.glider.material===GLX){u.glider.geometry=G.GLIDER_GEO;u.glider.material=G.BMAT} // (a Locker glider is drawn unskinned: it opens its own way, PLACE) - u.gs=o.w||0; + u.gs=o.w||0;u.lxO=o.o||0; const pk=o.p||0;if((u.lxPk|0)!==pk){u.lxPk=pk;G.setModelColor(e.model,u.hex,u.skinIx,u.fit,u.face)} } function setGlider(model,n){const u=model.userData,g=n?gliderOf(n):null;if(g){u.glider.geometry=g;u.glider.material=GLX}else{u.glider.geometry=G.GLIDER_GEO;u.glider.material=G.BMAT}} @@ -730,25 +890,25 @@ function tick(dt){ tMat.uniforms.uScale.value=G.renderer.domElement.height/(2*Math.tan(G.camera.fov*Math.PI/360))} } const gIMs={}; -function gunReset(){for(const k in gIMs)gIMs[k].count=0} -function gunIM(k,s){if(!G.WEAP[k]||!(s>=1&&s<=WRAP_NAMES.length))return G.gunIM[k];let im=gIMs[k];if(!im){im=gIMs[k]=gunMesh(k,G.LIMB_N);G.scene.add(im)} +function gunReset(){for(const k in gIMs)gIMs[k].count=0;for(const k in pIMs)pIMs[k].count=0} +function gunIM(k,s,pk){if(k==='cb')return pk>=1&&pk<=PICK_NAMES.length?pickIM(pk):G.gunIM[k];if(!G.WEAP[k]||!(s>=1&&s<=WRAP_NAMES.length))return G.gunIM[k];let im=gIMs[k];if(!im){im=gIMs[k]=gunMesh(k,G.LIMB_N);G.scene.add(im)} if(im.count0;if(im.count)im.instanceMatrix.needsUpdate=true}} +function gunDone(){for(const M of [gIMs,pIMs])for(const k in M){const im=M[k];im.visible=im.count>0;if(im.count)im.instanceMatrix.needsUpdate=true}} function bsOf(oid){if(oid==null)return 0;let e=null;if(oid===G.myId()||oid==='me')e=G.player;else for(const x of G.ents)if(x.id===oid){e=x;break} const o=e?parse(e.lx||''):null;return o&&o.b||0} function bsk(mesh,i,bs){const a=mesh.geometry.attributes.bsk;if(!a||i<0||i>=a.count)return;const v=bs|0;if(a.array[i]!==v){a.array[i]=v;a.needsUpdate=true}} const bsCol=bs=>BS_DEBRIS[bs]||BS_DEBRIS[0]; const bsMat=bs=>['wood','crate','stone','stone','crate','stone','metal'][bs]||'wood'; // what a skinned piece's crowbar chips and sound are -const botLx=i=>'g'+(1+(i*7)%GLIDER_NAMES.length)+'t'+(1+i%6)+'w'+(1+(i*5)%WRAP_NAMES.length)+'b'+(1+i%6)+'p'+(1+(i*3)%PACK_NAMES.length)+'v'+(1+i%4); +const botLx=i=>'g'+(1+(i*7)%GLIDER_NAMES.length)+'t'+(1+i%6)+'w'+(1+(i*5)%WRAP_NAMES.length)+'b'+(1+i%6)+'p'+(1+(i*3)%PACK_NAMES.length)+'v'+(1+i%4)+'o'+(1+i%PICK_NAMES.length); // ===================================================================== // The Locker's tabs // ===================================================================== -const TABS=[['outfits','Outfits','OUT','FITS'],['p','Backpacks','BACK','PACKS'],['e','Emotes','EMO','TES'],['v','Victory','VIC','TORY'],['g','Gliders','GLI','DERS'],['t','Trails','TRA','ILS'],['w','Gun skins','GUN ','SKINS'],['b','Builds','BUI','LDS']]; +const TABS=[['outfits','Outfits','OUT','FITS'],['p','Backpacks','BACK','PACKS'],['e','Emotes','EMO','TES'],['v','Victory','VIC','TORY'],['g','Gliders','GLI','DERS'],['t','Trails','TRA','ILS'],['w','Gun skins','GUN ','SKINS'],['o','Pickaxes','PICK','AXES'],['b','Builds','BUI','LDS']]; // (the HUD the Emote button sits in is left alone by ../lang.js, so it's put in the player's language here; the Locker's own words // are translated by lang.js, from the page's es.js) const lxT=s=>window.BackRoomLang?window.BackRoomLang.t(s):s; -const LEDE={outfits:'Pick what you wear. Every outfit is the same size and just as easy to hit as the standard one.',g:'Pick how you glide down. Every glider is held its own way, but you are the same size and fall at the same speed.',t:'A trail follows you while you skydive and glide. It never hides anyone: it fades out close to the camera.',e:'Pick the emote to play in a match: the Emote key on a keyboard (J unless you change it in Controls), the Emote button on a touch screen. Standing still only; moving stops it.',v:'Pick what you do when you win: everyone watching you sees it.',p:'A backpack goes on over any outfit. It keeps your colour on it, so you can still be told apart.',w:'Your weapons in a pattern. The orange tip, the muzzle flash, the rarity band and the crosshair stay the same.',b:'What your walls, floors and ramps look like to everyone. They are just as strong, and just as hard to see through.'}; +const LEDE={outfits:'Pick what you wear. Every outfit is the same size and just as easy to hit as the standard one.',g:'Pick how you glide down. Every glider is held its own way, but you are the same size and fall at the same speed.',t:'A trail follows you while you skydive and glide. It never hides anyone: it fades out close to the camera.',e:'Pick the emote to play in a match: the Emote key on a keyboard (J unless you change it in Controls), the Emote button on a touch screen. Standing still only; moving stops it.',v:'Pick what you do when you win: everyone watching you sees it.',o:'Swing something sillier than the crowbar. Same reach, same swing, same damage, and it gathers scrap just the same.',p:'A backpack goes on over any outfit. It keeps your colour on it, so you can still be told apart.',w:'Your weapons in a pattern. The orange tip, the muzzle flash, the rarity band and the crosshair stay the same.',b:'What your walls, floors and ramps look like to everyone. They are just as strong, and just as hard to see through.'}; let stageA=0,lede0=null,tab='outfits',built=false,drawnPics=false,stageEnt=null,stageTrail=0,posed=false,disp=null; const cards={}; function worn(){return parse(G.myLx)} @@ -770,12 +930,12 @@ function buildMenu(){ grid0.before(bar); for(const [id] of TABS.slice(1)){const gr=document.createElement('div');gr.className='lk-grid';gr.id='lkGrid-'+id;gr.hidden=true;grid0.after(gr);const L=SLOT[id];cards[id]=[]; for(let n=id==='e'?1:0;n<=L.length;n++){const b=document.createElement('button');b.type='button';b.className='lk-card'; - b.innerHTML=(id==='e'||id==='v')&&!n?'–None':(n?'':''+(id==='g'?'Standard':'None')+'')+''+G.esc(n?L[n-1]:id==='w'?'No skin':id==='t'?'No trail':id==='b'?'Plywood':id==='p'?'Outfit\'s own':'Standard')+''; + b.innerHTML=(id==='e'||id==='v')&&!n?'–None':(n?'':''+(id==='g'?'Standard':'None')+'')+''+G.esc(n?L[n-1]:id==='o'?'Crowbar':id==='w'?'No skin':id==='t'?'No trail':id==='b'?'Plywood':id==='p'?'Outfit\'s own':'Standard')+''; b.addEventListener('click',()=>pick(id,n));gr.appendChild(b);cards[id][n]=b}} setTab('outfits'); } function pick(id,n){if(!G.lockerOn())return;if(id==='e'){G.store.set('em',String(n||1));stageA=performance.now();mark();return}const o=worn();delete o.e;if(n)o[id]=n;else delete o[id];if(id==='v')stageA=performance.now();G.setLx(str(o));mark()} -function nameOf(id){const o=worn();o.e=myEmote();const n=o[id];return n?SLOT[id][n-1]:id==='w'?'No skin':id==='t'?'No trail':id==='b'?'Plywood':id==='p'?'The outfit\'s own':id==='v'?'No victory pose':'Standard glider'} +function nameOf(id){const o=worn();o.e=myEmote();const n=o[id];return n?SLOT[id][n-1]:id==='o'?'Crowbar':id==='w'?'No skin':id==='t'?'No trail':id==='b'?'Plywood':id==='p'?'The outfit\'s own':id==='v'?'No victory pose':'Standard glider'} function mark(){if(!built)return;const o=worn();o.e=myEmote();for(const id in cards)cards[id].forEach((b,n)=>b.setAttribute('aria-pressed',(o[id]||0)===n?'true':'false')); if(tab!=='outfits')G.$('lkName').textContent=nameOf(tab)+(tab==='e'&&emoteKeyName()?' ['+emoteKeyName()+']':'')} function setTab(id){tab=id;const sec=G.Locker.sec; @@ -809,13 +969,13 @@ function trailPic(n){const W=180,H=270,c=document.createElement('canvas');c.widt g.globalAlpha=(T.a)*(1-f*.7);g.drawImage(tmp,x-s/2+(r()-.5)*20,y-s/2,s,s)} return c.toDataURL('image/png')} function pics(){if(drawnPics||tab==='outfits')return;drawnPics=true; - try{for(const id of ['g','t','w','b'])cards[id].forEach((b,n)=>{if(!n)return;const im=b.firstChild;im.src=id==='g'?gliderPic(n,180,270):id==='w'?gunPic(n,180,270):id==='b'?buildPic(n):trailPic(n);im.hidden=false}); + try{for(const id of ['g','t','w','b','o'])cards[id].forEach((b,n)=>{if(!n)return;const im=b.firstChild;im.src=id==='g'?gliderPic(n,180,270):id==='w'?gunPic(n,180,270):id==='o'?pickPic(n,180,270):id==='b'?buildPic(n):trailPic(n);im.hidden=false}); const pp=packPics();cards.p.forEach((b,n)=>{if(!n||!pp[n-1])return;const im=b.firstChild;im.src=pp[n-1];im.hidden=false}); for(const k of ['e','v']){const pp=posePics(k);cards[k].forEach((b,n)=>{if(!n||!pp[n-1])return;const im=b.firstChild;im.src=pp[n-1];im.hidden=false})}}catch(e){console.error(e)}} // emotes and victory poses: your character caught in the middle of each (a model posed by the page's own animModel, its // legs as plain meshes for the picture), from the front function posePics(kind){ - const out=[],W=180,H=270,L=kind==='e'?EMOTES:VICTORIES,T=kind==='e'?[0,.32,.36,.5,.48,.1,.3,1.0,.9,.33,1.2]:[0,.4,.5,1.2,.25]; + const out=[],W=180,H=270,L=kind==='e'?EMOTES:VICTORIES,T=kind==='e'?[0,.32,.36,.5,.48,.1,.3,1.0,.9,.33,1.2,.8,.45,.3,1.0,.6,1.0,.5,.8,1.0,.9,1.5,1.0]:[0,.4,.5,1.2,.25]; const sc=new THREE.Scene();lights(sc);const cam=new THREE.OrthographicCamera(-.95,.95,1.42,-1.42,.1,40);cam.position.set(2.3,2.1,-6);cam.lookAt(0,1.27,0); const u0=G.player.model.userData,cp=G.camera.position; for(let n=1;nD.dur*1000+700)stageA=now;e.lxForce={k:tab,n:em,t0:stageA}}else e.lxForce=null; - e.lxo={g:air?o.g||0:0};setGlider(model,air?o.g||0:0);model.userData.gs=tab==='w'?o.w||0:0; + e.lxo={g:air?o.g||0:0};setGlider(model,air?o.g||0:0);model.userData.gs=tab==='w'?o.w||0:0;model.userData.lxO=o.o||0; G.setHeldModel(model,tab==='w'?'ar':'cb',tab==='w'?3:-1); G.animModel(e,dt);model.visible=true; stageTrail=tab==='t'?o.t||0:0; - V.zoom=air?1.85:tab==='w'?.8:tab==='b'?2.7:1.15;V.y=air?1.0:tab==='w'?.38:tab==='b'?1.3:.15; + V.zoom=air?1.85:tab==='w'||tab==='o'?.8:tab==='b'?2.7:1.15;V.y=air?1.0:tab==='w'||tab==='o'?.38:tab==='b'?1.3:.15; if(tab==='b'){if(!disp)disp=makeDisp();disp.visible=true;const n=o.b||0;if(disp.userData.n!==n){disp.userData.n=n;for(const m of disp.children)m.material=n?dispMat(n):G.plyMat} const C=G.STAGE.CAM;disp.position.set(S[0],S[1],S[2]);disp.rotation.y=Math.atan2(-C[0],-C[1])}else if(disp)disp.visible=false; // the pieces stay behind the character, facing the camera } @@ -851,5 +1011,5 @@ function makeDisp(){const g=new THREE.Group();const w=new THREE.Mesh(G.geoPWall, return{relang(){if(emoteBtn)emoteBtn.textContent=lxT('EMOTE')},canEmote,pick,emote,EMOTES,VICTORIES,startEmote,stopEmote,pack,dress,tick,gunReset,gunIM,gunDone,bsOf,bsk,bsCol,bsMat,botLx,menu,shown,stage,gstyle,HOLDS, // for tests and contact sheets - parse,str,GLIDER_NAMES,TRAIL_NAMES,WRAP_NAMES,BUILD_NAMES,gliderOf,setGlider,gunMesh,GLX,GSK,tp,TRAILS,emit,buildTex,tileCanvas,setTab,get tab(){return tab},gT,uT,gliderPic,gunPic}; + parse,str,PICK_NAMES,pickOf,pickPic,PACK_NAMES,EMOTE_NAMES,GLIDER_NAMES,TRAIL_NAMES,WRAP_NAMES,BUILD_NAMES,gliderOf,setGlider,gunMesh,GLX,GSK,tp,TRAILS,emit,buildTex,tileCanvas,setTab,get tab(){return tab},gT,uT,gliderPic,gunPic}; }; From e4aae3e71ffb0b9060d5b8da04946670a4ce150b Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 07:45:29 +0000 Subject: [PATCH 51/63] Boostball README: third-wave Kit counts and how the big goal explosions are drawn Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4c1e0ac6..842d2508 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Personal site hosted with GitHub Pages at **https://ascoding11.github.io**, the - `e63334287a3deaa3/shell-crackers/`: Shell Crackers (Back Room), a first-person egg shooter with a free-for-all and a capture-the-flag mode (Three.js, Firebase Realtime Database rooms under `rooms/sc-…`, same project and rules as Rumble Karts). Maps are block worlds (72 × 72 m; blocks are 1 m wide and 0.5 m tall, so stairs are rows of half-metre steps) built by the functions in `MAPS` (`buildFarm`, `buildFactory`, `buildTown`, `buildFreezer`, `buildSands`, `buildHeights`) from the tools above them: `fill`/`clear`, `building` (walls, floors, windows, doors, flat or gabled roofs), `stairs`, `stairsDown`, `tunnel`, and small props. The ground is 3 m thick so tunnels fit under it, and every call is also placed turned 180° about the centre so both halves match. There are six maps: Farmstead, Yolk Works and Eggsburg, and three newer ones, each with its own idea. **Deep Freeze** is the tight indoor one: a cold store with a loading dock at each end, three lanes between them (corridor, freezer hall, corridor), a catwalk cross over the hall and a control room above each corridor; the snowy yard round it is scenery nobody can reach, and it has no small arena because it is already small. **Sunny Side Sands** is the open one: a fort at each end of a straight road, a 2 m deep dry wash across the middle (a plank bridge you can walk under, four ramps each side), a rock mesa on each side, ruins and an oasis. **Hardboil Heights** is the one with height: a three-tier hill (1.5, 3 and 4.5 m) with stairs on every face, two ground-level tunnels through it that cross in a chamber under the summit (a pillar stops a shot straight through), a hut at each end and two watchtowers. Their blocks (`SAND`, `SNOW`, `ICE`, `PANEL` and so on) are tints of textures the older maps already use, so they add no draw calls; they are cheaper to draw than the older maps (about 9,000 to 12,000 triangles of blocks against 11,500 to 22,500, and the same 45 to 60 draw calls in a bots match). A map can ask for more fill light with `hemiI`/`ambI` in its `MAPS` entry (Deep Freeze does, being indoors). Practice and the menu pick a map at random from all six; a room's first match is random and each next match takes the next map in turn (below for rooms with an older copy of the game in them). Bots path over a navigation graph of every spot an egg can stand; a bot that stops making progress hops, drops its path and plans again (it used to keep its old path, so one knocked off a ramp walked at the wall under its next waypoint). The Training range (menu button under Practice) is its own map, `buildRange` with `RANGE_MAP`, kept out of `MAPS` so it never comes up in practice or online rotation: bullseye boards at 10/20/30/45/55 m, balloons that pop and come back, and unarmed dummies (`DUMMY_ROUTES`) that strafe or patrol and respawn after being cracked. Every gun is on keys 1–5 (6 is the pistol) and T resets the stats; the number keys stay fixed there, while T is the rebindable "Reset training stats" action in the Controls panel (`keybinds.js`) and the Pistol and Swap keys work on the range too. Magazines still need reloading but never run out, yolk bombs refill, and it has no clock, no rating and no database writes; its hit, accuracy and headshot counts live only in the open tab (`Range` in the page). On touch screens it adds a button for each gun and a Reset button (`#tTrain`) to the usual touch controls. Ranked rating: Elo from each match's finishing order, multiplied by 1.25^(real opponents − 1) (×1 for one real opponent, capped at ×3; bots-only practice ×0.4; first 10 matches move faster; leaving an online match after 45 s counts as last place). Ratings are stored at `rooms/sc-ratings/players/`, which the existing rules allow; each player's own browser writes their rating, so it isn't cheat-proof. Online, each egg writes its own `players/` node about 12 times a second while anything changed (position, aim, health, shots), twice more right after it stops changing (`Net.wantSend`, so others see it stop at once instead of carrying it on into the wall or floor it stopped at) and once a second otherwise; other eggs are dropped after 9 s without an update. The match lives in `rooms/sc-/round` (set by a transaction on joining, replaced when it is 20 s past its end); the last egg to leave the room removes it (`Net.dropRound`, only when no other egg is in the room and only the match it played), so an unused code doesn't keep a stale node, and `rematch` starts a fresh match if there is none. The round is the only thing that decides the map: its `map`, and `sm` for a small arena (below). Every browser keeps the newest value its listener has had from the server (`Net.cur`) and builds exactly that (`Net.takeRound`, `onMatch`); whoever wrote the round and whoever has left since doesn't matter. When a party lands together, every browser races to start the round with its own random map; the join and rematch transactions run with `applyLocally` off so nobody acts on a losing guess, and the join never acts on its own transaction result, only on what the listener delivers. Joining waits up to 8 s for the round; if it still hasn't come, the menu says "Waiting for the room's match…" (the old code dropped you onto the menu's random map, where everyone else was invisible), tries to start the round again after 12 s more and gives up with a message after 15 s beyond that. Each egg's node also carries the map and arena it has built (`mp`, `ar`), and another egg is only drawn, hittable or heard while its node carries the same match id (`m`) and, when it says, the same `mp`/`ar` as yours, so eggs on different rounds or layouts never see or hit each other. With every send (`Net.check`) the browser rebuilds at once if the map it has built isn't the round's, and if most of the other eggs in the match report a different layout for 2 s it reads the round again. If the last egg out removes the round while someone it hadn't seen yet is still in the room, that egg puts the round back (`takeRound`), so a later joiner doesn't start a new one on another map. Small arenas: an online match that starts with 4 or fewer eggs (`SMALL_MAX`, counted by whoever starts the round: on joining a room or in `rematch`) has `sm: 1`, and every browser builds that map with its far wings closed off (`smallArena`, from the map's `small` entry in `MAPS`: the box that stays open, a wall of the map's own fence round it from the tunnels up, and its own spawns nearer the middle). Outside the box every open block is `BARRIER`, which eggs can't walk into but which is never drawn and lets shots and sight lines through, so nobody jumps over the wall from a roof; buildings in the wings stay as scenery. If the room reaches 5 eggs, or an egg on an older copy of the game (no `ar` in its node) joins, in the first 15 s of a small-arena match (`SMALL_GROW_MS`), the round is switched to the full map (a transaction that only clears `sm`), so a party arriving one by one isn't stuck in a small arena; after that the size only changes at the next match. A small arena is only chosen when every egg in the room sends `ar`. Practice, the training range and rooms of 5 or more always get the whole map, built exactly as before. Maps and older copies of the game: each egg's node also says how many maps it can build (`mc`); a copy from before the three newer maps says nothing and counts as 3 (`OLD_MAPS`, `mapsOf`). A new match (joining an empty room, `rematch`) only picks among the maps every egg in the room can build, so a room with an older copy in it stays on the first three. If an older copy joins in the first 15 s of a match on a newer map, the match is moved to one of the first three (a transaction that only changes `map`, like the small arena opening up); after 15 s the match stays where it is and the older copy, which builds Eggsburg for any map number it doesn't know, is hidden from the others and they from it (the `mp` rule above) until the next match. Nothing in the round node changed. After changing a map's `small` box or spawns, check that the console shows no `spawn moved` or `spawn blocked` warning for its small arena too (`buildMap(i,1)`). Frame cost: hills and trees are merged into four meshes (one per quarter round the map, so the ones behind you aren't drawn), each cloud into one, each egg's face into two and each gun into one geometry shared by every egg and the view model (`mergeParts`, colours as vertex colours), and particles and shell shards are instanced pools (`instPool`), so a busy practice match is about 60 draw calls instead of about 220. A slow frame is played in steps of at most 1/30 s (`simulate`; only frames longer than `FRAME_CAP`, 0.25 s, lose time), so a slow laptop no longer plays in slow motion below 20 frames a second. If frames stay under about 30 a second for 8 s of play even at `autores.js`'s lowest resolution, and the player has never picked a graphics setting, the game switches itself to Fast (no shadows), says so in the feed and saves that; Pretty in Settings puts it back. Collision: an egg is a box 0.64 m wide and 1.45 m tall (`PR`, `PH`) against the blocks. Movement goes one axis at a time in steps under 0.2 m, steps up onto ledges of up to `STEP` (0.6 m) with head room, and falls are capped at 30 m/s (`MAX_FALL`), so normal movement never ends inside a block at any frame rate. If something does put an egg inside one, `pushOut` moves it out the shortest way that ends clear, passes through no other block and doesn't take the egg's middle through a wall: sideways, down from under a ceiling, or up only onto a top within a step. (The old code lifted it half a metre at a time until it was clear, which could launch it up to 12 m onto a roof or out of a building.) If there is no such way within 1.5 m, `rescue` puts it on the nearest spot an egg can stand. The webdriver-only test hook (`window.__sc`) exposes the movement code for the collision audit, and `botMatch(map, bots)` for a bots-only match on a chosen map. Spawns: each map builder places them with `spawn(x,z)` (mirrored like everything else; an egg hatches facing the middle of the map, or the point given as `spawn(x,z,y,faceX,faceZ)`, so no spawn looks at a wall a few metres off or straight at a spawn on the other side; a small arena's `sp` entries take the same five values), and each must be a spot an egg fits (`standV`: something solid underneath and 1.5 m of air above; the egg's box fits inside that block column). A spawn that a map edit has blocked is moved to the nearest clear spot on the same level within 3 m, with a console warning (`spawnSpot`), instead of being lifted onto whatever covers it, and `respawn` never hatches an egg inside a block (it shoves it clear or uses the nearest standing spot). All current spawns are clear; after changing a map, check that the console shows no `spawn moved` or `spawn blocked` warning. Other eggs are drawn with `netsmooth.js`, carried on for at most 200 ms (`REMOTE_AHEAD`) when an update is late, and `drawClamp` keeps them in the map and out of blocks (pushed out the same way as above, and when carried on, no more than half a metre below or a quarter metre above where they were heading), so nobody is drawn, or shot at, inside a wall or a floor. **Capture the flag** (the menu's mode switch, `gmode`; Quick match, Play in room and Practice all start the mode picked): two teams, Red and Blue, a flag each. Touch the other team's flag to pick it up and carry it to your own stand while your own flag is home to score; a dropped flag goes home when one of its own team touches it or after 20 s (`CTF_RETURN_MS`); first to 3 captures (`CTF_CAPS`) wins, or most when the five-minute clock runs out (level is a draw). Whoever carries a flag moves at 85% speed (`CTF_SLOW`), can't aim down sights or scope, and is marked for everyone: the flag is drawn above its head, its name tag shows at any distance and the HUD marker follows it. Shots and yolk bombs don't hurt team-mates (a bomb still hurts whoever threw it). It is unranked: no rating change, and leaving early costs nothing. Every map has a `ctf` entry in `MAPS`, the block where team 0's flag stands; team 1's is the same spot turned 180°. `buildMap` paves a 3 × 3 pad in the team's colour there (`ctfBases`), always builds the whole map (no small arena), gives each team the spawns clearly on its own side (`ctfSpawns`) and lists guard spots near each stand for bots (`ctfPosts`). The flags and score are one small object, `ctfS` = `{s:[red,blue], f:[flag,flag]}`, a flag being `{st:0}` at home, `{st:1,by}` carried or `{st:2,x,y,z,t}` dropped; every change is one of five moves (`take`, `drop`, `ret`, `lost`, `cap`) through `ctfReduce`, which refuses a move that no longer fits. Practice is 3 v 3 (you and two bots against three, `CTF_BOTS`) and applies the moves directly. Online there are no bots and no host: a capture-the-flag room is any room whose code starts with `ctf-` (`rooms/sc-ctf-…`, still under the game's `sc-` rooms; public lobbies are `sc-ctf-pub-1` to `3`; invite links like `#sc-ctf-yolk-123` work as before), the state lives in that room's match node as `round.ctf` (missing means both flags home, 0–0, so starting a match is unchanged), and each move is a transaction on the match node by the browser whose own egg did it (`ctfDo`), or, for a flag whose 20 s are up or whose carrier was cracked or left without its own browser saying so, by whichever browser notices first (the carrier's last seen spot, after 2.5 s). Nothing changes on screen until the node's listener delivers the result (`takeRound` → `ctfSync`, which also writes the feed lines and banners), so two eggs grabbing the same flag can't both get it and the state outlives anyone leaving. Teams have no lobby: you join the smaller team on the way in (`ctfPick`; your node carries `tm`), other eggs are drawn in their team's colour, and if one team is two or more bigger for two seconds the egg with the highest id on it that isn't carrying a flag changes sides and hatches again (`ctfBalance`). Older copies of the game: in a capture-the-flag room every egg puts the round's id plus a half in its node and its events (`Net.wm`) in place of the id, and an egg is only drawn, hittable or heard when its match id matches (the rule above), so a copy from before this mode that opens a `ctf-` room sees nobody, is seen by nobody, and none of its hits or yolk bombs land: it plays on alone until it leaves. Because the room's name decides the mode, a round that an older copy starts or restarts there is still played as capture the flag by everyone else. (Two older copies in one such room could fight each other to 25 cracks and start the next round early, which would reset a capture-the-flag match under way.) Bots (`ctfBotPlan`, called from `botThink` in place of its usual choice of where to go): each team's first bot guards (walks between spots near its stand, chases whoever has its flag), the rest attack; a carrier runs home and waits by the stand while its own flag is away; anyone near a dropped flag goes to it; when both flags are out everyone hunts the other carrier; they never target team-mates. HUD: the two score boxes become the two teams (yours first) with captures and that team's flag as home, taken or dropped; a marker for each flag (`#fm0`, `#fm1`) sits over it on screen or on the edge of the view with an arrow, showing metres away or, for a dropped flag, seconds until it goes home; a line under the top says when you have a flag. The flags are one mesh each (two draw calls in all), and the stands are map blocks. On touch nothing new is needed: flags are picked up, returned and captured by touching them. The test hook adds `ctf` (state, stands, team), `ctfDo`, `ctfReduce`, `setMode` and `ctfBotMatch(map, bots)`. **Rules** (`GMODES`; separate from the free-for-all / capture-the-flag switch, and work with both): **Classic** (the game as it was), **Snipers Only** (everyone, bots too, carries only the Sunny-Side: no pistol swap, no yolk bombs), **Low-Gravity Snipers** (the same at 40% gravity and 1.15× jump speed, about 4.2 m jumps instead of 1.3; yolk bombs would fall slowly too but nobody has any), **Pistols Only** (only the Cracker, no yolk bombs), **One-Shot** (any gun or whack cracks in one; yolk bombs and streak rewards hurt as usual, and the streak rewards need 5, 7, 9, 12 and 18 instead of 3, 5, 7, 10 and 15, since cracks come fast) and **Gun Game** (below). The menu's Rules picker (saved in this browser as `shellcr-rules`, Classic when missing) sets practice and any room match this browser starts. Online the room's match node carries them: `round.gm` (missing or 0 = Classic, so rounds look exactly as before in Classic) is copied by `rematch` into the next round, or replaced by `round.ngm`, which only the room's **host** can set, from the Next match picker on the pause and end cards (everyone else sees it greyed out with the host's name). The host is the egg that has been in the room longest: each egg's node now carries `jt`, when it joined (`Net.joinT`); an older copy sends none and is never host. Like capture the flag, a match with other rules adds a quarter to the match id in nodes and events (`Net.wm`), so an older copy of the game (which would play Classic) neither sees nor hits anyone there and plays on alone. The mode shows in the start banner, the clock box ("Snipers · 25" for "First to 25"), the pause and end cards, and the feed for a joiner whose own pick differs; on touch screens the Bomb and Swap buttons hide in the one-gun modes. Only Classic is ranked: every other mode leaves the rating alone (like capture the flag), says so where the rating is shown, and leaving one early costs nothing; play time and crack stats still count. **Map vote** (`Vote`): the end card offers the next map, two of the maps every egg in the room can build other than the one just played (the same two in every browser, picked from the match id) plus Random. Each click sends a `vote` event (`{id: match, v: map or -1}`); a newer one from the same egg replaces the older, bots don't vote, and the buttons show the counts. When the 12 s end screen runs out the host counts the votes and starts the next match on the winner through `rematch(map)` (the room's match node, so everyone builds it); a tie or no votes picks at random among the leaders, and Random picks any other map. "Next match now" is the host's only (it ends the vote early); if the host has gone, every other browser settles it the same way 5 s later and whichever transaction lands first wins. In practice the vote just picks the Play again map. An older copy in the room ignores votes and still starts the next match in turn after 12 s, which can beat the host's pick. The test hook adds `GMODES`, `rules`, `Vote`, `castVote`, `voteDecide` and `setNextRules`. **Gun Game** (`GMODES[5]`, its `ladder` list): everyone, bots too, starts on the first of ten guns, Cracker, Whisk, Skillet, Beater, Poacher, Sunny-Side, Whisk, Skillet, Poacher, Sunny-Side, with no pistol swap and no yolk bombs, and every crack moves the cracker to the next gun at once (`ggSet`; each egg's rung is `e.gg`). A whack counts as a crack and also sends the whacked egg back one gun (never below the first). The first crack made with the last gun (a Sunny-Side shot, not a whack) finishes the ladder (`gg` = 10) and ends the match with that egg first; when the clock runs out first, whoever is furthest up the ladder wins. Standings, the scoreboard and the end card sort by rung, then cracks, with a Gun column in place of K/D. The HUD's two score boxes show your place ("5/10") with your gun's name and the top rival's place; the slot chips under the ammo show this gun and the next one ("Last gun: crack to win" at the end); the clock box says "Gun Game · 10"; and the feed says when anyone reaches the last gun. Streak rewards are off (they would skip the ladder): none are earned or used, so the Yolk Launcher never replaces a ladder gun (and if one were ever in hand when the ladder moves, it is dropped for the new gun), and the streak box and reward button stay hidden; bots climb the same ladder, aim and perch for whatever gun they have, and whack an egg that comes within reach. Unranked, like the other non-Classic rules. In capture the flag the guns still change with each crack but you stay on the last one and the flags decide the match. Online, `round.gm` is 5, each egg moves up its own ladder when the usual `died` event credits it with a crack, moves itself back when it is whacked, and puts its rung in its own node as `gg` (only in Gun Game; the shared rules accept the extra field); every browser reads the others' `gg` for the HUD and standings and ends its own match once any egg in the match reports the whole ladder done, as when the clock runs out. A Gun Game match adds an eighth to the match id instead of a quarter (`Net.wm`): a copy from before Gun Game reads `gm` 5 as One-Shot, the last rules it knows, and adds a quarter, so it too is kept apart and plays on alone. The test hook adds `ggSet` and `ggTop`. **Streak rewards** (the `KS` list in the page): crack 3, 5, 7, 10 and 15 eggs in one life (`e.streak`, which being cracked resets) and you earn the **Candler** (3), **Quick Hands** (5), **Thick Shell** (7), the **Yolk Launcher** (10) and **The Big Fry** (15). A reward is held until it is used, even through being cracked, and the held ones are cleared when a match starts (`ksReset`, from `resetFx`); one of each kind at a time. The reward key (X by default, the rebindable "Use a streak reward" action in the Controls panel and the menu's key list) uses the oldest one held; on touch screens a round yellow button named after it (`#tKs`) sits above the move stick while you hold one and are alive. Being cracked ends any buff running and takes the launcher away (`ksEnd`, from `die`). The HUD (`#ks`, above the health readout; on touch screens beside the reward button with the phone sideways and above it when upright, hidden while you're cracked) shows the streak, a pip for each of 3, 5, 7, 10 and 15, and a chip for each reward running (seconds or rockets left) or held (the first with its key). Cracks made by the Yolk Launcher and The Big Fry (`rocket` and `fry` in `KS_KILL`) count like any other in the cracks, stats, rating and feed ("Yolk Launcher", "The Big Fry"), but don't add to the streak, so a reward never earns the next one. Practice and online only: the training range has none, and nor does the menu's background match. The **Candler** (candling is holding a lamp to an egg) draws every rival as a glowing orange egg through walls for 3 s (`KS_CANDLE`; a shared no-depth-test copy of the shell, `setGlow`, so one extra draw call per rival only while it lasts); name tags keep their usual distance, and the eggs it reveals are told in the feed. **Quick Hands** makes reloads and weapon swaps 25% faster (`KS_QUICK`, three quarters of the usual time) for 15 s (`KS_QUICK_T`). **Thick Shell** cuts the damage you take by 15% (`KS_SHELL`) for 12 s (`KS_SHELL_T`): eggs have no shield or overheal (health is 0 to 100 and comes back on its own), so a damage cut is what fits. The **Yolk Launcher** is a temporary weapon (`WEAPONS.launcher`, never a loadout; an orange tube with yolk-yellow bands) with 2 rockets (`KS_ROCKETS`) that replaces the gun in your hands; swapping is off while you hold it, it never reloads, and once both rockets are out, or you're cracked, it goes and you're back on the gun you had (with that gun's ammo as it was). Each rocket is a big egg that flies straight at 30 m/s (`KS_ROCKET_V`, trailing yolk) until it touches a block, the edge of the map or an egg, or for 3 s, then bursts like a yolk bomb: up to 100 damage at the centre falling off to nothing at 4 m (`KS_ROCKET_DMG`, `KS_ROCKET_R`), blocked by walls, 40% to whoever fired it (`KS_ROCKET_SELF`), team-mates spared in capture the flag. **The Big Fry** ends the match: a giant frying pan (three meshes, only while it lasts) comes down over the whole map for 10 s (`KS_FRY`) while the screen darkens, a rising siren sounds every second and a countdown with the caller's name shows above the crosshair for everyone. Then a white-hot flash cracks every rival of the caller (the other team in capture the flag), and 1.6 s later the match ends with the caller first in the standings (`fryWin`; in capture the flag their team wins), whatever the cracks. It lands even if the caller is cracked or leaves, and only one can run at a time. Its cracks count for stats and the feed as the caller's. Rating: a Big Fry ending is rated like any other ending, from the end standings with the caller placed first, since getting 15 in a row is the achievement; the usual rules (bots-only weight, too-late joiners) still apply. Bots earn rewards from their own streaks and use them a second or two later (the Yolk Launcher once they can see someone to aim at, and they fire it like any gun; a bot's Candler lets it choose and chase rivals it can't see). Online, using a reward sends a `ks` event on the room's usual `events` list (`{k:'candle'}`, `{k:'quick'}`, `{k:'shell'}`, `{k:'launcher'}`, `{k:'fry'}`) for the feed line and The Big Fry's countdown, and each rocket fired is `{k:'rocket',x,y,z,dx,dy,dz}`, which every browser flies; so nothing is added to the match node and no path or rule changes. The buffs need nothing from other browsers: Thick Shell is applied by the egg being hit and Quick Hands by its owner. Other browsers see the launcher in your hands (weapon index 6 in your node's `w`; an older copy draws a Beater). As with yolk bombs, each browser applies a rocket's damage to its own egg only and sends its own death (`w:'rocket'`). The Big Fry's flash is applied by each browser to its own egg only, which sends its own death (`w:'fry'`), and each browser then ends its own match (the host's next match and map vote follow as usual). A browser takes at most one reward of each kind from an egg every 2 s (rockets aren't limited), and ignores kinds it doesn't know, so events from older copies that still have the Egg Drop and Toaster Sentry (`drop`, `toaster`, `toastx`, and hits on a `:ts` sentry) do nothing. Older copies of the game ignore the new events: they don't see the launcher's rockets and aren't hurt by them or the Fry (they play on until the room's next match starts). The test hook adds `KS`, `useReward`, `creditKill`, `rockets` and `fry`. **Turkey Week** (`../events.js`, November 15 to 26, 2026): every other egg is drawn as a turkey in a pilgrim hat (`turkeyKit`, `dressEgg`): a tail fan, wings, beak, wattle, feet and the hat as one shared geometry added to the egg's body, so one more draw call per egg, and the menu's egg picture wears the same. There is no switch for it in the game: the one Turkey Week switch on the Back Room page (see `events.js` below) takes it off or puts it back for that browser, and the game reads it once, when it loads. It is only a look: the egg's hit box and headshot height and everything sent to the room are unchanged. **Locker** (`kit.js` beside the page; not public yet): 19 egg types, 7 hats, 12 gun skins and 5 crack effects, numbered as in `../cosmetics.js` (`'shell-crackers'` in `GAMES`). Only the site's captains see it: `SC_PUBLIC = false` near the top of the script, and `lockerOn()` asks `captains.js`'s `may(false, 'locker', 'shellcr-locker')` (`?locker=1` works on localhost or in an automated browser only); flip `SC_PUBLIC` to open it to everyone. A Locker button under the shell swatches opens a screen with a turning preview and a tab for each slot; everything is free to wear while the shop is off, saved as `shellcr-kit` (four base-36 characters: egg type, hat, gun skin, crack effect, each the item's number, 0 for none). For everyone else `kit.js` is never fetched and the game is as before (the page now also loads `captains.js` and the switched-off `cosmetics.js`). Online the same four characters go in the egg's node as `ck`, only when something is worn; older pages ignore it, and a page that sees one fetches `kit.js` to draw that egg, checking every character against the catalogue (anything unknown is drawn plain). Looks only: every egg type is the same egg geometry and hit box (hits come from the egg's position, never from what is drawn), so the ostrich and emu eggs read as big only through their pattern and colour; none is darker than the Charcoal shell or glows like the spawn shield, and in capture the flag the shell stays the team colour (hats, gun skins and crack effects still show). Cost: an egg type is another picture on the egg's own material (a Phong material for the shiny ones), a hat is merged into the face's dark mesh and a gun skin is a recoloured copy of that gun's one geometry with a few small parts added (below or beside it, never above the sights; the muzzle point doesn't move), so none adds a draw call; the rotten egg's stink lines are merged too and its flies are one small mesh (one more draw call, on a rotten egg only). Crack effects play where an egg was cracked, for everyone who sees it, when the egg that cracked it wears one (bots and training dummies cracked by a captain too): each lasts under 2 s and stays low, using two instanced pools and two small meshes that are only drawn while an effect plays, and a 'died' event that arrives after the cracked egg's own node still plays it (`cracked` in `kit.js`). During Turkey Week an egg wearing a Locker hat gets the turkey kit without the pilgrim hat (`turkeyKit(true)`). The test hook `window.__kit` adds `sheet(slot)`, a contact sheet of every item drawn by the real code, plus `wear`, `parse` and `wireOf`. **Top Cracker:** the player with the most Shell Crackers kills of all time on the Leaderboards (25 or more; a tie gives it to everyone tied) holds an earned award, a cracked-egg medal on a cream ribbon shown after their tier badge everywhere badges show, and the game's Kills (all time) board says who holds it (see `miles.js` and `leaderboard.js` below). Nothing in the game changes: it follows the `kills` count the game already reports through `stats.js`. **Spanish** (lang.js): the game's own words are in `shell-crackers/es.js` (the Locker's too), text it puts together goes through `TX()`, HUD parts that change during play are `data-noi18n`, and weapon, map, bot, streak and reward names stay as they are. - `e63334287a3deaa3/index.html` and `e63334287a3deaa3/games.css`: the Back Room page. Under the header, the What's new strip, the Party and Online panels, the games come in one `
` (leaderboard.js puts the Leaderboards right after it, and the home page's `reveal()` copies this first `
` into the home page, so everything the games need is inside it). The last thing in the `
` is the Turkey Week switch (`data-turkey-switch`, filled in by `events.js` and shown only during the event; see `events.js` below): the one switch for every game's Thanksgiving look. The page reads, top to bottom: What's new, Playing now, Party, Online, then the games (playingnow.js puts its panel right above the Party panel). **The ad tile:** next to the What's new strip is one small sponsored tile, drawn by news.js (see its paragraph below for how to change the ad or switch it off): beside the strip on a computer, where it takes the strip's height and so doesn't move the games down at all, and a slim 44 px banner under the strip on narrower screens. At the top of the games is **the row of game types** (`