- the 60fps canvas render loop ran continuously even when scrolled out of view (the home page is long now — wasted CPU/battery while reading below) - IntersectionObserver pauses the rAF loop at 0% visibility and resumes it when the tavern scrolls back in; cleaned up on unmount - verified live: ~60 rAF/s on-screen → 0 off-screen → 60 on resume, 0 errors
20 lines
419 B
JSON
20 lines
419 B
JSON
{
|
|
"name": "amerc-site",
|
|
"version": "0.60.0-canvasperf",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite --host 0.0.0.0",
|
|
"build": "vite build",
|
|
"preview": "vite preview --host 0.0.0.0"
|
|
},
|
|
"dependencies": {
|
|
"@vitejs/plugin-react": "^5.0.0",
|
|
"lucide-react": "^0.468.0",
|
|
"marked": "^14.1.4",
|
|
"react": "^19.0.0",
|
|
"react-dom": "^19.0.0",
|
|
"vite": "^7.0.0"
|
|
}
|
|
}
|