// THE GUN CASE — Pelican-style hard case + THRAXEL App + Music Box const SCENE_PRESETS = [ { id:'everyday', name:'Everyday Warm', colors:['#FFB347'], pattern:'solid' }, { id:'gameday', name:'Game Day', colors:['#C8102E','#FFFFFF'], pattern:'alt' }, { id:'wedding', name:'Wedding', colors:['#FFE9C8'], pattern:'solid' }, { id:'christmas', name:'Christmas', colors:['#C8102E','#0E8C3A'], pattern:'alt' }, { id:'july4', name:'July 4th', colors:['#C8102E','#FFFFFF','#1A4DCF'], pattern:'march' }, { id:'halloween', name:'Halloween', colors:['#FF7A00','#7A2DCF'], pattern:'pulse' }, ]; // Pelican-style hard case rendered with CSS — long, flat, hinged function PelicanCase({ caseOpen, setCaseOpen, mode, color, brightness, warmth, dim, preset, audioLevels, beatPulse }){ const [t, setT] = useState(0); useEffect(() => { let raf; const tick = () => { setT(performance.now()); raf = requestAnimationFrame(tick); }; raf = requestAnimationFrame(tick); return () => cancelAnimationFrame(raf); }, []); const stripColor = (i) => { if (mode === 'solid') return { c: color, glow: brightness/100 }; if (mode === 'warm') { const k = warmth / 100; const r = Math.round(255*(1-k*0.4)); const g = Math.round(180 + k*70); const b = Math.round(95 + k*155); return { c: `rgb(${r},${g},${b})`, glow: dim/100 }; } if (mode === 'preset') { const p = SCENE_PRESETS.find(x=>x.id===preset) || SCENE_PRESETS[0]; const phase = Math.floor(t/450); let c; if (p.pattern==='solid') c = p.colors[0]; else if (p.pattern==='alt') c = p.colors[(i+phase)%p.colors.length]; else if (p.pattern==='march') c = p.colors[(i + Math.floor(t/300))%p.colors.length]; else c = p.colors[i%p.colors.length]; const a = p.pattern==='pulse' ? 0.5 + 0.5*Math.sin(t/300 + i) : 0.9; return { c, glow: a }; } if (mode === 'music') { const lvl = audioLevels[i] ?? beatPulse; const hue = 350 + lvl*30; return { c: `hsl(${hue}, 90%, ${30 + lvl*40}%)`, glow: 0.2 + lvl*0.9 }; } return { c:'#FFB347', glow:0.7 }; }; // Latches — Pelican press-and-pull style const Latch = ({ left, right }) => (
This is the same hard case we walk into your driveway with. Four RGBWW strips, controlled live from the Thraxel app. Tap to open. Grant mic access for Music Box.