Skip to content

Commit

Permalink
fix: add random rotation to all asteroids
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronchan32 committed Apr 6, 2024
1 parent ddf3e07 commit 568e1b0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/components/Asteroid/Asteroid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,5 @@
position: absolute;
top: -26px;
left: -15px;
width: 5rem;
}
}
9 changes: 1 addition & 8 deletions src/components/Asteroid/Asteroid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,7 @@ export default function Asteroid({ homeRef }: AsteroidProps) {
style={{ scale: index === 0 ? 1 : scale }}
>
<LargeAsteroid2 />
{index === 0 && (
<p
style={{ textWrap: 'nowrap' }}
className="asteroid-signifier"
>
Click Me !
</p>
)}
{index === 0 && <p className="asteroid-signifier">Click Me !</p>}
</motion.div>
)
)
Expand Down
3 changes: 2 additions & 1 deletion src/components/Asteroid/asteroidLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ export default function asteroidLogic({
window.innerHeight * 0.75 +
Math.random() * (window.innerHeight * 0.25),
window.innerHeight - 35
)
),
rotate: Math.random() * 360
};
}
};
Expand Down

0 comments on commit 568e1b0

Please sign in to comment.