atmo.rsvp
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix resize issue on mobile

Florian c2d0a228 5205ece4

+24 -8
+6 -2
src/lib/components/themes/Fireflies.svelte
··· 24 24 hueShift: number; 25 25 } 26 26 27 + let lastWidth = 0; 27 28 function resize() { 28 - canvas!.width = window.innerWidth; 29 - canvas!.height = window.innerHeight; 29 + const w = window.innerWidth; 30 + if (w === lastWidth) return; 31 + lastWidth = w; 32 + canvas!.width = w; 33 + canvas!.height = window.screen.height; 30 34 } 31 35 resize(); 32 36 window.addEventListener('resize', resize);
+6 -2
src/lib/components/themes/Kaleidoscope.svelte
··· 12 12 const SEGMENTS = 12; 13 13 const ROTATION_SPEED = 0.06; 14 14 15 + let lastWidth = 0; 15 16 function resize() { 16 - canvas!.width = window.innerWidth; 17 - canvas!.height = window.innerHeight; 17 + const w = window.innerWidth; 18 + if (w === lastWidth) return; 19 + lastWidth = w; 20 + canvas!.width = w; 21 + canvas!.height = window.screen.height; 18 22 } 19 23 resize(); 20 24 window.addEventListener('resize', resize);
+6 -2
src/lib/components/themes/Matrix.svelte
··· 17 17 const FADE_RATE = 2; // alpha per second for trail fade 18 18 const MUTATE_CHANCE = 0.8; // chance per column per second 19 19 20 + let lastWidth = 0; 20 21 function resize() { 21 - canvas!.width = window.innerWidth; 22 - canvas!.height = window.innerHeight; 22 + const w = window.innerWidth; 23 + if (w === lastWidth) return; 24 + lastWidth = w; 25 + canvas!.width = w; 26 + canvas!.height = window.screen.height; 23 27 } 24 28 resize(); 25 29 window.addEventListener('resize', resize);
+6 -2
src/lib/components/themes/Stars.svelte
··· 13 13 const COUNT = 600; 14 14 const SPEED = 300; // pixels per second 15 15 16 + let lastWidth = 0; 16 17 function resize() { 17 - canvas!.width = window.innerWidth; 18 - canvas!.height = window.innerHeight; 18 + const w = window.innerWidth; 19 + if (w === lastWidth) return; 20 + lastWidth = w; 21 + canvas!.width = w; 22 + canvas!.height = window.screen.height; 19 23 } 20 24 resize(); 21 25 window.addEventListener('resize', resize);