// AI walkthrough — animated multi-scene video showing the Thraxel AI Hub in action // Auto-cycles between scenes; user can also click chapter markers to jump. const { useState: useStateAI, useEffect: useEffectAI, useRef: useRefAI, useMemo: useMemoAI } = React; const SCENES = [ { id:'replace', title:'Replace 12+ softwares', dur: 6500 }, { id:'voice', title:'AI voice answers your business', dur: 6500 }, { id:'avatar', title:'On-brand AI avatars', dur: 6500 }, { id:'booking', title:'Booking on autopilot', dur: 6500 }, { id:'leadmap', title:'God\u2019s-eye lead map', dur: 7000 }, ]; function useSceneCycle(scenes){ const [i, setI] = useStateAI(0); const [paused, setPaused] = useStateAI(false); const [progress, setProgress] = useStateAI(0); // 0..1 within scene const startRef = useRefAI(performance.now()); useEffectAI(()=>{ let raf; const tick = ()=>{ if (!paused){ const elapsed = performance.now() - startRef.current; const dur = scenes[i].dur; const p = Math.min(1, elapsed / dur); setProgress(p); if (p >= 1){ setI((i+1) % scenes.length); startRef.current = performance.now(); } } raf = requestAnimationFrame(tick); }; raf = requestAnimationFrame(tick); return ()=> cancelAnimationFrame(raf); }, [i, paused]); const goto = (idx)=>{ setI(idx); startRef.current = performance.now(); setProgress(0); }; return { i, progress, paused, setPaused, goto }; } // ---------- SCENE 1: Replace 12+ softwares ---------- function SceneReplace({ progress }){ const apps = [ { name:'QuickBooks', color:'#2CA01C', mark:'qb' }, { name:'HubSpot', color:'#FF7A59', mark:'hs' }, { name:'ServiceTitan',color:'#FFB200',mark:'st' }, { name:'Jobber', color:'#1E73BE', mark:'jb' }, { name:'Stripe', color:'#635BFF', mark:'st2' }, { name:'Gmail', color:'#EA4335', mark:'gm' }, { name:'Twilio', color:'#F22F46', mark:'tw' }, { name:'Calendly', color:'#006BFF', mark:'cl' }, { name:'Slack', color:'#4A154B', mark:'sl' }, { name:'Mailchimp', color:'#FFE01B', mark:'mc' }, { name:'Zendesk', color:'#03363D', mark:'zd' }, { name:'Asana', color:'#F06A6A', mark:'as' }, ]; // Phase 0-0.5: apps fly in around perimeter // Phase 0.5-0.75: red sweep eliminates them // Phase 0.75-1: THRAXEL hub pulses with $ savings counter const eliminated = progress > 0.55; const finalPhase = progress > 0.78; const sweepX = (progress - 0.55) / 0.2; // 0..1 during sweep return (