Skip to content

Commit a497099

Browse files
committed
fix: allow bats to fly across entire page instead of just hero section
1 parent 790827a commit a497099

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/components/halloween/FlyingBats.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ function FlyingBats({ count = 5 }) {
66

77
useEffect(() => {
88
// Generate random bat configurations with varied paths
9+
// Distribute bats across the entire page height (0-400vh)
910
const paths = ['path1', 'path2', 'path3', 'path4'];
1011
const generatedBats = Array.from({ length: count }, (_, index) => ({
1112
id: `bat-${index}-${Math.random()}`,
1213
startX: Math.random() * 100,
13-
startY: Math.random() * 80 + 10,
14+
startY: Math.random() * 400 + 10, // Distribute across 400vh
1415
duration: Math.random() * 10 + 8, // 8-18 seconds for faster movement
1516
delay: Math.random() * 6,
1617
size: Math.random() * 0.4 + 0.5, // 0.5-0.9x size

src/components/halloween/FlyingBats.module.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
.batsContainer {
2-
position: fixed;
2+
position: absolute;
33
top: 0;
44
left: 0;
55
width: 100%;
6-
height: 100%;
6+
height: 500vh;
77
pointer-events: none;
88
z-index: 15;
9-
overflow: hidden;
9+
overflow: visible;
1010
}
1111

1212
.bat {

0 commit comments

Comments
 (0)