⚙ Configurar painel
◫ Modo apresentação
⇩ Exportar JSON
⇧ Importar JSON
⤓ Exportar HTML
⎙ Imprimir/PDF
\n'+cloneDoc.outerHTML,'text/html;charset=utf-8');toast('HTML completo exportado.'); } /* Partículas galáxia Letticia — mesma lógica visual do HTML de referência */ (function initGalaxy(){ const canvas=document.getElementById('galaxyCanvas'); if(!canvas) return; const ctx=canvas.getContext('2d'); const reduced=window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches; const DPR=Math.min(window.devicePixelRatio||1,1.5); let w=0,h=0,parts=[],raf=0,running=true; function resize(){ const r=canvas.getBoundingClientRect(); w=Math.max(1,Math.floor(r.width)); h=Math.max(1,Math.floor(r.height)); canvas.width=Math.floor(w*DPR); canvas.height=Math.floor(h*DPR); canvas.style.width=w+'px'; canvas.style.height=h+'px'; ctx.setTransform(DPR,0,0,DPR,0,0); const count=Math.max(28,Math.min(78,Math.floor((w*h)/18000))); parts=Array.from({length:count},(_,i)=>({ x:Math.random()*w, y:Math.random()*h, r:Math.random()*1.6+.35, vx:(Math.random()-.5)*.11, vy:(Math.random()-.5)*.11, a:Math.random()*.5+.18, tone:i%3 })); } function draw(){ if(!running) return; ctx.clearRect(0,0,w,h); const animate=state?.settings?.animateGalaxy!==false && !reduced; parts.forEach(p=>{ if(animate){ p.x+=p.vx; p.y+=p.vy; if(p.x<0)p.x=w;if(p.x>w)p.x=0; if(p.y<0)p.y=h;if(p.y>h)p.y=0; } const colors=['255,125,45','160,118,255','95,162,255']; ctx.beginPath(); ctx.fillStyle=`rgba(${colors[p.tone]},${p.a})`; ctx.shadowBlur=8; ctx.shadowColor=`rgba(${colors[p.tone]},.34)`; ctx.arc(p.x,p.y,p.r,0,Math.PI*2); ctx.fill(); }); for(let i=0;i
{ if(document.hidden){running=false;cancelAnimationFrame(raf)} else if(!running){running=true;draw()} }); })(); /* events */ document.getElementById('configBtn').onclick=()=>openDrawer(); document.getElementById('closeDrawer').onclick=closeDrawer;document.getElementById('backdrop').onclick=closeDrawer; document.getElementById('saveBtn').onclick=()=>{persist();toast('Alterações salvas neste navegador.');closeDrawer();}; document.getElementById('resetBtn').onclick=()=>{if(confirm('Restaurar todo o painel para o conteúdo padrão?')){state=clone(DEFAULT_DATA);persist();render();renderConfig();toast('Painel restaurado.')}}; document.getElementById('presentationBtn').onclick=()=>{document.body.classList.toggle('presentation');toast(document.body.classList.contains('presentation')?'Modo apresentação ativado. Pressione Esc para sair.':'Modo apresentação encerrado.');}; document.addEventListener('keydown',e=>{if(e.key==='Escape'){if(document.body.classList.contains('presentation'))document.body.classList.remove('presentation');else closeDrawer();}}); document.getElementById('exportJsonBtn').onclick=exportJSON;document.getElementById('importJsonBtn').onclick=()=>document.getElementById('importFile').click();document.getElementById('importFile').onchange=e=>{if(e.target.files[0])importJSON(e.target.files[0]);e.target.value=''}; document.getElementById('exportHtmlBtn').onclick=exportHTML;document.getElementById('printBtn').onclick=()=>window.print(); render();